use of org.xipki.ca.api.profile.DirectoryStringType in project xipki by xipki.
the class XmlX509Certprofile method initAdditionalInformation.
private void initAdditionalInformation(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = ObjectIdentifiers.id_extension_additionalInformation;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
AdditionalInformation extConf = (AdditionalInformation) getExtensionValue(type, extensionsType, AdditionalInformation.class);
if (extConf == null) {
return;
}
DirectoryStringType stringType = XmlX509CertprofileUtil.convertDirectoryStringType(extConf.getType());
ASN1Encodable extValue = stringType.createDirectoryString(extConf.getText());
additionalInformation = new ExtensionValue(extensionControls.get(type).isCritical(), extValue);
}
use of org.xipki.ca.api.profile.DirectoryStringType in project xipki by xipki.
the class XmlX509Certprofile method initRestriction.
private void initRestriction(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = ObjectIdentifiers.id_extension_restriction;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
Restriction extConf = (Restriction) getExtensionValue(type, extensionsType, Restriction.class);
if (extConf == null) {
return;
}
DirectoryStringType stringType = XmlX509CertprofileUtil.convertDirectoryStringType(extConf.getType());
ASN1Encodable extValue = stringType.createDirectoryString(extConf.getText());
restriction = new ExtensionValue(extensionControls.get(type).isCritical(), extValue);
}
Aggregations