Package org.bouncycastle.asn1.x509
Class Holder
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.Holder
- All Implemented Interfaces:
ASN1Encodable
public class Holder extends ASN1Object
The Holder object.
For an v2 attribute certificate this is:
Holder ::= SEQUENCE {
baseCertificateID [0] IssuerSerial OPTIONAL,
-- the issuer and serial number of
-- the holder's Public Key Certificate
entityName [1] GeneralNames OPTIONAL,
-- the name of the claimant or role
objectDigestInfo [2] ObjectDigestInfo OPTIONAL
-- used to directly authenticate the holder,
-- for example, an executable
}
For an v1 attribute certificate this is:
subject CHOICE {
baseCertificateID [0] IssuerSerial,
-- associated with a Public Key Certificate
subjectName [1] GeneralNames },
-- associated with a name
-
Field Summary
Fields Modifier and Type Field Description static intV1_CERTIFICATE_HOLDERstatic intV2_CERTIFICATE_HOLDER -
Constructor Summary
Constructors Constructor Description Holder(GeneralNames entityName)Constructs a holder with an entityName for V2 attribute certificates.Holder(GeneralNames entityName, int version)Constructs a holder with an entityName for V2 attribute certificates or with a subjectName for V1 attribute certificates.Holder(IssuerSerial baseCertificateID)Holder(IssuerSerial baseCertificateID, int version)Constructs a holder from a IssuerSerial for a V1 or V2 certificate.Holder(ObjectDigestInfo objectDigestInfo)Constructs a holder from an object digest info. -
Method Summary
Modifier and Type Method Description IssuerSerialgetBaseCertificateID()GeneralNamesgetEntityName()Returns the entityName for an V2 attribute certificate or the subjectName for an V1 attribute certificate.static HoldergetInstance(Object obj)ObjectDigestInfogetObjectDigestInfo()intgetVersion()Returns 1 for V2 attribute certificates or 0 for V1 attribute certificates.ASN1PrimitivetoASN1Primitive()Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
-
Field Details
-
V1_CERTIFICATE_HOLDER
public static final int V1_CERTIFICATE_HOLDER- See Also:
- Constant Field Values
-
V2_CERTIFICATE_HOLDER
public static final int V2_CERTIFICATE_HOLDER- See Also:
- Constant Field Values
-
-
Constructor Details
-
Holder
-
Holder
Constructs a holder from a IssuerSerial for a V1 or V2 certificate. .- Parameters:
baseCertificateID- The IssuerSerial.version- The version of the attribute certificate.
-
Holder
Constructs a holder with an entityName for V2 attribute certificates.- Parameters:
entityName- The entity or subject name.
-
Holder
Constructs a holder with an entityName for V2 attribute certificates or with a subjectName for V1 attribute certificates.- Parameters:
entityName- The entity or subject name.version- The version of the attribute certificate.
-
Holder
Constructs a holder from an object digest info.- Parameters:
objectDigestInfo- The object digest info object.
-
-
Method Details
-
getInstance
-
getVersion
public int getVersion()Returns 1 for V2 attribute certificates or 0 for V1 attribute certificates.- Returns:
- The version of the attribute certificate.
-
getBaseCertificateID
-
getEntityName
Returns the entityName for an V2 attribute certificate or the subjectName for an V1 attribute certificate.- Returns:
- The entityname or subjectname.
-
getObjectDigestInfo
-
toASN1Primitive
- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object
-