Question

I've been trying to find a good complete example of how to create both key and trust stores programatically in Java. Could somebody please show me an example or provide some links to such examples? The things I've found in Google all seem to show either how to use the command-line tool, or how to work with existing key/trust stores and I would like to be able to do this through my code (and not use the default cacert in from the JRE).

Many thanks in advance!

Était-ce utile?

La solution

It's just an application of java.security.KeyStore, nothing magical about it. There's sample code at the top of its Javadoc.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top