我正在生成一个证书,该证书策略必须具有多个策略限定符信息。预期结果是左边的结果。我现在的结果是右边那个
我使用的代码如下。它生成两个证书策略
private CertificatePolicies generateCertificatePolicies(Map<String, String> certificateParameters) {
PolicyQualifierInfo pqInfo = new PolicyQualifierInfo(certificateParameters.get("PolicyQualifierInfo"));
PolicyInformation policyInfo = new PolicyInformation(new ASN1ObjectIdentifier(certificateParameters.get("PolicyQualifierInfoOID")), new DERSequence(pqInfo));
PolicyQualifierInfo pqUserNotice = new PolicyQualifierInfo(
certificateParameters.get("PolicyQualifierUserNotice"));
PolicyInformation policyInfo2 = new PolicyInformation(PolicyQualifierId.id_qt_unotice,
new DERSequence(pqUserNotice));
PolicyInformation[] certificatePolicies = { policyInfo, policyInfo2 };
return new CertificatePolicies(certificatePolicies);
}
暂无答案!
目前还没有任何答案,快来回答吧!