title: cUrl can't load pem certs from specified path
body: <p>This is a strange one: trying to connect to a server that requires local pem files, but I get this error:<br>
  <code>cURL error 58: unable to load client key: -8178 (SEC_ERROR_BAD_KEY)</code></p>
  
  <p>Strange thing is, that if I navigate to the path where the pem files are, it works. If I give the exact path, it gives the error.</p>
  
  <p>Here are the commands that work:<br>
  <code>cd /path/to</code><br>
  <code>curl --insecure --key key.pem --cacert ca.pem --cert client.pem:xxxxxxxxx https://server.com/action/id</code><br>
  (replies with proper HTML)</p>
  
  <p>These ones give the error:<br>
  <code>cd /path/to</code><br>
  <code>curl --insecure --key /path/to/key.pem --cacert /path/to/ca.pem --cert /path/to/client.pem:xxxxxxxxx https://server.com/action/file</code></p>
  
  <p>Any ideas on how to run the command while also giving the exact paths? I'm completely bamboozled...</p>
  
  <p>EDIT: Just realized it could be helpful:  </p>
  
  <p>curl --version:<br>
  <code>curl 7.51.0 (x86_64-redhat-linux-gnu) libcurl/7.51.0 NSS/3.28.4 zlib/1.2.8 libidn2/0.16 libpsl/0.6.2 (+libicu/50.1.2) libssh2/1.4.2 nghttp2/1.21.1
  Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
  Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets PSL
  </code></p>
  
  <p>uname -a:<br>
  <code>4.9.20-11.31.amzn1.x86_64 #1 SMP Thu Apr 13 01:53:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</code></p>