title: OpenSSL not getting linked with Homebrew
body: <p>I am trying to code in C on mac (el capitan) and need to use OPENSSL.
  OS ships with <code>version 0.9.8zh 14 Jan 2016.</code></p>
  
  <p>I used homebrew to upgrade and install openssl (got version 1.0.2h) but am unable to link it correctly to use it. Am facing the same issue as mentioned in this question: <a href="https://stackoverflow.com/questions/38670295/brew-refusing-to-link-openssl">Homebrew refusing to link OpenSSL</a></p>
  
  <p>It seems answers to the above question are not valid anymore coz of some update in brew.</p>
  
  <p>My path references <code>/usr/local/bin</code> as the first one.</p>
  
  <p>Ran this command: <code>ln -s /usr/local/Cellar/openssl/1.0.2j/include/openssl /usr/local/include/openssl</code>
   (found this solution here: <a href="https://medium.com/@zlwaterfield/openssl-with-el-capitan-456bf68bf43a#.f9tkjeo7w" rel="nofollow noreferrer">https://medium.com/@zlwaterfield/openssl-with-el-capitan-456bf68bf43a#.f9tkjeo7w</a> among other places)</p>
  
  <p>got no error output, so I assumed this worked. But..</p>
  
  <p><code>which openssl</code> gives me this output: <code>/usr/local/bin/openssl</code></p>
  
  <p><code>openssl version</code> gives me this output: <code>OpenSSL 0.9.8zh 14 Jan 2016</code></p>
  
  <p>Any ideas on how to proceed?</p>
  
  <p>@jww am not sure what you mean by "build your stuff". I am not a programmer and hence do not really fully understand vocabulary. Just trying to learn some stuff.</p>
  
  <p>I ran </p>
  
  <p><code>brew update</code> </p>
  
  <p><code>brew install openssl</code> </p>
  
  <p><code>brew link --force openssl</code></p>
  
  <p>which gave me error saying</p>
  
  <p><code>Warning: Refusing to link: openssl</code>. </p>
  
  <p>I didnt write this for sake of brevity and instead I provided link to question which showed exactly the problem I was facing. Coz earlier I have been told I have not been brief enough in forming que. </p>
  
  <p>Also, the command I am running on CLI which led me to this path was this (if that helps): </p>
  
  <p><code>openssl dgst -sha256 -sign ec-priv.pem ex-message.txt &gt;ex-signature.der</code>.</p>
  
  <p>Gives me an error:</p>
  
  <p><code>EVP_SignFinal:wrong public key type</code>. </p>
  
  <p>Googling led me to understand its coz of an old openssl version which I need to update. Does this answer your question?</p>