Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

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

Backport-of: b6ea69c06aca7f013e26596cebd039960c5b4d34
  • Loading branch information
Yuri Nesterenko committed Nov 25, 2022
1 parent 42e0659 commit 130d34d
Showing 1 changed file with 6 additions and 1 deletion.
@@ -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 130d34d

@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.