Trust onlu my selfsigned certificate in httpclient
I generated selfsigned certifiacte to use it to authenticate my web
appliaction. Clients instead of web browser use client application to
comunicate with web server. Client application uses httpclient. The
internet is full of examples of how to trust all the ssl certificates in
httpclient. I don't want to trust all certificate, I want trust only one,
my selfsigned certificate (of course every trusted certificate also). I
know that I can add my certificate to trusted keystore using keytool, but
I don't want to interface in JSSE keystore. I want to say httpclient to
trust one specific selfsigned certificate.
First question:
Is it possible?
Second question:
Described solution is ok in development environment. I'm think that is bad
practice, but I wonder that is it acceptable in production environment?
No comments:
Post a Comment