Skip to content

Commit

Permalink
8296480: java/security/cert/pkix/policyChanges/TestPolicy.java is fai…
Browse files Browse the repository at this point in the history
…ling

Backport-of: b6ea69c06aca7f013e26596cebd039960c5b4d34
  • Loading branch information
GoeLin committed Nov 11, 2022
1 parent b5710c4 commit 7d17479
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -34,6 +34,7 @@
*/

import java.io.*;
import java.text.DateFormat;
import java.util.*;

import java.security.Security;
Expand Down Expand Up @@ -97,6 +98,10 @@ public static void main(String[] args) throws Exception {
params.setRevocationEnabled(false);
params.setInitialPolicies(testCase.initialPolicies);

// Certs expired on 7th Nov 2022
params.setDate(DateFormat.getDateInstance(DateFormat.MEDIUM,
Locale.US).parse("June 01, 2022"));

CertPath path = factory.generateCertPath(Arrays.asList(new X509Certificate[] {ee, ca}));

PKIXCertPathValidatorResult result = (PKIXCertPathValidatorResult)validator.validate(path, params);
Expand Down

1 comment on commit 7d17479

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.