iaik.x509.extensions.qualified
Class QCStatements

java.lang.Object
  |
  +--iaik.x509.V3Extension
        |
        +--iaik.x509.extensions.qualified.QCStatements

public class QCStatements
extends V3Extension

This class implements the QCStatements Extension.

The QCStatements extension is a private internet extension introduced by the PKIX Qualified Certificate Profile.

The QCStatements extension is associated with a specific certificateExtension object identifier, derived from:

     id-pkix  OBJECT IDENTIFIER  ::=
             { iso(1) identified-organization(3) dod(6) internet(1)
                     security(5) mechanisms(5) pkix(7) }

     id-pe  OBJECT IDENTIFIER  ::=  { id-pkix 1 }

     id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 3 }
 

which corresponds to the OID string "1.3.6.1.5.5.7.1.3".

The Qualified Certificate profile specifies the QCStatements extension for including defined statements related to a qualified certificate.
ASN.1 definition:

 QCStatements ::= SEQUENCE OF QCStatement
 

Each QC statement itsself consists of an object identifier and an optional statement info identified by the object identifer (statement ID):

 QCStatement ::= SEQUENCE {
   statementId OBJECT IDENTIFIER,
   statementInfo ANY DEFINED BY statementId OPTIONAL }
 
The QCStatement type is implemented by class QCStatement which includes a static part to be used for registering implementations for particular (private) statement infos. A statement info may be implemented by extending the abstract QCStatementInfo class and registering it by calling the static register method of class QCStatement, e.g.:
 public class MyQCStatementInfo extends QCStatementInfo {
 ...
 // the statement id:
   public static final ObjectID statementID = ...;
 ...
 }
 ...
 // register the implementation:
 QCStatement.register(MyQCStatementInfo.statementID, MyQCStatementInfo.class);
 
The Qualified Certificate Profile currently defines one statement info which already is implemented and registered: For any desired QCStatementInfo to be included into a qualified certificate create a QCStatement object and subsequently add the QCStatement objects to a QCStatements certificate extension. The following example creates a QCStatement for a SemanticsInformation statement info and adds it to a QCStatements extension:
 ObjectID semanticsIdentifier = ...;
 GeneralName[] nameRegistrationAuthorities = ...;
 // create the SemanticsInformation:
 SemanticsInformation semanticsInformation = 
   new SemanticsInformation(semanticsIdentifier, nameRegistrationAuthorities);
 // create a QCStatement for the SemanticsInformation:
 QCStatement[] qcStatements = ...;
 qcStatements[0] = new QCStatement(semanticsInformation);
 // add any further QCStatements
 ...
 // Create a QCStatements extension from the QCStatements:
 QCStatements qcStatementsExt = new QCStatements(qcStatements);
 
For adding a QCStatements extension object to a QualifiedCertificate, use the addExtension or setQCStatements method of the QualifiedCertificate class:

 QualifiedCertificate cert = new QualifiedCertificate();
   ...
 cert.setQCStatements(qcStatementsExt);
 

Version:
File Revision 11
See Also:
QCStatementInfo, QCStatement

Field Summary
static ObjectID oid
          The object identifier of this QCStatements extension.
 
Fields inherited from class iaik.x509.V3Extension
critical
 
Constructor Summary
QCStatements()
          Default constructor.
QCStatements(QCStatement[] qcStatements)
          Creates an QCStatements object and adds the given QCStatement objects.
 
Method Summary
 ObjectID getObjectID()
          Returns the object ID of this QCStatements extension
 QCStatement[] getQCStatements()
          Returns the QCStatement objects included in this QCStatements extension.
 QCStatement getQCStatements(ObjectID statementID)
          Searches this QCStatements extension for an QCStatement with the given statementID.
 int hashCode()
          Returns a hashcode for this identity.
 void init(ASN1Object obj)
          Inits this QCStatements implementation with an ASN1object representing the value of this extension.
 void setQCStatements(QCStatement[] qcStatements)
          Sets the QCStatement objects of this QCStatements extension.
 ASN1Object toASN1Object()
          Returns an ASN1Object representing the value of this QCStatements extension object.
 String toString()
          Returns a string that represents the contents of this QCStatements extension.
 
Methods inherited from class iaik.x509.V3Extension
getName, isCritical, setCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

public static final ObjectID oid
The object identifier of this QCStatements extension. The corresponding OID string is "1.3.6.1.5.5.5.7.1.3".
Constructor Detail

QCStatements

public QCStatements()
Default constructor. Creates an empty QCStatements object.

QCStatements

public QCStatements(QCStatement[] qcStatements)
Creates an QCStatements object and adds the given QCStatement objects.
Parameters:
qcStatements - the QCStatement objects to be included into this QCStatements extension
Method Detail

getObjectID

public ObjectID getObjectID()
Returns the object ID of this QCStatements extension
Overrides:
getObjectID in class V3Extension
Returns:
the object ID

setQCStatements

public void setQCStatements(QCStatement[] qcStatements)
Sets the QCStatement objects of this QCStatements extension.
Parameters:
qcStatements - the QCStatement objects to be included into this QCStatements extension

getQCStatements

public QCStatement[] getQCStatements()
Returns the QCStatement objects included in this QCStatements extension.
Returns:
the QCStatement objects included in this QCStatements, the array may be null if no statements are included

getQCStatements

public QCStatement getQCStatements(ObjectID statementID)
Searches this QCStatements extension for an QCStatement with the given statementID.
Parameters:
statementID - the statementID to search for
Returns:
the (first) QCStatement object with the given statementID, or null if no statement with the requested ID is included

init

public void init(ASN1Object obj)
          throws X509ExtensionException
Inits this QCStatements implementation with an ASN1object representing the value of this extension.

The given ASN1Object consits of a Sequence of QCStatement objects included in the QCStatements object.

The given ASN1Object is the one created by toASN1Object().

This method is used by the X509Extensions class when parsing the ASN.1 representation of a certificate for properly initializing an included QCStatements extension. This method initializes the extension only with its value, but not with its critical specification. For that reason, this method shall not be explicitly called by an application.

Overrides:
init in class V3Extension
Parameters:
obj - the QCStatements as ASN1Object
Throws:
X509ExtensionException - if the extension could not be parsed

toASN1Object

public ASN1Object toASN1Object()
                        throws X509ExtensionException
Returns an ASN1Object representing the value of this QCStatements extension object.

The ASN1Object is an ASN.1 Sequence including any QCStatement that has been added to this QCStatements object.

 QCStatements ::= SEQUENCE OF QCStatement
 
Overrides:
toASN1Object in class V3Extension
Returns:
the value of this QCStatements as ASN1Object

hashCode

public int hashCode()
Returns a hashcode for this identity.
Overrides:
hashCode in class V3Extension
Returns:
a hash code for this identity

toString

public String toString()
Returns a string that represents the contents of this QCStatements extension.
Overrides:
toString in class Object
Returns:
the string representation

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).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK