public class V2Form extends java.lang.Object implements AttCertIssuer
V2Form.
The
Internet Attribute Certificate Profile for Authorization
(RFC 5755) specifies the V2Form type as a TO BE USED option for
identifying the issuer of
an attribute certificate (entity who signs the attribute certificate):
AttCertIssuer ::= CHOICE {
v1Form GeneralNames, -- MUST NOT be used in this
-- profile
v2Form [0] V2Form -- v2 only
}
V2Form ::= SEQUENCE {
issuerName GeneralNames OPTIONAL,
baseCertificateID [0] IssuerSerial OPTIONAL,
objectDigestInfo [1] ObjectDigestInfo OPTIONAL
-- issuerName MUST be present in this profile
-- baseCertificateID and objectDigestInfo MUST NOT
-- be present in this profile
}
ACs conforming to this profile MUST use the v2Form choice, which MUST
contain one and only one GeneralName in the issuerName, which MUST
contain a non-empty distinguished name in the directoryName field.
This means that all AC issuers MUST have non-empty distinguished
names. ACs conforming to this profile MUST omit the
baseCertificateID and objectDigestInfo fields.
Part of the reason for the use of the v2Form containing only an
issuerName is that it means that the AC issuer does not have to know
which PKC the AC verifier will use for it (the AC issuer). Using the
baseCertificateID field to reference the AC issuer would mean that
the AC verifier would have to trust the PKC that the AC issuer chose
(for itself) at AC creation time.
When creating a V2Form an application may supply
the required GeneralNames structure or specify the
distingished name of the issuer, e.g.:
Name issuer = ...; V2Form v2Form = new V2Form(issuer);
AttributeCertificate,
IssuerSerial,
ObjectDigestInfo,
GeneralNames,
V1FormV1_FORM, V2_FORM| Constructor and Description |
|---|
V2Form(ASN1Object obj)
Creates a V2Form from its ASN.1 representation.
|
V2Form(GeneralNames issuerName)
Creates a V2Form from the given GeneralNames.
|
V2Form(GeneralNames issuerName,
IssuerSerial baseCertificateID,
ObjectDigestInfo objectDigestInfo)
Creates a
V2Form object from given
issuerName, baseCertificateID and ObjectDigestInfo. |
V2Form(Name issuerName)
Creates a V2Form for the given issuer name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes a V2Form from its ASN.1 representation.
|
boolean |
equals(java.lang.Object obj)
Compares this
V2Form to the specified object. |
IssuerSerial |
getBaseCertificateID()
Gets the baseCertificateID of this V2Form, if set.
|
Name |
getIssuerDN()
Gets the issuer distinguished name, if included in this
V2Form.
|
GeneralNames |
getIssuerName()
Gets the IssuerName of this V2Form, if set.
|
ObjectDigestInfo |
getObjectDigestInfo()
Gets the objectDigestInfo of this V2Form, if set.
|
int |
getVForm()
Returns 2 (v2Form -- the version this AttcertIssuer represents).
|
int |
hashCode()
Returns a hashcode for this V2Form.
|
ASN1Object |
toASN1Object()
Returns this V2Form as ASN1Object.
|
java.lang.String |
toString()
Returns a string giving some information about this
V2Form object. |
public V2Form(GeneralNames issuerName)
issuerName - the GeneralNames identifying the AC issuerpublic V2Form(Name issuerName)
A GeneralName for the given directoryName is internally created, according to the requirements of RFC 5755:
ACs conforming to this profile MUST use the v2Form choice, which MUST contain one and only one GeneralName in the issuerName, which MUST contain a non-empty distinguished name in the directoryName field. This means that all AC issuers MUST have non-empty distinguished names.
issuerName - the name of the AC issuerpublic V2Form(GeneralNames issuerName, IssuerSerial baseCertificateID, ObjectDigestInfo objectDigestInfo)
V2Form object from given
issuerName, baseCertificateID and ObjectDigestInfo.issuerName - the issuer namebaseCertificateID - the baseCertificateIDobjectDigestInfo - the ObjectDigestInfopublic V2Form(ASN1Object obj) throws CodingException
obj - the V2Form as ASN1ObjectCodingException - if an decoding/parsing error occurs or the
the information contained is not appropriate
for a V2Formpublic GeneralNames getIssuerName()
public Name getIssuerDN()
issuerName
component (as required by the PKIX Attribute certificate profile).
If yes, it checks if the issuerName GeneralNames
contains a GeneralName of type directoryName
(as required by the PKIX Attribute certificate profile).null if no dn is included
in this V1Formpublic IssuerSerial getBaseCertificateID()
public ObjectDigestInfo getObjectDigestInfo()
public ASN1Object toASN1Object()
toASN1Object in interface AttCertIssuerpublic void decode(ASN1Object obj) throws CodingException
decode in interface AttCertIssuerobj - the V2Form as ASN1ObjectCodingException - if an decoding/parsing error occurs or the
the information contained is not appropriate
for a V2Formpublic boolean equals(java.lang.Object obj)
V2Form to the specified object.equals in interface AttCertIssuerequals in class java.lang.Objectobj - the object to compare this V2Form
against.true, if the given object is equal to this
V2Form,
false otherwisepublic int hashCode()
hashCode in interface AttCertIssuerhashCode in class java.lang.Objectpublic int getVForm()
getVForm in interface AttCertIssuerpublic java.lang.String toString()
V2Form object.toString in interface AttCertIssuertoString in class java.lang.Object