use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initAuthorizationTemplate.
private void initAuthorizationTemplate(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = ObjectIdentifiers.id_xipki_ext_authorizationTemplate;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
AuthorizationTemplate extConf = (AuthorizationTemplate) getExtensionValue(type, extensionsType, AuthorizationTemplate.class);
if (extConf == null) {
return;
}
ASN1EncodableVector vec = new ASN1EncodableVector();
vec.add(new ASN1ObjectIdentifier(extConf.getType().getValue()));
vec.add(new DEROctetString(extConf.getAccessRights().getValue()));
ASN1Encodable extValue = new DERSequence(vec);
authorizationTemplate = new ExtensionValue(extensionControls.get(type).isCritical(), extValue);
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initPolicyMappings.
private void initPolicyMappings(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.policyMappings;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
PolicyMappings extConf = (PolicyMappings) getExtensionValue(type, extensionsType, PolicyMappings.class);
if (extConf == null) {
return;
}
org.bouncycastle.asn1.x509.PolicyMappings value = XmlX509CertprofileUtil.buildPolicyMappings(extConf);
this.policyMappings = 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 initValidityModel.
private void initValidityModel(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = ObjectIdentifiers.id_extension_validityModel;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
ValidityModel extConf = (ValidityModel) getExtensionValue(type, extensionsType, ValidityModel.class);
if (extConf == null) {
return;
}
ASN1ObjectIdentifier oid = new ASN1ObjectIdentifier(extConf.getModelId().getValue());
ASN1Encodable extValue = new DERSequence(oid);
validityModel = new ExtensionValue(extensionControls.get(type).isCritical(), extValue);
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initAuthorityInfoAccess.
private void initAuthorityInfoAccess(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.authorityInfoAccess;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
AuthorityInfoAccess extConf = (AuthorityInfoAccess) getExtensionValue(type, extensionsType, AuthorityInfoAccess.class);
if (extConf == null) {
return;
}
this.aiaControl = new AuthorityInfoAccessControl(extConf.isIncludeCaIssuers(), extConf.isIncludeOcsp());
}
use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initExtendedKeyUsage.
private void initExtendedKeyUsage(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.extendedKeyUsage;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
ExtendedKeyUsage extConf = (ExtendedKeyUsage) getExtensionValue(type, extensionsType, ExtendedKeyUsage.class);
if (extConf == null) {
return;
}
this.extendedKeyusages = XmlX509CertprofileUtil.buildExtKeyUsageOptions(extConf);
}
Aggregations