mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8296742: Illegal X509 Extension should not be created
Reviewed-by: mullan
This commit is contained in:
parent
a6c418eaf8
commit
e174558cad
28 changed files with 303 additions and 92 deletions
|
@ -106,10 +106,14 @@ public class CertificatePoliciesExtension extends Extension {
|
|||
* a List of PolicyInformation with specified criticality.
|
||||
*
|
||||
* @param critical true if the extension is to be treated as critical.
|
||||
* @param certPolicies the List of PolicyInformation.
|
||||
* @param certPolicies the List of PolicyInformation, cannot be null or empty.
|
||||
*/
|
||||
public CertificatePoliciesExtension(Boolean critical,
|
||||
List<PolicyInformation> certPolicies) throws IOException {
|
||||
if (certPolicies == null || certPolicies.isEmpty()) {
|
||||
throw new IllegalArgumentException(
|
||||
"certificate policies cannot be null or empty");
|
||||
}
|
||||
this.certPolicies = certPolicies;
|
||||
this.extensionId = PKIXExtensions.CertificatePolicies_Id;
|
||||
this.critical = critical.booleanValue();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue