public BcX509v3TBSCertificateBuilder setExtensions(CertifiedPublicKey issuer, PublicKeyParameters subject,
        X509Extensions extensions1, X509Extensions extensions2) throws IOException
    {
        DefaultX509ExtensionBuilder extBuilder = new DefaultX509ExtensionBuilder();

        extBuilder.addAuthorityKeyIdentifier(issuer)
            .addSubjectKeyIdentifier(subject)
            .addExtensions(extensions1)
            .addExtensions(extensions2);

        if (!extBuilder.isEmpty())
        {
            this.tbsGen.setExtensions(((BcX509Extensions) extBuilder.build()).getExtensions());
        }
        return this;
    }
public BcX509v3TBSCertificateBuilder setExtensions ( CertifiedPublicKey issuer , PublicKeyParameters subject , X509Extensions extensions1 , X509Extensions extensions2 ) throws IOException { DefaultX509ExtensionBuilder extBuilder = new DefaultX509ExtensionBuilder ( ) ; extBuilder . addAuthorityKeyIdentifier ( issuer ) . addSubjectKeyIdentifier ( subject ) . addExtensions ( extensions1 ) . addExtensions ( extensions2 ) ; if ( ! extBuilder . isEmpty ( ) ) { this . tbsGen . setExtensions ( ( ( BcX509Extensions ) extBuilder . build ( ) ) . getExtensions ( ) ) ; } return this ; }
Set the extensions of a v3 certificate.

@param issuer the issuer certified public key to compute the Authority Key Identifier, or null for none.
@param subject the subject certified public key parameters to compute the Subject Key Identifier, or null for
none.
@param extensions1 the common extensions set.
@param extensions2 the subject extensions set.
@return this builder to allow chaining.
@throws IOException on encoding error.