Top Description Constructors Methods
org.bouncycastle.cert.jcajce

public Class JcaX509v3CertificateBuilder

extends X509v3CertificateBuilder
Class Inheritance
Imports
java.math.BigInteger, java.security.PublicKey, java.security.cert.CertificateEncodingException, .X509Certificate, java.util.Date, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, .Time, org.bouncycastle.cert.X509v3CertificateBuilder

JCA helper class to allow JCA objects to be used in the construction of a Version 3 certificate.

Constructor Summary

AccessConstructor and Description
public
JcaX509v3CertificateBuilder(X500Name
X500Name representing the issuer of this certificate.
issuer
,
BigInteger
the serial number for the certificate.
serial
,
Date
date before which the certificate is not valid.
notBefore
,
Date
date after which the certificate is not valid.
notAfter
,
X500Name
X500Name representing the subject of this certificate.
subject
,
PublicKey
the public key to be associated with the certificate.
publicKey
)

Initialise the builder using a PublicKey.

public
JcaX509v3CertificateBuilder(X500Name
X500Name representing the issuer of this certificate.
issuer
,
BigInteger
the serial number for the certificate.
serial
,
Time
Time before which the certificate is not valid.
notBefore
,
Time
Time after which the certificate is not valid.
notAfter
,
X500Name
X500Name representing the subject of this certificate.
subject
,
PublicKey
the public key to be associated with the certificate.
publicKey
)

Initialise the builder using a PublicKey.

public
JcaX509v3CertificateBuilder(X500Principal
principal representing the issuer of this certificate.
issuer
,
BigInteger
the serial number for the certificate.
serial
,
Date
date before which the certificate is not valid.
notBefore
,
Date
date after which the certificate is not valid.
notAfter
,
X500Principal
principal representing the subject of this certificate.
subject
,
PublicKey
the public key to be associated with the certificate.
publicKey
)

Initialise the builder using X500Principal objects and a PublicKey.

public
JcaX509v3CertificateBuilder(X509Certificate
certificate who's subject is the issuer of the certificate we are building.
issuerCert
,
BigInteger
the serial number for the certificate.
serial
,
Date
date before which the certificate is not valid.
notBefore
,
Date
date after which the certificate is not valid.
notAfter
,
X500Principal
principal representing the subject of this certificate.
subject
,
PublicKey
the public key to be associated with the certificate.
publicKey
)

Initialise the builder using the subject from the passed in issuerCert as the issuer, as well as passing through and converting the other objects provided.

public
JcaX509v3CertificateBuilder(X509Certificate
certificate who's subject is the issuer of the certificate we are building.
issuerCert
,
BigInteger
the serial number for the certificate.
serial
,
Date
date before which the certificate is not valid.
notBefore
,
Date
date after which the certificate is not valid.
notAfter
,
X500Name
principal representing the subject of this certificate.
subject
,
PublicKey
the public key to be associated with the certificate.
publicKey
)

Initialise the builder using the subject from the passed in issuerCert as the issuer, as well as passing through and converting the other objects provided.

public
JcaX509v3CertificateBuilder(X509Certificate
template certificate to base the new one on.
template
)

Create a builder for a version 3 certificate, initialised with another certificate.

Method Summary

Modifier and TypeMethod and Description
public JcaX509v3CertificateBuilder

Returns:

the builder instance.
copyAndAddExtension
(ASN1ObjectIdentifier
the type of the extension to be copied.
oid
,
boolean
true if the extension is to be marked critical, false otherwise.
critical
,
X509Certificate
the source of the extension to be copied.
certificate
)

Add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.

Inherited from org.bouncycastle.cert.X509v3CertificateBuilder:
addExtensionaddExtensionaddExtensionbuildcopyAndAddExtensiongetExtensionhasExtensionremoveExtensionreplaceExtensionreplaceExtensionreplaceExtensionsetIssuerUniqueIDsetSubjectUniqueID

Constructor Detail

JcaX509v3CertificateBuilderback to summary
public JcaX509v3CertificateBuilder(X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, X500Name subject, PublicKey publicKey)

Initialise the builder using a PublicKey.

Parameters
issuer:X500Name

X500Name representing the issuer of this certificate.

serial:BigInteger

the serial number for the certificate.

notBefore:Date

date before which the certificate is not valid.

notAfter:Date

date after which the certificate is not valid.

subject:X500Name

X500Name representing the subject of this certificate.

publicKey:PublicKey

the public key to be associated with the certificate.

JcaX509v3CertificateBuilderback to summary
public JcaX509v3CertificateBuilder(X500Name issuer, BigInteger serial, Time notBefore, Time notAfter, X500Name subject, PublicKey publicKey)

Initialise the builder using a PublicKey.

Parameters
issuer:X500Name

X500Name representing the issuer of this certificate.

serial:BigInteger

the serial number for the certificate.

notBefore:Time

Time before which the certificate is not valid.

notAfter:Time

Time after which the certificate is not valid.

subject:X500Name

X500Name representing the subject of this certificate.

publicKey:PublicKey

the public key to be associated with the certificate.

JcaX509v3CertificateBuilderback to summary
public JcaX509v3CertificateBuilder(X500Principal issuer, BigInteger serial, Date notBefore, Date notAfter, X500Principal subject, PublicKey publicKey)

Initialise the builder using X500Principal objects and a PublicKey.

Parameters
issuer:X500Principal

principal representing the issuer of this certificate.

serial:BigInteger

the serial number for the certificate.

notBefore:Date

date before which the certificate is not valid.

notAfter:Date

date after which the certificate is not valid.

subject:X500Principal

principal representing the subject of this certificate.

publicKey:PublicKey

the public key to be associated with the certificate.

JcaX509v3CertificateBuilderback to summary
public JcaX509v3CertificateBuilder(X509Certificate issuerCert, BigInteger serial, Date notBefore, Date notAfter, X500Principal subject, PublicKey publicKey)

Initialise the builder using the subject from the passed in issuerCert as the issuer, as well as passing through and converting the other objects provided.

Parameters
issuerCert:X509Certificate

certificate who's subject is the issuer of the certificate we are building.

serial:BigInteger

the serial number for the certificate.

notBefore:Date

date before which the certificate is not valid.

notAfter:Date

date after which the certificate is not valid.

subject:X500Principal

principal representing the subject of this certificate.

publicKey:PublicKey

the public key to be associated with the certificate.

JcaX509v3CertificateBuilderback to summary
public JcaX509v3CertificateBuilder(X509Certificate issuerCert, BigInteger serial, Date notBefore, Date notAfter, X500Name subject, PublicKey publicKey)

Initialise the builder using the subject from the passed in issuerCert as the issuer, as well as passing through and converting the other objects provided.

Parameters
issuerCert:X509Certificate

certificate who's subject is the issuer of the certificate we are building.

serial:BigInteger

the serial number for the certificate.

notBefore:Date

date before which the certificate is not valid.

notAfter:Date

date after which the certificate is not valid.

subject:X500Name

principal representing the subject of this certificate.

publicKey:PublicKey

the public key to be associated with the certificate.

JcaX509v3CertificateBuilderback to summary
public JcaX509v3CertificateBuilder(X509Certificate template) throws CertificateEncodingException

Create a builder for a version 3 certificate, initialised with another certificate.

Parameters
template:X509Certificate

template certificate to base the new one on.

Method Detail

copyAndAddExtensionback to summary
public JcaX509v3CertificateBuilder copyAndAddExtension(ASN1ObjectIdentifier oid, boolean critical, X509Certificate certificate) throws CertificateEncodingException

Add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.

Parameters
oid:ASN1ObjectIdentifier

the type of the extension to be copied.

critical:boolean

true if the extension is to be marked critical, false otherwise.

certificate:X509Certificate

the source of the extension to be copied.

Returns:JcaX509v3CertificateBuilder

the builder instance.