Search code examples
javaopensslx509

Using OpenSSL through a Java program to issue X.509 certificates


I am writing a Java program and at this point I want to issue signed X.509 certificates to users, but first I must generate the certificates on request. From my research, I found that the simplest way to issue these certificates is via OpenSSL but I found no easy way to use it other than using Runtime.Exec which some people pointed out to be inefficient. So my question is, is there an easy way to generate X.509 certificates and sign them in Java? An example would be greatly appreciated

Thank you


Solution

  • After some research and time spent looking into this, I found that bouncycastle can be used to generate X.509 certificates fairly easily Just make sure to check the updated guide document, I was using an old one and got me confused