S
Simon
Hello -
I'm trying to write a simple Java client program that tries to establish a
connection with a webserver over HTTPS. The webserver requires 2-way
authentication, ie. the server authenticates itself to the server and
vice-versa. I have a client certificate in the form of a P7B file. The
server certificate is self-signed. I want to keep the client program as
simple as possible, as it will be used to debug contentious communications
issues.
Is it possible to do this simply using the HttpsURLConnection class? It
seems to have no way to import a certificate on the fly. It seems to require
the use of other classes such as KeyStore, which adds complexity and reduces
clarity.
Can anyone offer advice?
I'm trying to write a simple Java client program that tries to establish a
connection with a webserver over HTTPS. The webserver requires 2-way
authentication, ie. the server authenticates itself to the server and
vice-versa. I have a client certificate in the form of a P7B file. The
server certificate is self-signed. I want to keep the client program as
simple as possible, as it will be used to debug contentious communications
issues.
Is it possible to do this simply using the HttpsURLConnection class? It
seems to have no way to import a certificate on the fly. It seems to require
the use of other classes such as KeyStore, which adds complexity and reduces
clarity.
Can anyone offer advice?