curl - unable to set private key file: './cert.pem' type PEM -


i using curl download data https site using public certificate files.

system information:

  • os: fedora 14
  • curl: curl 7.30.0
  • openssl: openssl 1.0.0a-fips

the command is,

curl -v "https://<ip:<port>" --cert "./cert.pem" --cacert "./cacert.pem" --cert-type pem * connect() kng.com port 443 (#0) *   trying 11.19.37.123... * adding handle: conn: 0x8189e68 * adding handle: send: 0 * adding handle: recv: 0 * curl_addhandletopipeline: length: 1 * - conn 0 (0x8189e68) send_pipe: 1, recv_pipe: 0 * connected fkng.com (11.19.37.123) port 443 (#0) * unable set private key file: './cert.pem' type pem * closing connection 0 curl: (58) unable set private key file: './cert.pem' type pem 

i have have given permission .pem file, still curl throwing error.

thanks

after reading curl documentation on options used, looks private key of certificate not in same file. if in different file, need mention using --key file , supply passphrase.

so, please make sure either cert.pem has private key (along certificate) or supply using --key option.

also, documentation mentions note option assumes "certificate" file private key , private certificate concatenated!

how concatenated? quite easy. put them 1 after in same file.

you can more on here.

i believe might you.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -