title: curl: (58) Unable to load client key -8178
body: <p>I am facing an SSL issue with the <code>curl</code>command. I want to reach an URL using my SSL client certificate and private key.</p>
  
  <p>This is my command:</p>
  
  <pre><code>$ curl -k -v "https://myurl.com/" --cert ./certificate.pem --key ./private.key
  
  * About to connect() to xx.xx.xx.xx port 23444 (#0)
  *   Trying xx.xx.xx.xx... connected
  * Connected to xx.xx.xx.xx (xx.xx.xx.xx) port 23444 (#0)
  * Initializing NSS with certpath: sql:/etc/pki/nssdb
  * warning: ignoring value of ssl.verifyhost
  * Unable to load client key -8178.
  * NSS error -8178
  * Closing connection #0
  curl: (58) Unable to load client key -8178.
  </code></pre>
  
  <p>The key is password protected, <code>curl</code> is not asking me to enter the password, which is very strange. Even if I pass the password with <code>--pass</code>, I still get the same error.</p>
  
  <p>It seems that the argument <code>--key</code> is not considered, because If I replaced with <code>foo.key</code>, which doesn't exist on my filesystem, I still get the same error.</p>
  
  <p>However, If use:</p>
  
  <pre><code>$ wget --certificate=./certificate.pem --private-key=private.key "https://myurl.com/" --no-check-certificate
  </code></pre>
  
  <p>I am able to reach my URL.</p>
  
  <p>Do you have any idea?</p>