public class C509CertificateBuilder
extends java.lang.Object
A CBOR re-encoded certificate (type 3) is not built directly - issue an X.509
certificate in the usual way and convert it with
C509Certificate.fromX509Certificate(org.bouncycastle.asn1.x509.Certificate, C509ConversionOptions).
| Constructor and Description |
|---|
C509CertificateBuilder(org.bouncycastle.asn1.x500.X500Name issuer,
java.math.BigInteger serialNumber,
java.util.Date notBefore,
java.util.Date notAfter,
org.bouncycastle.asn1.x500.X500Name subject,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo)
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
C509CertificateBuilder |
addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
org.bouncycastle.asn1.ASN1Encodable value)
Add a given extension field for the standard extensions tag.
|
C509CertificateBuilder |
addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
byte[] encodedValue)
Add a given extension field for the standard extensions tag, with the value
already encoded.
|
C509CertificateHolder |
build(ContentSigner signer)
Generate the certificate, signing the TBSCertificate CBOR sequence with the
given signer.
|
C509CertificateBuilder |
setConversionOptions(org.bouncycastle.cbor.c509.C509ConversionOptions options)
Set the conversion options - point compression in particular.
|
public C509CertificateBuilder(org.bouncycastle.asn1.x500.X500Name issuer,
java.math.BigInteger serialNumber,
java.util.Date notBefore,
java.util.Date notAfter,
org.bouncycastle.asn1.x500.X500Name subject,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo)
issuer - the certificate issuer.serialNumber - the certificate serial number.notBefore - the date before which the certificate is not valid.notAfter - the date after which the certificate is not valid, or null for
no well-defined expiration date.subject - the certificate subject.subjectPublicKeyInfo - the info structure for the public key to be
associated with this certificate.public C509CertificateBuilder setConversionOptions(org.bouncycastle.cbor.c509.C509ConversionOptions options)
public C509CertificateBuilder addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value) throws CertIOException
CertIOExceptionpublic C509CertificateBuilder addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] encodedValue)
public C509CertificateHolder build(ContentSigner signer) throws CertIOException
CertIOException