title: Adding an SSL Certificate to JRE in order to access HTTPS sites
body: <p><strong>Context:</strong></p>
  
  <p>So I'm trying to access an HTTPS site from my Java code but I am not able due to an SSL Handshake issues between my localhost and the server. It seems the reason for this issues is that the URL I am trying to access has no valid certificate issued from an authorized CA. </p>
  
  <p>So after some research, I'm going to try to import the offending SSL certificates into my JRE, that way it can be validated. </p>
  
  <p><strong>Question:</strong></p>
  
  <p>What is the mac equivalent of this command using the keytool for importing certificates: </p>
  
  <pre><code>keytool -import -alias mycertificate -keystore ..\lib\security\cacerts -file c:\mycert.cer
  </code></pre>
  
  <p><strong>Reference:</strong></p>
  
  <p><a href="http://www.jyothis.co.in/2011/11/12/javax-net-ssl-sslhandshakeexception/" rel="noreferrer">http://www.jyothis.co.in/2011/11/12/javax-net-ssl-sslhandshakeexception/</a></p>
  
  <p>Any help or assistance would be much appreciated, thank you</p>