public static synchronized X509Certificate createX509V3Certificate(KeyPair kp, int days, X500NameBuilder issuerBuilder,
            X500NameBuilder subjectBuilder, String domain, String signAlgoritm ) throws GeneralSecurityException, IOException
    {
        return createX509V3Certificate( kp, days, issuerBuilder, subjectBuilder, domain, signAlgoritm, null );
    }
Creates an X509 version3 certificate.

@param kp           KeyPair that keeps the public and private keys for the new certificate.
@param days       time to live
@param issuerBuilder     IssuerDN builder
@param subjectBuilder    SubjectDN builder
@param domain       Domain of the server.
@param signAlgoritm Signature algorithm. This can be either a name or an OID.
@return X509 V3 Certificate
@throws GeneralSecurityException if there was a problem creating the certificate
@throws IOException if there was a problem creating the certificate
xmppserver/src/main/java/org/jivesoftware/util/CertificateManager.java