Creating Certificates
Hi all...
I read the API entry for java.security.cert.Certificate, but I'm not entirely clear on how I can go about actually creating a certificate. It seems I need a base64-encoded file to take in as an input stream. Is there a way to create my own self-signed certificate from scratch (and public and private key pair while we're at it)?
Thanks,
t0phy
[388 byte] By [
t0phy] at [2007-9-26 1:25:32]

on the command line type all in one line the stuff without a dash you changeaccept for keytool:
keytool -genkey -alias JavaMaster -keypass javam123
-keystore purejava -storepass purej123
when you press enter you will answer questions
this will generate a public/private key pair and a self signed certificate
you sign jar file by typing:
jarsigner -keystore purejava -signedjar signedMyThing.jar
MyThing.jar JavaMaster
press enter and give passwords
to get a copy of your certificate type:
keytool -export -keystore purejava -alias JavaMaster
-file JavaMaster.cer
if you want to see fingerprint type:
keytool -printcert -file JavaMaster.cer
The user then just types:
keytool -import -alias User -file JavaMaster.cer -keystore userstore
then press enter and answer questions
I hope this is what you were looking for.