hsac-fitnesse-fixtures icon indicating copy to clipboard operation
hsac-fitnesse-fixtures copied to clipboard

Client certificate not sent to the server.

Open GLHENO opened this issue 4 years ago • 4 comments

First of all, thanks for this fixture. When I try to send the client certificate, it doesn't seen to be sent to the server. On the server side, I use Apache httpd to set the client cert in "SSL_CLIENT_CERT" header and this header is empty (null). The Apache https configuration is correct as I can test this with curl command.

` !define POST_BODY { {{{ Test Message }}} }

|script |http client setup | |$originalClient=|get original client| |set client certificate from| files/test-cert.p12 |with password | changeme |key password | changeme | |configure http test |

|script |http test | |set content type|text/plain; Charset=UTF-8 | |post |${POST_BODY}| to| https://dummyhost.example.com/api?isTest=true| |check |response status|200 | |show |response | `

GLHENO avatar May 13 '20 13:05 GLHENO

try changing files/test-cert.p12 to http://files/test-cert.p12 or provide a full path to the certificate

tcnh avatar May 13 '20 13:05 tcnh

@tcnh I tried your suggestion. Unfortunately, it is still not sent.

`User-Agent: nl.hsac.fitnesse.fixture.util.HttpClient

SSL_CLIENT_CERT: (null)`

GLHENO avatar May 13 '20 13:05 GLHENO

Hmm, I think adding your P12 certificate to a JKS keystore may solve your problem..

Could you try:

keytool -importkeystore -srckeystore test-cert.p12 -srcstoretype PKCS12 -destkeystore test-keystore.jks

and use test-keystore.jks instead of your P12 cert?

tcnh avatar May 13 '20 14:05 tcnh

Tried that without luck. sorry.

GLHENO avatar May 13 '20 14:05 GLHENO