Class CertDiscoveryMethod
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.CertDiscoveryMethod
- All Implemented Interfaces:
ASN1Choice, ASN1Encodable, Encodable
The method used to retrieve a related certificate, as defined by
draft-ietf-lamps-certdiscovery-04 (A Mechanism for X.509 Certificate Discovery).
CertDiscoveryMethod ::= CHOICE {
byUri IA5String,
byInclusion Certificate,
byLocalPolicy NULL,
byOther [0] INSTANCE OF OTHER-DISCOVERY-METHOD
}
OTHER-DISCOVERY-METHOD ::= TYPE-IDENTIFIER
The module is defined with EXPLICIT TAGS, so byOther is an explicitly
tagged SEQUENCE { type-id OBJECT IDENTIFIER, value [0] EXPLICIT ANY DEFINED BY type-id },
the same shape as an X.509 OtherName.
byUri carries the URI from which the Referenced Certificate may be
retrieved, byInclusion embeds the Referenced Certificate directly,
byLocalPolicy signals that the relying party is expected to resolve
it through local configuration, and byOther carries a method defined
outside the draft, identified by its type-id.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAlternative index forbyInclusion.static final intAlternative index forbyLocalPolicy.static final intAlternative index forbyOther(carried on the wire under context tag [0]).static final intAlternative index forbyUri. -
Method Summary
Modifier and TypeMethodDescriptionstatic CertDiscoveryMethodbyInclusion(Certificate certificate) Create abyInclusiondiscovery method embedding the supplied certificate directly.static CertDiscoveryMethodCreate abyLocalPolicydiscovery method (the wire form is ASN.1 NULL; the relying party resolves the certificate through local configuration).static CertDiscoveryMethodbyOther(ASN1ObjectIdentifier methodType, ASN1Encodable methodValue) Create abyOtherdiscovery method, an instance of the OTHER-DISCOVERY-METHOD information object class.static CertDiscoveryMethodCreate abyUridiscovery method carrying the supplied URI.Return the certificate carried by abyInclusionmethod, ornullfor the other alternatives.static CertDiscoveryMethodgetInstance(Object obj) Return the type-id of abyOthermethod, ornullfor the other alternatives.Return the value of abyOthermethod, ornullfor the other alternatives.intgetType()getUri()Return the URI carried by abyUrimethod, ornullfor the other alternatives.Method providing a primitive representation of this object suitable for encoding.Methods inherited from class ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Field Details
-
byUri
public static final int byUriAlternative index forbyUri.- See Also:
-
byInclusion
public static final int byInclusionAlternative index forbyInclusion.- See Also:
-
byLocalPolicy
public static final int byLocalPolicyAlternative index forbyLocalPolicy.- See Also:
-
byOther
public static final int byOtherAlternative index forbyOther(carried on the wire under context tag [0]).- See Also:
-
-
Method Details
-
byUri
Create abyUridiscovery method carrying the supplied URI. -
byInclusion
Create abyInclusiondiscovery method embedding the supplied certificate directly. -
byLocalPolicy
Create abyLocalPolicydiscovery method (the wire form is ASN.1 NULL; the relying party resolves the certificate through local configuration). -
byOther
public static CertDiscoveryMethod byOther(ASN1ObjectIdentifier methodType, ASN1Encodable methodValue) Create abyOtherdiscovery method, an instance of the OTHER-DISCOVERY-METHOD information object class.- Parameters:
methodType- the type-id identifying the method.methodValue- the value associated with that type-id.
-
getInstance
-
getType
public int getType() -
getUri
Return the URI carried by abyUrimethod, ornullfor the other alternatives. -
getCertificate
Return the certificate carried by abyInclusionmethod, ornullfor the other alternatives. -
getOtherMethodType
Return the type-id of abyOthermethod, ornullfor the other alternatives. -
getOtherMethodValue
Return the value of abyOthermethod, ornullfor the other alternatives. -
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.
-