Skip to content

Commit 9b43850

Browse files
committed
cert startdate 1 minute ago
1 parent 916f1aa commit 9b43850

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/jdk/sun/security/validator/samedn.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2010, 2024, 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
@@ -62,10 +62,11 @@ $KT -genkeypair -alias ca1 -dname CN=CA -keyalg rsa -sigalg md5withrsa -ext bc -
6262
$KT -genkeypair -alias ca2 -dname CN=CA -keyalg rsa -sigalg sha1withrsa -ext bc -startdate -1y
6363
$KT -genkeypair -alias user -dname CN=User -keyalg rsa
6464

65-
# 2. Signing: ca -> user
65+
# 2. Signing: ca -> user. The startdate is set to 1 minute in the past to ensure the certificate
66+
# is valid at the time of validation and to prevent any issues with timing discrepancies
6667

67-
$KT -certreq -alias user | $KT -gencert -rfc -alias ca1 > samedn1.certs
68-
$KT -certreq -alias user | $KT -gencert -rfc -alias ca2 > samedn2.certs
68+
$KT -certreq -alias user | $KT -gencert -rfc -alias ca1 -startdate -1M > samedn1.certs
69+
$KT -certreq -alias user | $KT -gencert -rfc -alias ca2 -startdate -1M > samedn2.certs
6970

7071
# 3. Append the ca file
7172

0 commit comments

Comments
 (0)