public TBSCertificate buildTBSCertificate ( PrincipalIndentifier subjectName , PublicKeyParameters subject , X509CertificateParameters parameters ) throws IOException { PrincipalIndentifier issuerName ; CertifiedPublicKey issuer = null ; if ( this . signer instanceof CertifyingSigner ) { issuer = ( ( CertifyingSigner ) this . signer ) . getCertifier ( ) ; issuerName = issuer . getSubject ( ) ; } else { issuerName = subjectName ; } BcX509TBSCertificateBuilder builder = getTBSCertificateBuilder ( ) ; builder . setSerialNumber ( new BigInteger ( 128 , this . random ) ) . setIssuer ( issuerName ) ; addValidityDates ( builder ) ; extendsTBSCertificate ( builder , issuer , subjectName , subject , parameters ) ; return builder . setSubject ( subjectName ) . setSubjectPublicKeyInfo ( subject ) . setSignature ( this . signer ) . build ( ) ; }
Build the TBS Certificate .