11/*
2- * Copyright (c) 2008, 2019 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2008, 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
4545import java .security .cert .TrustAnchor ;
4646import java .security .cert .X509Certificate ;
4747import java .security .cert .X509CertSelector ;
48+ import java .text .DateFormat ;
4849import java .util .ArrayList ;
4950import java .util .Collections ;
5051import java .util .List ;
52+ import java .util .Locale ;
53+
5154import jdk .test .lib .security .CertUtils ;
5255
5356public final class BuildEEBasicConstraints {
@@ -65,6 +68,11 @@ public static void main(String[] args) throws Exception {
6568 PKIXBuilderParameters params = new PKIXBuilderParameters
6669 (Collections .singleton (anchor ), sel );
6770 params .setRevocationEnabled (false );
71+
72+ // Certs expired on 7th Nov 2022
73+ params .setDate (DateFormat .getDateInstance (DateFormat .MEDIUM ,
74+ Locale .US ).parse ("June 01, 2022" ));
75+
6876 X509Certificate eeCert = CertUtils .getCertFromFile ("ee.cer" );
6977 X509Certificate caCert = CertUtils .getCertFromFile ("ca.cer" );
7078 ArrayList <X509Certificate > certs = new ArrayList <X509Certificate >();
0 commit comments