Possible Duplicate:
Generate certificates, public and private keys with Java
I want to generate private key and self signed certificate using Java code and export it into files. When I searched through net I am getting details only achieving through openssl or keytool commands, but not through java code. I would like not to use any third party library.
Below are the commands which creates key and self signed certificate, which I want to do the same using java code.
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
openssl req -x509 -in server.req -text -key server.key -out server.crt
Any kind of help or suggestion will be really appreciated.