Skip to content

Commit 782a33b

Browse files
committed
8296480: java/security/cert/pkix/policyChanges/TestPolicy.java is failing
Backport-of: b6ea69c06aca7f013e26596cebd039960c5b4d34
1 parent 6d830da commit 782a33b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/jdk/java/security/cert/pkix/policyChanges/TestPolicy.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
3434
*/
3535

3636
import java.io.*;
37+
import java.text.DateFormat;
3738
import java.util.*;
3839

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

101+
// Certs expired on 7th Nov 2022
102+
params.setDate(DateFormat.getDateInstance(DateFormat.MEDIUM,
103+
Locale.US).parse("June 01, 2022"));
104+
100105
CertPath path = factory.generateCertPath(Arrays.asList(new X509Certificate[] {ee, ca}));
101106

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

0 commit comments

Comments
 (0)