Class RelatedCertificateDescriptorBuilder
java.lang.Object
org.bouncycastle.cert.RelatedCertificateDescriptorBuilder
Fluent builder for the
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.RelatedCertificateDescriptorbuild()Build the bare descriptor.org.bouncycastle.asn1.x509.AccessDescriptionBuild anAccessDescriptionsuitable for adding to a SubjectInfoAccess extension: accessMethod isBCObjectIdentifiers.id_ad_certDiscovery, accessLocation is anotherNameGeneralName whose type-id isBCObjectIdentifiers.id_on_relatedCertificateDescriptorand whose value is the descriptor built from the current builder state.setIntent(org.bouncycastle.asn1.ASN1ObjectIdentifier intent) Set the optional DiscoveryIntentId (an OID underBCObjectIdentifiers.id_rcd: agility, redundancy, dual, privKeyStmt or self).setMethod(org.bouncycastle.asn1.x509.CertDiscoveryMethod method) setMethodByInclusion(org.bouncycastle.asn1.x509.Certificate certificate) Convenience forsetMethod(CertDiscoveryMethod.byInclusion(cert)).setMethodByInclusion(X509CertificateHolder certificate) Convenience forsetMethod(CertDiscoveryMethod.byInclusion(cert)).Convenience forsetMethod(CertDiscoveryMethod.byLocalPolicy()).setMethodByUri(String uri) Convenience forsetMethod(CertDiscoveryMethod.byUri(uri)).setPublicKeyAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier publicKeyAlgorithm) setSignatureAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureAlgorithm)
-
Constructor Details
-
RelatedCertificateDescriptorBuilder
public RelatedCertificateDescriptorBuilder()
-
-
Method Details
-
setMethod
public RelatedCertificateDescriptorBuilder setMethod(org.bouncycastle.asn1.x509.CertDiscoveryMethod method) -
setMethodByUri
Convenience forsetMethod(CertDiscoveryMethod.byUri(uri)). -
setMethodByInclusion
Convenience forsetMethod(CertDiscoveryMethod.byInclusion(cert)). -
setMethodByInclusion
public RelatedCertificateDescriptorBuilder setMethodByInclusion(org.bouncycastle.asn1.x509.Certificate certificate) Convenience forsetMethod(CertDiscoveryMethod.byInclusion(cert)). -
setMethodByLocalPolicy
Convenience forsetMethod(CertDiscoveryMethod.byLocalPolicy()). -
setIntent
public RelatedCertificateDescriptorBuilder setIntent(org.bouncycastle.asn1.ASN1ObjectIdentifier intent) Set the optional DiscoveryIntentId (an OID underBCObjectIdentifiers.id_rcd: agility, redundancy, dual, privKeyStmt or self). -
setSignatureAlgorithm
public RelatedCertificateDescriptorBuilder setSignatureAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureAlgorithm) -
setPublicKeyAlgorithm
public RelatedCertificateDescriptorBuilder setPublicKeyAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier publicKeyAlgorithm) -
build
public org.bouncycastle.asn1.x509.RelatedCertificateDescriptor build()Build the bare descriptor. -
buildAccessDescription
public org.bouncycastle.asn1.x509.AccessDescription buildAccessDescription()Build anAccessDescriptionsuitable for adding to a SubjectInfoAccess extension: accessMethod isBCObjectIdentifiers.id_ad_certDiscovery, accessLocation is anotherNameGeneralName whose type-id isBCObjectIdentifiers.id_on_relatedCertificateDescriptorand whose value is the descriptor built from the current builder state.
-