Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, 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 @@ -71,19 +71,7 @@ final class EntrustTLSPolicy {
// OU=(c) 1999 Entrust.net Limited,
// OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.),
// O=Entrust.net
"6DC47172E01CBCB0BF62580D895FE2B8AC9AD4F873801E0C10B9C837D21EB177",
// cacerts alias: affirmtrustcommercialca
// DN: CN=AffirmTrust Commercial, O=AffirmTrust, C=US
"0376AB1D54C5F9803CE4B2E201A0EE7EEF7B57B636E8A93C9B8D4860C96F5FA7",
// cacerts alias: affirmtrustnetworkingca
// DN: CN=AffirmTrust Networking, O=AffirmTrust, C=US
"0A81EC5A929777F145904AF38D5D509F66B5E2C58FCDB531058B0E17F3F0B41B",
// cacerts alias: affirmtrustpremiumca
// DN: CN=AffirmTrust Premium, O=AffirmTrust, C=US
"70A73F7F376B60074248904534B11482D5BF0E698ECC498DF52577EBF2E93B9A",
// cacerts alias: affirmtrustpremiumeccca
// DN: CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US
"BD71FDF6DA97E4CF62D1647ADD2581B07D79ADF8397EB4ECBA9C5E8488821423"
"6DC47172E01CBCB0BF62580D895FE2B8AC9AD4F873801E0C10B9C837D21EB177"
);

// Any TLS Server certificate that is anchored by one of the Entrust
Expand Down
27 changes: 0 additions & 27 deletions src/java.base/share/data/cacerts/affirmtrustcommercialca

This file was deleted.

27 changes: 0 additions & 27 deletions src/java.base/share/data/cacerts/affirmtrustnetworkingca

This file was deleted.

38 changes: 0 additions & 38 deletions src/java.base/share/data/cacerts/affirmtrustpremiumca

This file was deleted.

20 changes: 0 additions & 20 deletions src/java.base/share/data/cacerts/affirmtrustpremiumeccca

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -416,50 +416,6 @@
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop certignarootca CRL
*/

/*
* @test id=affirmtrustcommercialca
* @bug 8040012
* @summary Interoperability tests with AffirmTrust Commercial CA
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustcommercialca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustcommercialca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustcommercialca CRL
*/

/*
* @test id=affirmtrustnetworkingca
* @bug 8040012
* @summary Interoperability tests with AffirmTrust Networking CA
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustnetworkingca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustnetworkingca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustnetworkingca CRL
*/

/*
* @test id=affirmtrustpremiumca
* @bug 8040012
* @summary Interoperability tests with AffirmTrust Premium CA
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustpremiumca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustpremiumca CRL
*/

/*
* @test id=affirmtrustpremiumeccca
* @bug 8040012
* @summary Interoperability tests with AffirmTrust Premium ECC CA
* @library /test/lib
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumeccca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustpremiumeccca OCSP
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustpremiumeccca CRL
*/

/*
* @test id=teliarootcav2
* @bug 8317373
Expand Down Expand Up @@ -726,20 +682,6 @@ private CATestURLs getTestURLs(String alias) {
new CATestURLs("https://valid.servicesca.dhimyotis.com",
"https://revoked.servicesca.dhimyotis.com");

// These are listed at https://www.affirmtrust.com/resources/
case "affirmtrustcommercialca" ->
new CATestURLs("https://validcommercial.affirmtrust.com",
"https://revokedcommercial.affirmtrust.com");
case "affirmtrustnetworkingca" ->
new CATestURLs("https://validnetworking.affirmtrust.com",
"https://revokednetworking.affirmtrust.com");
case "affirmtrustpremiumca" ->
new CATestURLs("https://validpremium.affirmtrust.com",
"https://revokedpremium.affirmtrust.com");
case "affirmtrustpremiumeccca" ->
new CATestURLs("https://validpremiumecc.affirmtrust.com",
"https://revokedpremiumecc.affirmtrust.com");

case "teliarootcav2" ->
new CATestURLs("https://juolukka.cover.telia.fi:10600",
"https://juolukka.cover.telia.fi:10601");
Expand Down
14 changes: 3 additions & 11 deletions test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* 8223499 8225392 8232019 8234245 8233223 8225068 8225069 8243321 8243320
* 8243559 8225072 8258630 8259312 8256421 8225081 8225082 8225083 8245654
* 8305975 8304760 8307134 8295894 8314960 8317373 8317374 8318759 8319187
* 8321408 8316138 8341057 8303770 8350498 8359170
* 8321408 8316138 8341057 8303770 8350498 8359170 8361212
* @summary Check root CA entries in cacerts file
*/
import java.io.ByteArrayInputStream;
Expand All @@ -47,12 +47,12 @@ public class VerifyCACerts {
+ File.separator + "security" + File.separator + "cacerts";

// The numbers of certs now.
private static final int COUNT = 113;
private static final int COUNT = 109;

// SHA-256 of cacerts, can be generated with
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
private static final String CHECKSUM
= "18:36:49:15:B6:71:85:FF:F1:8E:C0:10:BE:0A:41:52:5B:DC:F7:B3:1F:51:7A:45:7D:7A:14:10:3A:59:42:4C";
= "70:73:12:D3:E8:01:89:28:F5:3D:10:8E:45:34:F6:28:CB:BF:AD:18:19:6D:F1:A2:E7:28:84:30:0B:E1:A6:9F";

// Hex formatter to upper case with ":" delimiter
private static final HexFormat HEX = HexFormat.ofDelimiter(":").withUpperCase();
Expand Down Expand Up @@ -193,14 +193,6 @@ public class VerifyCACerts {
"43:DF:57:74:B0:3E:7F:EF:5F:E4:0D:93:1A:7B:ED:F1:BB:2E:6B:42:73:8C:4E:6D:38:41:10:3D:3A:A7:F3:39");
put("entrustevca [jdk]",
"73:C1:76:43:4F:1B:C6:D5:AD:F4:5B:0E:76:E7:27:28:7C:8D:E5:76:16:C1:E6:E6:14:1A:2B:2C:BC:7D:8E:4C");
put("affirmtrustnetworkingca [jdk]",
"0A:81:EC:5A:92:97:77:F1:45:90:4A:F3:8D:5D:50:9F:66:B5:E2:C5:8F:CD:B5:31:05:8B:0E:17:F3:F0:B4:1B");
put("affirmtrustpremiumca [jdk]",
"70:A7:3F:7F:37:6B:60:07:42:48:90:45:34:B1:14:82:D5:BF:0E:69:8E:CC:49:8D:F5:25:77:EB:F2:E9:3B:9A");
put("affirmtrustcommercialca [jdk]",
"03:76:AB:1D:54:C5:F9:80:3C:E4:B2:E2:01:A0:EE:7E:EF:7B:57:B6:36:E8:A9:3C:9B:8D:48:60:C9:6F:5F:A7");
put("affirmtrustpremiumeccca [jdk]",
"BD:71:FD:F6:DA:97:E4:CF:62:D1:64:7A:DD:25:81:B0:7D:79:AD:F8:39:7E:B4:EC:BA:9C:5E:84:88:82:14:23");
put("ttelesecglobalrootclass3ca [jdk]",
"FD:73:DA:D3:1C:64:4F:F1:B4:3B:EF:0C:CD:DA:96:71:0B:9C:D9:87:5E:CA:7E:31:70:7A:F3:E9:6D:52:2B:BD");
put("ttelesecglobalrootclass2ca [jdk]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, 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 @@ -28,7 +28,7 @@

/**
* @test
* @bug 8337664 8341059
* @bug 8337664 8341059 8361212
* @summary Check that TLS Server certificates chaining back to distrusted
* Entrust roots are invalid
* @library /test/lib
Expand All @@ -41,14 +41,13 @@

public class Entrust {

private static final String certPath = "chains" + File.separator + "entrust";
private static final String CERT_PATH = "chains" + File.separator + "entrust";

// Each of the roots have a test certificate chain stored in a file
// named "<root>-chain.pem".
private static String[] rootsToTest = new String[]{
"entrustevca", "entrustrootcaec1", "entrustrootcag2", "entrustrootcag4",
"entrust2048ca", "affirmtrustcommercialca", "affirmtrustnetworkingca",
"affirmtrustpremiumca", "affirmtrustpremiumeccca"};
private static final String[] ROOTS_TO_TEST = new String[]{
"entrustevca", "entrustrootcaec1", "entrustrootcag2",
"entrustrootcag4", "entrust2048ca"};

// Date when the restrictions take effect
private static final ZonedDateTime DISTRUST_DATE =
Expand All @@ -63,6 +62,6 @@ public static void main(String[] args) throws Exception {
};

Date notBefore = distrust.getNotBefore(DISTRUST_DATE);
distrust.testCertificateChain(certPath, notBefore, tms, rootsToTest);
distrust.testCertificateChain(CERT_PATH, notBefore, tms, ROOTS_TO_TEST);
}
}
Loading