Use org.bouncycastle.x509.X509V3CertificateGenerator in BouncyCastleCertProcessingFactory.