Вопрос

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!

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top