Skip to content

Instantly share code, notes, and snippets.

@sengupta-saikat
Created April 9, 2024 17:40
Show Gist options
  • Save sengupta-saikat/2eccc6adbe908cd62d3df051ef34be2d to your computer and use it in GitHub Desktop.
Save sengupta-saikat/2eccc6adbe908cd62d3df051ef34be2d to your computer and use it in GitHub Desktop.
curl: (58) unable to set private key file

If you see an error saying curl: (58) unable to set private key file there is a chance that the private key in your PEM file does not match the certificate. You can check this by comparing the modulus of the certificate and the private key. Here’s how you can do it:

openssl x509 -noout -modulus -in certificate.pem | openssl md5
openssl rsa -noout -modulus -in private_key.pem | openssl md5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment