|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.asn1.structures.PolicyQualifierInfo
This class implements the ASN.1 type PolicyQualifierInfo
.
The PolicyQualifierInfo
type is used for defining the information
specified by the PolicyInformation
terms of the X.509v3 Certificate
Policies extension, indicating the policy under which the certificate has been
issued and the purposes for which the certificate may be used.
certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformationPolicyInformation ::= SEQUENCE { policyIdentifier CertPolicyId, policyQualifiers SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo OPTIONAL }
CertPolicyId ::= OBJECT IDENTIFIER
PolicyQualifierInfo ::= SEQUENCE { policyQualifierId PolicyQualifierId, qualifier ANY DEFINED BY policyQualifierId }
The PKIX X.509 Certificate and CRL profile (RFC 3280) defines two policy qualifiers types:
Qualifier ::= CHOICE { cPSuri CPSuri, -- CPS Pointer qualifier userNotice UserNotice -- User Notice qualifier }
The CPS Pointer qualifier indicates a (URI) pointer to a Certification Practice Statement (CPS) published by the CA:
CPSuri ::= IA5String
The User Notice qualifier may include a noticeRef
field
identifying an organization and a particular textual statement prepared by that
organization, or/and an explicitText
string field of up to 200
characters including the textual statement directly into the certificate:
UserNotice ::= SEQUENCE { noticeRef NoticeReference OPTIONAL, explicitText DisplayText OPTIONAL}
NoticeReference ::= SEQUENCE { organization DisplayText, noticeNumbers SEQUENCE OF INTEGER }
DisplayText ::= CHOICE { ia5String IA5String (SIZE (1..200)), visibleString VisibleString (SIZE (1..200)), bmpString BMPString (SIZE (1..200)), utf8String UTF8String (SIZE (1..200)) }
The policy qualifier IDs for the CPS Pointer and User Notice qualifiers are defined as follows:
id-qt ::= { id-pkix 2 } -- pkix arc for qualifier types
id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 } id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
PolicyQualifierId ::= OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
More information can be found in the PKIX internet draft draft-ietf-pkix-ipki-part1-06.txt, section 4.2.1.5 "Certificate Policies".
When creating a PolicyQualifierInfo
object to be set for a PolicyInformation
, use a proper
constructor for either specifying a CPS Pointer
qualifier or a User Notice
qualifier, e.g.:
int[] notice_nr = {12, 35}; ObjectID iaik_policy_id = new ObjectID("1.2.3.4.5", "iaik_policy_id"); PolicyQualifierInfo policy_qualifier = new PolicyQualifierInfo("IAIK", notice_nr, null);
PolicyInformation
,
CertificatePolicies
Constructor Summary | |
PolicyQualifierInfo(ASN1Object policyQualifierInfo)
Constructs a PolicyQualifierInfo from an ASN1Object.
|
|
PolicyQualifierInfo(ASN1Object organization,
int[] noticeNumbers,
ASN1Object explicitText)
Creates a new PolicyQualifierInfo from a user notice qualifier
specified by reference information and/or an explicit text.
|
|
PolicyQualifierInfo(String CpsUri)
Creates a new PolicyQualifierInfo from a CPS Pointer qualifier.
|
|
PolicyQualifierInfo(String organization,
int[] noticeNumbers,
String explicitText)
Creates a new PolicyQualifierInfo from a user notice qualifier
specified by reference information and/or an explicit text.
|
Method Summary | |
String |
getCPSuri()
Gets the CPSUri or null if this PolicyQualifierInfo
is not a CPS Pointer. |
ASN1Object |
getExplicitTest()
Deprecated. only for compability to former versions, please use getExplicitText |
ASN1Object |
getExplicitText()
Gets the explicitText value if this PolicyQualifierInfo is a User Notice Qualifier and the explicitText field is set. |
int[] |
getNoticeNumbers()
Gets the notice numbers if this PolicyQualifierInfo is a User Notice Qualifier and notice numbers are set. |
ASN1Object |
getOrganization()
Gets the organization value if this PolicyQualifierInfo is a User Notice Qualifier and the orgnization field is set. |
ObjectID |
getPolicyQualifier()
Gets the ID of this PolicyQualifierInfo. |
ASN1Object |
getQualifierValue()
Gets the value (of the qualifier field) of this PolicyQualifierInfo. |
ASN1Object |
toASN1Object()
Returns this PolicyQualifierInfo as ASN1Object. |
String |
toString()
Returns a string that represents the contents of PolicyQualifierInfo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PolicyQualifierInfo(String CpsUri)
PolicyQualifierInfo
from a CPS Pointer qualifier.
The CPS Pointer qualifier contains a pointer to a Certification
Practice Statement (CPS) published by the CA. The pointer is in
the form of an URI.CpsUri
- the pointer as URIpublic PolicyQualifierInfo(String organization, int[] noticeNumbers, String explicitText)
PolicyQualifierInfo
from a user notice qualifier
specified by reference information and/or an explicit text.
A user notice qualifier has two optional fields:
UserNotice ::= SEQUENCE { noticeRef NoticeReference OPTIONAL, explicitText DisplayText OPTIONAL}
A notice reference consists of an organization name and a notice number identifying a particular textual statement prepared by this organization:
NoticeReference ::= SEQUENCE { organization DisplayText, noticeNumbers SEQUENCE OF INTEGER }
An explicitText field includes the textual statement directly in the certificate. The explicitText field is a string with a maximum size of 200 characters:
DisplayText ::= CHOICE { ia5String IA5String (SIZE (1..200)), visibleString VisibleString (SIZE (1..200)), bmpString BMPString (SIZE (1..200)), utf8String UTF8String (SIZE (1..200)) }
By default organization
is encoded as ASN.1 IA5String and
explicitText
as VisibleString.
organization
- the organization [or null
if not needed;
sets noticeNumbers also to null
]noticeNumbers
- notice numbers [or null
if not needed;
sets organization also to null
]explicitText
- the textual statement or null
if not neededpublic PolicyQualifierInfo(ASN1Object organization, int[] noticeNumbers, ASN1Object explicitText)
PolicyQualifierInfo
from a user notice qualifier
specified by reference information and/or an explicit text.
A user notice qualifier has two optional fields:
UserNotice ::= SEQUENCE { noticeRef NoticeReference OPTIONAL, explicitText DisplayText OPTIONAL}
A notice reference consists of an organization name and a notice number identifying a particular textual statement prepared by this organization:
NoticeReference ::= SEQUENCE { organization DisplayText, noticeNumbers SEQUENCE OF INTEGER }
An explicitText field includes the textual statement directly in the certificate. The explicitText field is a string with a maximum size of 200 characters:
DisplayText ::= CHOICE { ia5String IA5String (SIZE (1..200)), visibleString VisibleString (SIZE (1..200)), bmpString BMPString (SIZE (1..200)), utf8String UTF8String (SIZE (1..200)) }
This constructor may be used when taking another encoding type than IA5String for
organization
and/or VisibleString for explicitText
.
organization
- the organization [or null
if not needed;
sets noticeNumbers also to null
];noticeNumbers
- notice numbers [or null
if not needed;
sets organization also to null
]explicitText
- the textual statement or null
if not needed;public PolicyQualifierInfo(ASN1Object policyQualifierInfo) throws CodingException
PolicyQualifierInfo
from an ASN1Object.
The supplied ASN1Object represents an already existing PolicyQualifierInfo
that may have been created by means of the toASN1Object()
method.
policyQualifierInfo
- the PolicyQualifierInfo
as ASN1ObjectCodingException
- if the ASN1Object is not a PolicyQualifierInfoMethod Detail |
public ObjectID getPolicyQualifier()
public ASN1Object getQualifierValue()
public String getCPSuri()
null
if this PolicyQualifierInfo
is not a CPS Pointer.null
public ASN1Object getOrganization()
null
public ASN1Object getExplicitTest()
getExplicitText
null
public ASN1Object getExplicitText()
null
public int[] getNoticeNumbers()
null
public ASN1Object toASN1Object()
PolicyQualifierInfo
as ASN1Object.public String toString()
PolicyQualifierInfo
toString
in class Object
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |