Skip to content

Instantly share code, notes, and snippets.

@sgonyea
Created August 29, 2012 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgonyea/3516770 to your computer and use it in GitHub Desktop.
Save sgonyea/3516770 to your computer and use it in GitHub Desktop.

The following works:

openssl s_client -key private_key.key -cert cert.crt -connect "client-auth.myhost.com:443"

wget --no-check-certificate --certificate=cert.crt --private-key=private_key.key https://client-auth.myhost.com:443/path

Yet curl does not seem to work:

curl -v -s -k --key private_key.key --cert cert.crt "https://client-auth.myhost.com:443/path"

When curl attempts to do client auth, the server spits out an OpenSSL Error Code 27 (cert not trusted):

2012/08/27 21:17:42 [info] 39756#0: *15 client SSL certificate verify error: (27:certificate not trusted) while reading client request headers, client: 127.0.0.1, server: client-auth.myhost.com, request: "GET /path/logincu HTTP/1.1", host: "client-auth.myhost.com"
@sgonyea
Copy link
Author

sgonyea commented Aug 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment