use of org.xipki.ca.certprofile.x509.jaxb.BiometricTypeType in project xipki by xipki.
the class ProfileConfCreatorDemo method createBiometricInfo.
// method createQcStatements
private static ExtensionValueType createBiometricInfo() {
BiometricInfo extValue = new BiometricInfo();
// type
// predefined image (0)
BiometricTypeType type = new BiometricTypeType();
extValue.getType().add(type);
IntWithDescType predefined = new IntWithDescType();
predefined.setValue(0);
predefined.setDescription("image");
type.setPredefined(predefined);
// predefined handwritten-signature(1)
type = new BiometricTypeType();
predefined = new IntWithDescType();
predefined.setValue(1);
predefined.setDescription("handwritten-signature");
type.setPredefined(predefined);
extValue.getType().add(type);
// OID
type = new BiometricTypeType();
type.setOid(createOidType(new ASN1ObjectIdentifier("1.2.3.4.5.6"), "dummy biometric type"));
extValue.getType().add(type);
// hash algorithm
HashAlgo[] hashAlgos = new HashAlgo[] { HashAlgo.SHA256, HashAlgo.SHA384 };
for (HashAlgo hashAlgo : hashAlgos) {
extValue.getHashAlgorithm().add(createOidType(hashAlgo.getOid(), hashAlgo.getName()));
}
extValue.setIncludeSourceDataUri(TripleState.REQUIRED);
return createExtensionValueType(extValue);
}
Aggregations