public class RelatedCertificateDescriptorBuilder
extends java.lang.Object
RelatedCertificateDescriptor structure
defined by draft-ietf-lamps-certdiscovery, plus the wrapping required to
place it in a SubjectInfoAccess extension.
Typical use, adding a "fetch the agility companion over HTTP" entry to a certificate's SubjectInfoAccess extension:
AccessDescription ad = new RelatedCertificateDescriptorBuilder()
.setMethodByUri("https://example.com/companion.cer")
.setIntent(BCObjectIdentifiers.id_rcd_agility)
.setSignatureAlgorithm(sigAlg)
.setPublicKeyAlgorithm(spkiAlg)
.buildAccessDescription();
// ad goes into a SEQUENCE OF AccessDescription added as the
// SubjectInfoAccess extension on an X509v3CertificateBuilder.
RelatedCertificateDescriptor.fromExtensions(org.bouncycastle.asn1.x509.Extensions)| Constructor and Description |
|---|
RelatedCertificateDescriptorBuilder() |
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.x509.RelatedCertificateDescriptor |
build()
Build the bare descriptor.
|
org.bouncycastle.asn1.x509.AccessDescription |
buildAccessDescription()
Build an
AccessDescription suitable for adding to a
SubjectInfoAccess extension: accessMethod is
BCObjectIdentifiers.id_ad_certDiscovery, accessLocation is an
otherName GeneralName whose type-id is
BCObjectIdentifiers.id_on_relatedCertificateDescriptor and
whose value is the descriptor built from the current builder state. |
RelatedCertificateDescriptorBuilder |
setIntent(org.bouncycastle.asn1.ASN1ObjectIdentifier intent)
Set the optional DiscoveryIntentId (an OID under
BCObjectIdentifiers.id_rcd: agility, redundancy, dual,
privKeyStmt or self). |
RelatedCertificateDescriptorBuilder |
setMethod(org.bouncycastle.asn1.x509.CertDiscoveryMethod method) |
RelatedCertificateDescriptorBuilder |
setMethodByInclusion(org.bouncycastle.asn1.x509.Certificate certificate)
Convenience for
setMethod(CertDiscoveryMethod.byInclusion(cert)). |
RelatedCertificateDescriptorBuilder |
setMethodByInclusion(X509CertificateHolder certificate)
Convenience for
setMethod(CertDiscoveryMethod.byInclusion(cert)). |
RelatedCertificateDescriptorBuilder |
setMethodByLocalPolicy()
Convenience for
setMethod(CertDiscoveryMethod.byLocalPolicy()). |
RelatedCertificateDescriptorBuilder |
setMethodByUri(java.lang.String uri)
Convenience for
setMethod(CertDiscoveryMethod.byUri(uri)). |
RelatedCertificateDescriptorBuilder |
setPublicKeyAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier publicKeyAlgorithm) |
RelatedCertificateDescriptorBuilder |
setSignatureAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureAlgorithm) |
public RelatedCertificateDescriptorBuilder setMethod(org.bouncycastle.asn1.x509.CertDiscoveryMethod method)
public RelatedCertificateDescriptorBuilder setMethodByUri(java.lang.String uri)
setMethod(CertDiscoveryMethod.byUri(uri)).public RelatedCertificateDescriptorBuilder setMethodByInclusion(X509CertificateHolder certificate)
setMethod(CertDiscoveryMethod.byInclusion(cert)).public RelatedCertificateDescriptorBuilder setMethodByInclusion(org.bouncycastle.asn1.x509.Certificate certificate)
setMethod(CertDiscoveryMethod.byInclusion(cert)).public RelatedCertificateDescriptorBuilder setMethodByLocalPolicy()
setMethod(CertDiscoveryMethod.byLocalPolicy()).public RelatedCertificateDescriptorBuilder setIntent(org.bouncycastle.asn1.ASN1ObjectIdentifier intent)
BCObjectIdentifiers.id_rcd: agility, redundancy, dual,
privKeyStmt or self).public RelatedCertificateDescriptorBuilder setSignatureAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureAlgorithm)
public RelatedCertificateDescriptorBuilder setPublicKeyAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier publicKeyAlgorithm)
public org.bouncycastle.asn1.x509.RelatedCertificateDescriptor build()
public org.bouncycastle.asn1.x509.AccessDescription buildAccessDescription()
AccessDescription suitable for adding to a
SubjectInfoAccess extension: accessMethod is
BCObjectIdentifiers.id_ad_certDiscovery, accessLocation is an
otherName GeneralName whose type-id is
BCObjectIdentifiers.id_on_relatedCertificateDescriptor and
whose value is the descriptor built from the current builder state.