문제

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