I am attempting to connect to a remote server which requires mutual auth. I have received a .p12 file from the server, and used the following commands to generate my private key and client cert:
openssl pkcs12 -in my_dev.p12 -out clientCert.crt -nokeys -clcerts
openssl pkcs12 -in my_dev.p12 -nocerts -nodes -passin pass:mypassword | openssl rsa -out privkey.pem
And I have used the following code to setup a Manticore Client :
client = Manticore::Client.new(
pool_max: 200,
pool_max_per_route: 200,
ssl: { verify: :disable, client_key: client_key , client_cert: client_cert })
url = "https://my_url.com"
resp = client.get(url).call
The response I am getting is this:
401 Unauthorized
Unauthorized
This server could not verify that you\nare authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.
I am very new to using mutual auth, and am not sure exactly where I am going wrong. Have I extracted the clientCert and privateKey correctly ? Am I suppling the key and cert to Manticore correctly ?