public class QcType extends QCStatementInfo
QcType
QCStatementInfo.
The QcType statement info is associated with a specific statement identifier, derived from:
id-etsi-qcs OBJECT IDENTIFIER ::= { itu-t(0) identified-organization(4) etsi(0) id-qc-profile(1862) 1 } id-etsi-qcs-QcType OBJECT IDENTIFIER ::= { id-etsi-qcs 6 }
which corresponds to the OID string "0.4.0.1862.1.6".
The ETSI Profiles for Trust Service Providers issuing certificates, Part 5, Extension
for Qualified Certificates profile (ETSI EN 319 412-5) specifies the
QcType statement info for declaring that a EU qualified certificate is issued as one
or more specific types according to Annexes I, III or IV of the Regulation (EU) No 910/2014 [i.8]
when used in combination with the qcStatement as defined in clause 4.2.1
.
When used on its own it indicates that it is used for the purposes of electronic signatures, seals
or web sites for "non-qualified certificates" within the context of Regulation (EU) No 910/2014 [i.8]..
[i.8] Regulation (EU) No 910/2014 of the European Parliament and of the Council on electronic identification and trust services for electronic transactions in the internal market and repealing Directive 1999/93/EC.
ASN.1 definition:
QcType::= SEQUENCE OF OBJECT IDENTIFIER (id-etsi-qct-esign | id-etsi-qct-eseal | id-etsi-qct-web, ...) -- QC type identifiers id-etsi-qct-esign OBJECT IDENTIFIER ::= { id-etsi-qcs-QcType 1 } -- Certificate for electronic signatures as defined in Regulation (EU) No 910/2014 id-etsi-qct-eseal OBJECT IDENTIFIER ::= { id-etsi-qcs-QcType 2 } -- Certificate for electronic seals as defined in Regulation (EU) No 910/2014 id-etsi-qct-web OBJECT IDENTIFIER ::= { id-etsi-qcs-QcType 3 } -- Certificate for website authentication as defined in Regulation (EU) No 910/2014
Supply the qc type identifier(s) when creating
a QcType
object. Subsequently create a QCStatement
object for the QcType and add the QCStatement to
a QCStatements
certificate extension, e.g.:
ObjectID qcTypeID = QcType.ID_ETSI_QCT_ESIGN; // create the QcType: QcType qcType = new QcType(qcTypeID); // create a QCStatement for the QcType QCStatement[] qcStatements = ...; qcStatements[0] = new QCStatement(qcType); // 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);
When parsing a QcType statement from the QCStatements extension of a qualified certificate
you may get
all included qc type identifiers or ask
if some particular qc type identifier is included, e.g.:
// the input stream from which to parse the certificate InputStream is = ...; // create qualified certificate QualifiedCertificate qualCert = new QualifiedCertificate(is); ... // get QCStatements extension QCStatements qcStatementsExtension = userCert.getQCStatements(); // get QcType QCStatementInfo QcType qcType = (QcType)qcStatementsExtension.getStatementInfo(QcType.statementID); if (qcType.contains(QcType.ID_ETSI_QCT_ESIGN)) { System.out.println("Certificate for electronic signatures as defined in Regulation (EU) No 910/2014"); }
QCStatementInfo
,
QCStatement
,
QCStatements
Modifier and Type | Field and Description |
---|---|
static ObjectID |
ID_ETSI_QCT_ESEAL
QC type identifier
id-etsi-qct-eseal identifying
a certificate for electronic seals as defined in Regulation (EU) No 910/2014. |
static ObjectID |
ID_ETSI_QCT_ESIGN
QC type identifier
id-etsi-qct-esign identifying
a certificate for electronic signatures as defined in Regulation (EU) No 910/2014. |
static ObjectID |
ID_ETSI_QCT_WEB
QC type identifier
id-etsi-qct-web identifying
a certificate for website authentication as defined in Regulation (EU) No 910/2014. |
static ObjectID |
statementID
The statement id for this QcType statement info.
|
Constructor and Description |
---|
QcType()
Default constructor.
|
QcType(ObjectID qcTypeID)
Creates QcType for the given QcTypeID.
|
QcType(ObjectID[] qcTypeIDs)
Creates QcType for the given set of QCTypeIDs.
|
Modifier and Type | Method and Description |
---|---|
void |
addQcTypeID(ObjectID qcTypeID)
Adds the given QcTypeID.
|
void |
clear()
Clears the list of QcTypeIDs.
|
boolean |
contains(ObjectID qcTypeID)
Checks if the given QcTypeID is included in the list of QcTypeIDs.
|
void |
decode(ASN1Object obj)
Decodes the QcType.
|
ObjectID[] |
getAllQcTypeIDs()
Gets all included QCTypeIDs.
|
ObjectID |
getStatementID()
Returns the statement ID identifying this
QcType
statement info. |
boolean |
removeQcTypeID(ObjectID qcTypeID)
Removes the given QcTypeID.
|
void |
setQcTypeIDs(ObjectID[] qcTypeIDs)
Sets all QcTypeIDs to be included in this QcType.
|
ASN1Object |
toASN1Object()
Returns an ASN.1 representation of this QcType.
|
java.lang.String |
toString()
Returns a string representation of the statement info
|
getName
public static final ObjectID statementID
public static final ObjectID ID_ETSI_QCT_ESIGN
id-etsi-qct-esign
identifying
a certificate for electronic signatures as defined in Regulation (EU) No 910/2014.public static final ObjectID ID_ETSI_QCT_ESEAL
id-etsi-qct-eseal
identifying
a certificate for electronic seals as defined in Regulation (EU) No 910/2014.public static final ObjectID ID_ETSI_QCT_WEB
id-etsi-qct-web
identifying
a certificate for website authentication as defined in Regulation (EU) No 910/2014.public QcType()
public QcType(ObjectID qcTypeID)
qcTypeID
- the QCTypeIDpublic QcType(ObjectID[] qcTypeIDs)
qcTypeIDs
- the QCTypeIDspublic void addQcTypeID(ObjectID qcTypeID)
qcTypeID
- the QcTypeID to be addedpublic void setQcTypeIDs(ObjectID[] qcTypeIDs)
qcTypeIDs
- the QcTypeIDs to be setpublic boolean removeQcTypeID(ObjectID qcTypeID)
qcTypeID
- the QcTypeID to be removedtrue
if the given QCTypeID has been successfully
removed; false
if the given QCTypeID has not been
removed because it is not included in the QCTypeID list, or if
null
is given as qcTypeID
public void clear()
public boolean contains(ObjectID qcTypeID)
qcTypeID
- the QcTypeID to be removedtrue
if the given QCTypeID is included; false
if the given QCTypeID is not included in the QCTypeID list or if
null
has been given as qcTypeID
public ObjectID getStatementID()
QcType
statement info.
The corresponding OID string is "0.4.0.1862.1.6".getStatementID
in class QCStatementInfo
QcType
statement infopublic ObjectID[] getAllQcTypeIDs()
public void decode(ASN1Object obj) throws CodingException
decode
in class QCStatementInfo
obj
- the QcType as ASN1ObjectCodingException
- if the ASN1Object cannot be parsedpublic ASN1Object toASN1Object()
toASN1Object
in class QCStatementInfo
public java.lang.String toString()
toString
in class QCStatementInfo