I am looking for an example or tutorial to generate X509 Certificates using BC in Java.
A lot of example are having/using deprecated API. I gave a look at BC, but it doesn't show which class does what or no proper documentation/example.
Please If any one you are having idea about it, please point me to a tutorial where I can use BC to generate X509 Certificates. [Generation and writing the public and private keys to files]
The X509v3CertificateBuilder seems like the class to use. There are some examples of using the new API on the bouncycastle wiki.
Creation of KeyPairGenerator:
Creation of keyPair:
Converting things to PEM (can be written to file):
Creation of X509Certificate:
Signing:
CertificateFactory: