Class RelatedCertificateDescriptor
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.RelatedCertificateDescriptor
- All Implemented Interfaces:
ASN1Encodable, Encodable
Descriptor for a related certificate, as defined by
draft-ietf-lamps-certdiscovery-04 (A Mechanism for X.509 Certificate Discovery).
Carried as the value of an
OtherName (type-id
BCObjectIdentifiers.id_on_relatedCertificateDescriptor) inside the
accessLocation GeneralName of an AccessDescription whose
accessMethod is
BCObjectIdentifiers.id_ad_certDiscovery, sitting in turn inside
the SubjectInfoAccess extension (Extension.subjectInfoAccess).
RelatedCertificateDescriptor ::= SEQUENCE {
method CertDiscoveryMethod,
signatureAlgorithm [0] AlgorithmIdentifier{SIGNATURE-ALGORITHM, {...}} OPTIONAL,
publicKeyAlgorithm [1] AlgorithmIdentifier{PUBLIC-KEY, {...}} OPTIONAL,
certHash [2] RelatedCertificate OPTIONAL
}
The module is defined with EXPLICIT TAGS, so the three optional fields are
explicitly tagged. certHash is the RFC 9763 RelatedCertificate
structure, a hash over the entire Referenced Certificate. The draft requires
that none of the optional fields is present when the method is
byInclusion; this class carries what it is given and leaves that
rule to the caller.-
Constructor Summary
ConstructorsConstructorDescriptionRelatedCertificateDescriptor(CertDiscoveryMethod method, AlgorithmIdentifier signatureAlgorithm, AlgorithmIdentifier publicKeyAlgorithm, RelatedCertificate certHash) -
Method Summary
Modifier and TypeMethodDescriptionstatic RelatedCertificateDescriptor[]fromExtensions(Extensions extensions) Walk the SubjectInfoAccess extension of the suppliedExtensionsand return everyRelatedCertificateDescriptorit carries (each AccessDescription whose accessMethod isBCObjectIdentifiers.id_ad_certDiscoveryand whose accessLocation is an OtherName of typeBCObjectIdentifiers.id_on_relatedCertificateDescriptor).Return the RFC 9763 hash of the Referenced Certificate, ornullif absent.static RelatedCertificateDescriptorgetInstance(Object obj) Method providing a primitive representation of this object suitable for encoding.Methods inherited from class ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
RelatedCertificateDescriptor
public RelatedCertificateDescriptor(CertDiscoveryMethod method, AlgorithmIdentifier signatureAlgorithm, AlgorithmIdentifier publicKeyAlgorithm, RelatedCertificate certHash) -
RelatedCertificateDescriptor
-
-
Method Details
-
getInstance
-
fromExtensions
Walk the SubjectInfoAccess extension of the suppliedExtensionsand return everyRelatedCertificateDescriptorit carries (each AccessDescription whose accessMethod isBCObjectIdentifiers.id_ad_certDiscoveryand whose accessLocation is an OtherName of typeBCObjectIdentifiers.id_on_relatedCertificateDescriptor).- Returns:
- an array, never
null; empty when the extension is absent or carries no certificate-discovery descriptors.
-
getMethod
-
getSignatureAlgorithm
-
getPublicKeyAlgorithm
-
getCertHash
Return the RFC 9763 hash of the Referenced Certificate, ornullif absent. -
toASN1Primitive
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-