public class QCStatements extends V3Extension
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);
QCStatementInfo,
QCStatement| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
oid
The object identifier of this QCStatements extension.
|
critical| Constructor and Description |
|---|
QCStatements()
Default constructor.
|
QCStatements(QCStatement[] qcStatements)
Creates an
QCStatements object and adds
the given QCStatement objects. |
| Modifier and Type | Method and Description |
|---|---|
ObjectID |
getObjectID()
Returns the object ID of this
QCStatements extension |
QCStatement[] |
getQCStatements()
Returns the QCStatement objects included in this QCStatements extension.
|
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. |
java.lang.String |
toString()
Returns a string that represents the contents of
this
QCStatements extension. |
getName, isCritical, setCriticalpublic static final ObjectID oid
public QCStatements()
QCStatements object.public QCStatements(QCStatement[] qcStatements)
QCStatements object and adds
the given QCStatement objects.qcStatements - the QCStatement objects to be included into
this QCStatements extensionpublic ObjectID getObjectID()
QCStatements extensiongetObjectID in class V3Extensionpublic void setQCStatements(QCStatement[] qcStatements)
qcStatements - the QCStatement objects to be included into this
QCStatements extensionpublic QCStatement[] getQCStatements()
public void init(ASN1Object obj) throws X509ExtensionException
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.
init in class V3Extensionobj - the QCStatements as ASN1ObjectX509ExtensionException - if the extension could not be parsedpublic ASN1Object toASN1Object() throws X509ExtensionException
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
toASN1Object in class V3ExtensionQCStatements as ASN1ObjectX509ExtensionException - if the extension could not be createdpublic int hashCode()
hashCode in class V3Extensionpublic java.lang.String toString()
QCStatements extension.toString in class java.lang.Object