use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initCertificatePolicies.
private void initCertificatePolicies(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.certificatePolicies;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
CertificatePolicies extConf = (CertificatePolicies) getExtensionValue(type, extensionsType, CertificatePolicies.class);
if (extConf == null) {
return;
}
List<CertificatePolicyInformation> policyInfos = XmlX509CertprofileUtil.buildCertificatePolicies(extConf);
org.bouncycastle.asn1.x509.CertificatePolicies value = XmlX509CertprofileUtil.createCertificatePolicies(policyInfos);
this.certificatePolicies = new ExtensionValue(extensionControls.get(type).isCritical(), value);
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initNameConstraints.
private void initNameConstraints(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.nameConstraints;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
NameConstraints extConf = (NameConstraints) getExtensionValue(type, extensionsType, NameConstraints.class);
if (extConf == null) {
return;
}
org.bouncycastle.asn1.x509.NameConstraints value = XmlX509CertprofileUtil.buildNameConstrains(extConf);
this.nameConstraints = new ExtensionValue(extensionControls.get(type).isCritical(), value);
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initAuthorityKeyIdentifier.
private void initAuthorityKeyIdentifier(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.authorityKeyIdentifier;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
AuthorityKeyIdentifier extConf = (AuthorityKeyIdentifier) getExtensionValue(type, extensionsType, AuthorityKeyIdentifier.class);
if (extConf == null) {
return;
}
this.includeIssuerAndSerialInAki = extConf.isIncludeIssuerAndSerial();
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initBiometricInfo.
private void initBiometricInfo(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.biometricInfo;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
BiometricInfo extConf = (BiometricInfo) getExtensionValue(type, extensionsType, BiometricInfo.class);
if (extConf == null) {
return;
}
try {
this.biometricInfo = new BiometricInfoOption(extConf);
} catch (NoSuchAlgorithmException ex) {
throw new CertprofileException("NoSuchAlgorithmException: " + ex.getMessage());
}
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initBasicConstraints.
private void initBasicConstraints(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.basicConstraints;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
BasicConstraints extConf = (BasicConstraints) getExtensionValue(type, extensionsType, BasicConstraints.class);
if (extConf == null) {
return;
}
this.pathLen = extConf.getPathLen();
}
Aggregations