Skip to content

Commit d90297a

Browse files
committed
8361212: Remove AffirmTrust root CAs
Backport-of: 3bdac5317815b84d6f693d972f73d77dd069a891
1 parent d56d90e commit d90297a

File tree

12 files changed

+12
-507
lines changed

12 files changed

+12
-507
lines changed

src/java.base/share/classes/sun/security/validator/EntrustTLSPolicy.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 2025, 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
@@ -71,19 +71,7 @@ final class EntrustTLSPolicy {
7171
// OU=(c) 1999 Entrust.net Limited,
7272
// OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.),
7373
// O=Entrust.net
74-
"6DC47172E01CBCB0BF62580D895FE2B8AC9AD4F873801E0C10B9C837D21EB177",
75-
// cacerts alias: affirmtrustcommercialca
76-
// DN: CN=AffirmTrust Commercial, O=AffirmTrust, C=US
77-
"0376AB1D54C5F9803CE4B2E201A0EE7EEF7B57B636E8A93C9B8D4860C96F5FA7",
78-
// cacerts alias: affirmtrustnetworkingca
79-
// DN: CN=AffirmTrust Networking, O=AffirmTrust, C=US
80-
"0A81EC5A929777F145904AF38D5D509F66B5E2C58FCDB531058B0E17F3F0B41B",
81-
// cacerts alias: affirmtrustpremiumca
82-
// DN: CN=AffirmTrust Premium, O=AffirmTrust, C=US
83-
"70A73F7F376B60074248904534B11482D5BF0E698ECC498DF52577EBF2E93B9A",
84-
// cacerts alias: affirmtrustpremiumeccca
85-
// DN: CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US
86-
"BD71FDF6DA97E4CF62D1647ADD2581B07D79ADF8397EB4ECBA9C5E8488821423"
74+
"6DC47172E01CBCB0BF62580D895FE2B8AC9AD4F873801E0C10B9C837D21EB177"
8775
);
8876

8977
// Any TLS Server certificate that is anchored by one of the Entrust

src/java.base/share/data/cacerts/affirmtrustcommercialca

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/java.base/share/data/cacerts/affirmtrustnetworkingca

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/java.base/share/data/cacerts/affirmtrustpremiumca

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/java.base/share/data/cacerts/affirmtrustpremiumeccca

Lines changed: 0 additions & 20 deletions
This file was deleted.

test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -416,50 +416,6 @@
416416
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop certignarootca CRL
417417
*/
418418

419-
/*
420-
* @test id=affirmtrustcommercialca
421-
* @bug 8040012
422-
* @summary Interoperability tests with AffirmTrust Commercial CA
423-
* @library /test/lib
424-
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
425-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustcommercialca OCSP
426-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustcommercialca OCSP
427-
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustcommercialca CRL
428-
*/
429-
430-
/*
431-
* @test id=affirmtrustnetworkingca
432-
* @bug 8040012
433-
* @summary Interoperability tests with AffirmTrust Networking CA
434-
* @library /test/lib
435-
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
436-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustnetworkingca OCSP
437-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustnetworkingca OCSP
438-
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustnetworkingca CRL
439-
*/
440-
441-
/*
442-
* @test id=affirmtrustpremiumca
443-
* @bug 8040012
444-
* @summary Interoperability tests with AffirmTrust Premium CA
445-
* @library /test/lib
446-
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
447-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumca OCSP
448-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustpremiumca OCSP
449-
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustpremiumca CRL
450-
*/
451-
452-
/*
453-
* @test id=affirmtrustpremiumeccca
454-
* @bug 8040012
455-
* @summary Interoperability tests with AffirmTrust Premium ECC CA
456-
* @library /test/lib
457-
* @build jtreg.SkippedException ValidatePathWithURL CAInterop
458-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumeccca OCSP
459-
* @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustpremiumeccca OCSP
460-
* @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustpremiumeccca CRL
461-
*/
462-
463419
/*
464420
* @test id=teliarootcav2
465421
* @bug 8317373
@@ -726,20 +682,6 @@ private CATestURLs getTestURLs(String alias) {
726682
new CATestURLs("https://valid.servicesca.dhimyotis.com",
727683
"https://revoked.servicesca.dhimyotis.com");
728684

729-
// These are listed at https://www.affirmtrust.com/resources/
730-
case "affirmtrustcommercialca" ->
731-
new CATestURLs("https://validcommercial.affirmtrust.com",
732-
"https://revokedcommercial.affirmtrust.com");
733-
case "affirmtrustnetworkingca" ->
734-
new CATestURLs("https://validnetworking.affirmtrust.com",
735-
"https://revokednetworking.affirmtrust.com");
736-
case "affirmtrustpremiumca" ->
737-
new CATestURLs("https://validpremium.affirmtrust.com",
738-
"https://revokedpremium.affirmtrust.com");
739-
case "affirmtrustpremiumeccca" ->
740-
new CATestURLs("https://validpremiumecc.affirmtrust.com",
741-
"https://revokedpremiumecc.affirmtrust.com");
742-
743685
case "teliarootcav2" ->
744686
new CATestURLs("https://juolukka.cover.telia.fi:10600",
745687
"https://juolukka.cover.telia.fi:10601");

test/jdk/sun/security/lib/cacerts/VerifyCACerts.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* 8223499 8225392 8232019 8234245 8233223 8225068 8225069 8243321 8243320
2929
* 8243559 8225072 8258630 8259312 8256421 8225081 8225082 8225083 8245654
3030
* 8305975 8304760 8307134 8295894 8314960 8317373 8317374 8318759 8319187
31-
* 8321408 8316138 8341057 8303770 8350498 8359170
31+
* 8321408 8316138 8341057 8303770 8350498 8359170 8361212
3232
* @summary Check root CA entries in cacerts file
3333
*/
3434
import java.io.ByteArrayInputStream;
@@ -47,12 +47,12 @@ public class VerifyCACerts {
4747
+ File.separator + "security" + File.separator + "cacerts";
4848

4949
// The numbers of certs now.
50-
private static final int COUNT = 113;
50+
private static final int COUNT = 109;
5151

5252
// SHA-256 of cacerts, can be generated with
5353
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
5454
private static final String CHECKSUM
55-
= "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";
55+
= "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";
5656

5757
// Hex formatter to upper case with ":" delimiter
5858
private static final HexFormat HEX = HexFormat.ofDelimiter(":").withUpperCase();
@@ -193,14 +193,6 @@ public class VerifyCACerts {
193193
"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");
194194
put("entrustevca [jdk]",
195195
"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");
196-
put("affirmtrustnetworkingca [jdk]",
197-
"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");
198-
put("affirmtrustpremiumca [jdk]",
199-
"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");
200-
put("affirmtrustcommercialca [jdk]",
201-
"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");
202-
put("affirmtrustpremiumeccca [jdk]",
203-
"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");
204196
put("ttelesecglobalrootclass3ca [jdk]",
205197
"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");
206198
put("ttelesecglobalrootclass2ca [jdk]",

test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Entrust.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 2025, 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
@@ -28,7 +28,7 @@
2828

2929
/**
3030
* @test
31-
* @bug 8337664 8341059
31+
* @bug 8337664 8341059 8361212
3232
* @summary Check that TLS Server certificates chaining back to distrusted
3333
* Entrust roots are invalid
3434
* @library /test/lib
@@ -41,14 +41,13 @@
4141

4242
public class Entrust {
4343

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

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

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

6564
Date notBefore = distrust.getNotBefore(DISTRUST_DATE);
66-
distrust.testCertificateChain(certPath, notBefore, tms, rootsToTest);
65+
distrust.testCertificateChain(CERT_PATH, notBefore, tms, ROOTS_TO_TEST);
6766
}
6867
}

0 commit comments

Comments
 (0)