public class X509v2AttributeCertificateBuilder
extends java.lang.Object
Constructor and Description |
---|
X509v2AttributeCertificateBuilder(AttributeCertificateHolder holder,
AttributeCertificateIssuer issuer,
java.math.BigInteger serialNumber,
java.util.Date notBefore,
java.util.Date notAfter)
Base constructor.
|
X509v2AttributeCertificateBuilder(AttributeCertificateHolder holder,
AttributeCertificateIssuer issuer,
java.math.BigInteger serialNumber,
java.util.Date notBefore,
java.util.Date notAfter,
java.util.Locale dateLocale)
Base constructor with locale for interpreting dates.
|
X509v2AttributeCertificateBuilder(X509AttributeCertificateHolder template)
Create a builder for a version 2 attribute certificate, initialised with another certificate.
|
Modifier and Type | Method and Description |
---|---|
X509v2AttributeCertificateBuilder |
addAttribute(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType,
org.bouncycastle.asn1.ASN1Encodable attrValue)
Add an attribute to the certification request we are building.
|
X509v2AttributeCertificateBuilder |
addAttribute(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType,
org.bouncycastle.asn1.ASN1Encodable[] attrValues)
Add an attribute with multiple values to the certification request we are building.
|
X509v2AttributeCertificateBuilder |
addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
org.bouncycastle.asn1.ASN1Encodable value)
Add a given extension field for the standard extensions tag made up of the passed in parameters.
|
X509v2AttributeCertificateBuilder |
addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
byte[] encodedValue)
Add a given extension field for the standard extensions using a byte encoding of the
extension value.
|
X509v2AttributeCertificateBuilder |
addExtension(org.bouncycastle.asn1.x509.Extension extension)
Add a given extension field for the standard extensions.
|
X509AttributeCertificateHolder |
build(ContentSigner signer)
Generate an X509 certificate, based on the current issuer and subject
using the passed in signer.
|
org.bouncycastle.asn1.x509.Extension |
getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Return the current value of the extension for OID.
|
boolean |
hasExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Return if the extension indicated by OID is present.
|
X509v2AttributeCertificateBuilder |
removeExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Remove the extension indicated by OID.
|
X509v2AttributeCertificateBuilder |
replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
org.bouncycastle.asn1.ASN1Encodable value)
Replace the extension field for the passed in extension's extension ID
with a new version.
|
X509v2AttributeCertificateBuilder |
replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
byte[] encodedValue)
Replace a given extension field for the standard extensions tag (tag 3) with the passed in
byte encoded extension value.
|
X509v2AttributeCertificateBuilder |
replaceExtension(org.bouncycastle.asn1.x509.Extension extension)
Replace the extension field for the passed in extension's extension ID
with a new version.
|
void |
setIssuerUniqueId(boolean[] iui) |
public X509v2AttributeCertificateBuilder(AttributeCertificateHolder holder, AttributeCertificateIssuer issuer, java.math.BigInteger serialNumber, java.util.Date notBefore, java.util.Date notAfter)
holder
- holder certificate detailsissuer
- issuer of this attribute certificate.serialNumber
- serial number of this attribute certificate.notBefore
- the date before which the certificate is not valid.notAfter
- the date after which the certificate is not valid.public X509v2AttributeCertificateBuilder(AttributeCertificateHolder holder, AttributeCertificateIssuer issuer, java.math.BigInteger serialNumber, java.util.Date notBefore, java.util.Date notAfter, java.util.Locale dateLocale)
holder
- holder certificate detailsissuer
- issuer of this attribute certificate.serialNumber
- serial number of this attribute certificate.notBefore
- the date before which the certificate is not valid.notAfter
- the date after which the certificate is not valid.dateLocale
- locale to be used for date interpretation.public X509v2AttributeCertificateBuilder(X509AttributeCertificateHolder template)
template
- template certificate to base the new one on.public boolean hasExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
oid
- the OID for the extension of interest.public org.bouncycastle.asn1.x509.Extension getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
oid
- the OID for the extension we want to fetch.public X509v2AttributeCertificateBuilder addAttribute(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType, org.bouncycastle.asn1.ASN1Encodable attrValue)
attrType
- the OID giving the type of the attribute.attrValue
- the ASN.1 structure that forms the value of the attribute.public X509v2AttributeCertificateBuilder addAttribute(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType, org.bouncycastle.asn1.ASN1Encodable[] attrValues)
attrType
- the OID giving the type of the attribute.attrValues
- an array of ASN.1 structures that form the value of the attribute.public void setIssuerUniqueId(boolean[] iui)
public X509v2AttributeCertificateBuilder addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value) throws CertIOException
oid
- the OID defining the extension type.isCritical
- true if the extension is critical, false otherwise.value
- the ASN.1 structure that forms the extension's value.CertIOException
public X509v2AttributeCertificateBuilder addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] encodedValue) throws CertIOException
oid
- the OID defining the extension type.isCritical
- true if the extension is critical, false otherwise.encodedValue
- a byte array representing the encoding of the extension value.CertIOException
public X509v2AttributeCertificateBuilder addExtension(org.bouncycastle.asn1.x509.Extension extension) throws CertIOException
extension
- the full extension value.CertIOException
public X509v2AttributeCertificateBuilder replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value) throws CertIOException
oid
- the OID defining the extension type.isCritical
- true if the extension is critical, false otherwise.value
- the ASN.1 structure that forms the extension's value.CertIOException
- if there is an issue with the new extension value.java.lang.IllegalArgumentException
- if the extension to be replaced is not present.public X509v2AttributeCertificateBuilder replaceExtension(org.bouncycastle.asn1.x509.Extension extension) throws CertIOException
extension
- the full extension value.CertIOException
- if there is an issue with the new extension value.java.lang.IllegalArgumentException
- if the extension to be replaced is not present.public X509v2AttributeCertificateBuilder replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] encodedValue) throws CertIOException
oid
- the OID defining the extension type.isCritical
- true if the extension is critical, false otherwise.encodedValue
- a byte array representing the encoding of the extension value.CertIOException
- if there is an issue with the new extension value.java.lang.IllegalArgumentException
- if the extension to be replaced is not present.public X509v2AttributeCertificateBuilder removeExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
oid
- the OID of the extension to be removed.java.lang.IllegalArgumentException
- if the extension to be removed is not present.public X509AttributeCertificateHolder build(ContentSigner signer)
signer
- the content signer to be used to generate the signature validating the certificate.