public class BiometricInfo extends V3Extension
BiometricInfo
Extension.
The BiometricInfo
qualified certificate extension is specified
by the PKIX
Qualified Certificate Profile (RFC 3739).
The BiometricInfo 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 2 }
which corresponds to the OID string "1.3.6.1.5.5.7.1.2".
The Qualified Certificate profile specifies the BiometricInfo extension for
including biometric information into a certificate.
ASN.1 definition:
BiometricSyntax ::= SEQUENCE OF BiometricData
A BiometricData
object holds the hash value corresponding to
some specific biometric information which itself is not included but may be
referenced by means of an URI:
BiometricData ::= SEQUENCE { typeOfBiometricData TypeOfBiometricData, hashAlgorithm AlgorithmIdentifier, biometricDataHash OCTET STRING, sourceDataUri IA5String OPTIONAL }The type of biometric data may either be a predefined one or an arbitrary one, latter indicated by an object identifier:
TypeOfBiometricData ::= CHOICE { predefinedBiometricType PredefinedBiometricType, biometricDataOid OBJECT IDENTIFIER }
PredefinedBiometricType ::= INTEGER { picture(0), handwritten-signature(1)} (picture|handwritten-signature)
An BiometricInfo
extension object may be created by either using
the empty default constructor, or by directly supplying the BiometricData
objects to be added as instances of
BiometricData
, e.g.:
BiometricData[] biometricDatas = new BiometricData[1]; AlgorithmID hashAlgorithm = AlgorithmID.sha1; byte[] biometricDataHash = ...; biometricDatas[0] = new BiometricData(BiometricData.picture); String sourceDataUri = ...; biometricDatas[0].setBiometricDataHash(AlgorithmID.sha, sourceDataUri); // create a BiometricInfo extension object: BiometricInfo biometricInfo = new BiometricInfo(biometricDatas);
For adding a BiometricInfo
extension object to a
QualifiedCertificate, use the
addExtension
or
setBiometricInfo
method of the
QualifiedCertificate
class:
QualifiedCertificate cert = new QualifiedCertificate(); ... cert.setBiometricInfo(biometricInfo);
Modifier and Type | Field and Description |
---|---|
static ObjectID |
oid
The object identifier of this BiometricInfo extension.
|
critical
Constructor and Description |
---|
BiometricInfo()
Default constructor.
|
BiometricInfo(BiometricData[] biometricDatas)
Creates an
BiometricInfo object and adds the given
BiometricData objects. |
Modifier and Type | Method and Description |
---|---|
BiometricData[] |
getBiometricDatas()
Returns the BiometricData objects included in this BiometricInfo extension.
|
ObjectID |
getObjectID()
Returns the object ID of this
BiometricInfo extension |
int |
hashCode()
Returns a hashcode for this identity.
|
void |
init(ASN1Object obj)
Inits this
BiometricInfo implementation with an ASN1object
representing the value of this extension. |
void |
setBiometricDatas(BiometricData[] biometricDatas)
Sets the BiometricData objects of this BiometricInfo extension.
|
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
BiometricInfo extension object. |
java.lang.String |
toString()
Returns a string that represents the contents of this
BiometricInfo extension. |
getName, isCritical, setCritical
public static final ObjectID oid
public BiometricInfo()
BiometricInfo
object.
For supplying the BiometricData objects (as instances of class
BiometricData
) to be included call method
setBiometricDatas
.
public BiometricInfo(BiometricData[] biometricDatas)
BiometricInfo
object and adds the given
BiometricData objects.biometricDatas
- the BiometricData objects to be included into this BiometricInfo
extensionpublic ObjectID getObjectID()
BiometricInfo
extensiongetObjectID
in class V3Extension
public void setBiometricDatas(BiometricData[] biometricDatas)
biometricDatas
- the BiometricData objects to be included into this BiometricInfo
extensionpublic BiometricData[] getBiometricDatas()
public void init(ASN1Object obj) throws X509ExtensionException
BiometricInfo
implementation with an ASN1object
representing the value of this extension.
The given ASN1Object consists of a Sequence of BiometricData objects
included in the BiometricInfo
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 BiometricInfo 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 V3Extension
obj
- the BiometricInfo as ASN1ObjectX509ExtensionException
- if the extension could not be parsedpublic ASN1Object toASN1Object() throws X509ExtensionException
BiometricInfo
extension object.
The ASN1Object is an ASN.1 Sequence including any BiometricData that has
been added to this BiometricInfo
object.
BiometricInfoSyntax ::= SEQUENCE OF BiometricData
toASN1Object
in class V3Extension
BiometricInfo
as ASN1ObjectX509ExtensionException
- if the extension could not be createdpublic int hashCode()
hashCode
in class V3Extension
public java.lang.String toString()
BiometricInfo
extension.toString
in class java.lang.Object