1
1
/*
2
- * Copyright (c) 2017, 2023 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2017, 2024 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
67
67
import java .util .stream .Collectors ;
68
68
import java .util .stream .IntStream ;
69
69
70
+ import jdk .security .jarsigner .JarSigner ;
70
71
import jdk .test .lib .process .OutputAnalyzer ;
71
72
import jdk .test .lib .process .ProcessTools ;
72
73
import jdk .test .lib .util .JarUtils ;
@@ -1430,7 +1431,9 @@ private SignItem digestAlgorithm(String digestAlgorithm) {
1430
1431
String expectedDigestAlg () {
1431
1432
return digestAlgorithm != null
1432
1433
? digestAlgorithm
1433
- : jdkInfo .majorVersion >= 20 ? "SHA-384" : "SHA-256" ;
1434
+ : jdkInfo .majorVersion >= 20
1435
+ ? JarSigner .Builder .getDefaultDigestAlgorithm ()
1436
+ : "SHA-256" ;
1434
1437
}
1435
1438
1436
1439
private SignItem tsaDigestAlgorithm (String tsaDigestAlgorithm ) {
@@ -1439,7 +1442,11 @@ private SignItem tsaDigestAlgorithm(String tsaDigestAlgorithm) {
1439
1442
}
1440
1443
1441
1444
String expectedTsaDigestAlg () {
1442
- return tsaDigestAlgorithm != null ? tsaDigestAlgorithm : "SHA-256" ;
1445
+ return tsaDigestAlgorithm != null
1446
+ ? tsaDigestAlgorithm
1447
+ : jdkInfo .majorVersion >= 20
1448
+ ? JarSigner .Builder .getDefaultDigestAlgorithm ()
1449
+ : "SHA-256" ;
1443
1450
}
1444
1451
1445
1452
private SignItem tsaIndex (int tsaIndex ) {
1 commit comments
openjdk-notifier[bot] commentedon Dec 16, 2024
Review
Issues