I stuck with problem how to authorize java client application that consume rest api and need to autorize by ceritication issued by internal CA. So I have CA certificate, then Client certificate and client private key generate by OpenSSL. I'm looking for guide/ example how to tell OkHttpClient to sign request with Client certificate to bypass Apache SSL autorization. All is done on internal network. Can you guys help me?! I tried so much ways that I'm lost. I need good example. The stack is Retrofit with OkHTTPClient.
here is example via cURL what I need to implement in java in smart way https://downey.io/notes/dev/curl-using-mutual-tls/
** SOLUTION BELOW **
how to add SSL certificates to okHttp mutual TLS connection?
In my case was mistake in private key format. I got pkcs1 and it must by pkcs8.