|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.x509.extensions.qualified.structures.QCStatement
This class implements the QCStatement type.
The PKIX
Qualified Certificate Profile specifies the Qualified Certificate Statements
(QCStatements) extension for including defined statements related to Qualified Certificates.
The QCStatements extension simply consists of a ASN.1 SEQUENCE of QC statements:
QCStatements ::= SEQUENCE OF QCStatementEach QC statement itself 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 }This class 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, 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: Additionally the following statement infos from the ETSI qualified certificate profile are 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
,
QCStatements
Constructor Summary | |
QCStatement()
Default Constructor. |
|
QCStatement(ObjectID statementID)
Creates an QCStatement for the supplied statement ID. |
|
QCStatement(QCStatementInfo statementInfo)
Creates an QCStatement from the supplied statementInfo. |
Method Summary | |
static QCStatementInfo |
create(ObjectID statementID)
Returns the implementation of the specified statement info defined through an ASN.1 ObjectID. |
void |
decode(ASN1Object obj)
Decodes an QCStatement from its ASN.1 representation. |
ObjectID |
getStatementID()
Gets the statementID of this QCStatement. |
QCStatementInfo |
getStatementInfo()
Gets the statementInfo of this QCStatement. |
static void |
register(ObjectID statementID,
Class cl)
Registers a class for implementing a particular statement info. |
ASN1Object |
toASN1Object()
Returns this QCStatement as ASN1Object. |
String |
toString()
Returns a String representation of the QCStatement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public QCStatement()
public QCStatement(ObjectID statementID)
statementID
- the statementID of this QCStatementpublic QCStatement(QCStatementInfo statementInfo)
statementInfo
- the statementInfo of this QCStatementMethod Detail |
public static QCStatementInfo create(ObjectID statementID) throws InstantiationException
This method belongs to the static part of this class.
oid
- the ObjectID of the statement info.InstantiationException
- if the internal factory
couldn't create an instance of requested typepublic static void register(ObjectID statementID, Class cl)
This method belongs to the static part of this class.
statementID
- the statementID of the statement info to be registeredclass
- the class which implements this statement infopublic QCStatementInfo getStatementInfo()
public ObjectID getStatementID()
public void decode(ASN1Object obj) throws CodingException
UnknownQCStatementInfo
object is created for the unknown statement info
allowing to query for information about the statement info.decode
in interface ASN1Type
obj
- the QCStatement as ASN1ObjectCodingException
- if the ASN1Object cannot be parsedpublic ASN1Object toASN1Object() throws CodingException
toASN1Object
in interface ASN1Type
CodingException
- if the QCStatement cannot be represented as ASN1Objectpublic String toString()
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 |