I want to use mutual SSL authentication between service A and B. I'm currently implementing passing the client certificate from service A in Java. I'm using Apache DefaultHttpClient to execute my requests. I was able to retrieve the client certificate for my service A from an internal credential manager and I keep it as an array of bytes.
DefaultHttpClient client = new DefaultHttpClient();byte [] certificate = localCertManager.retrieveCert();
I have very little experience in this area and I'd appreciate your help!
I thought maybe it should be somehow passed through arguments in the HTTP client or maybe in the headers.
How do I pass the client certificate with HTTP client?