title: Generate certificates, public and private keys with Java
body: <p>I'm looking for a java library or code to generate certificates, public and private keys
  on the fly without to use third party programs (such as openssl). </p>
  
  <p>I think something that is doeing keytool+openssl but from Java code. </p>
  
  <p>Consider a java servlet based web application secured with ssl and client authentification. 
  I want the servlet container generate client certificates (eg. pkcs12 format) on request only with Java code.</p>