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!

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top