I’m looking at coding up a very simple server using an ssl connection – but had two questions
How can i use the java keytool in windows to generate a certificate I can use for testing? Most tutorials i can see (for echoservers etc) suggest i run the following command, which doesnt appear to work in the command prompt (running win 7)?
keytool -keystore mySrvKeystore -keypasswd 123456 -genkey -keyalg RSA -alias mycert
Also considering ill be doing some basic AES and RSA based encryption – is there an advantage in using bouncy castle instead of the tools provided off the shelf in the JCE?
Many thanks,
The
-genkeyoption must come first.If JCE supports the algorithms you want to use (and it does support AES and RSA), switching to BouncyCastle is extra hassle with no benefit. BouncyCastle would be a great choice if you need something like ECDH, or if you want to use its S/MIME or PGP libraries.