Bouncy Castle Cryptography Library 1.87

org.bouncycastle.asn1.x509
Class RelatedCertificateDescriptor

java.lang.Object
  extended byorg.bouncycastle.asn1.ASN1Object
      extended byorg.bouncycastle.asn1.x509.RelatedCertificateDescriptor
All Implemented Interfaces:
ASN1Encodable, Encodable

public class RelatedCertificateDescriptor
extends ASN1Object

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 GeneralName of an AccessDescription whose 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. 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 ; this class carries what it is given and leaves that rule to the caller.


Constructor Summary
RelatedCertificateDescriptor(CertDiscoveryMethod method)
           
RelatedCertificateDescriptor(CertDiscoveryMethod method, AlgorithmIdentifier signatureAlgorithm, AlgorithmIdentifier publicKeyAlgorithm, RelatedCertificate certHash)
           
 
Method Summary
static RelatedCertificateDescriptor[] fromExtensions(Extensions extensions)
          Walk the SubjectInfoAccess extension of the supplied Extensions and return every RelatedCertificateDescriptor it carries (each AccessDescription whose accessMethod is BCObjectIdentifiers.id_ad_certDiscovery and whose accessLocation is an OtherName of type BCObjectIdentifiers.id_on_relatedCertificateDescriptor).
 RelatedCertificate getCertHash()
          Return the RFC 9763 hash of the Referenced Certificate, or if absent.
static RelatedCertificateDescriptor getInstance(java.lang.Object obj)
           
 CertDiscoveryMethod getMethod()
           
 AlgorithmIdentifier getPublicKeyAlgorithm()
           
 AlgorithmIdentifier getSignatureAlgorithm()
           
 ASN1Primitive toASN1Primitive()
          Method providing a primitive representation of this object suitable for encoding.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelatedCertificateDescriptor

public RelatedCertificateDescriptor(CertDiscoveryMethod method,
                                    AlgorithmIdentifier signatureAlgorithm,
                                    AlgorithmIdentifier publicKeyAlgorithm,
                                    RelatedCertificate certHash)

RelatedCertificateDescriptor

public RelatedCertificateDescriptor(CertDiscoveryMethod method)
Method Detail

getInstance

public static RelatedCertificateDescriptor getInstance(java.lang.Object obj)

fromExtensions

public static RelatedCertificateDescriptor[] fromExtensions(Extensions extensions)
Walk the SubjectInfoAccess extension of the supplied Extensions and return every RelatedCertificateDescriptor it carries (each AccessDescription whose accessMethod is BCObjectIdentifiers.id_ad_certDiscovery and whose accessLocation is an OtherName of type BCObjectIdentifiers.id_on_relatedCertificateDescriptor).

Returns:
an array, never ; empty when the extension is absent or carries no certificate-discovery descriptors.

getMethod

public CertDiscoveryMethod getMethod()

getSignatureAlgorithm

public AlgorithmIdentifier getSignatureAlgorithm()

getPublicKeyAlgorithm

public AlgorithmIdentifier getPublicKeyAlgorithm()

getCertHash

public RelatedCertificate getCertHash()
Return the RFC 9763 hash of the Referenced Certificate, or if absent.


toASN1Primitive

public ASN1Primitive toASN1Primitive()
Description copied from class: ASN1Object
Method providing a primitive representation of this object suitable for encoding.

Specified by:
toASN1Primitive in interface ASN1Encodable
Specified by:
toASN1Primitive in class ASN1Object
Returns:
a primitive representation of this object.

Bouncy Castle Cryptography Library 1.87