Created
July 6, 2015 16:15
-
-
Save arnau/50e0dd3bb02d07e19f47 to your computer and use it in GitHub Desktop.
curl on MacOSX is not able to use TLS via pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# When in MacOSX, running: | |
curl --cacert ca.pem --cert cert.pem --key key.pem https://192.168.99.100:2375 | |
# Fails with: | |
# curl: (58) SSL: Can't load the certificate "/Users/arnau/.docker/machine/machines/dev/cert.pem" and its private key: OSStatus -25299 | |
# | |
# This is explained here: https://github.com/bagder/curl/issues/283#issuecomment-104070069 | |
# | |
# In short, MacOSX does not allow curl to use pem in this case. A P12 must be used instead. | |
openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem -certfile ca.pem | |
curl --cert cert.pfx:mypassword https://192.168.99.100:2375 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment