This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new c4ffcf56a6 Remove Java 11-16 specific code c4ffcf56a6 is described below commit c4ffcf56a669aba1e508a0e769892f178879c1f5 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu May 11 17:58:36 2023 +0100 Remove Java 11-16 specific code --- java/org/apache/tomcat/util/net/jsse/PEMFile.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java b/java/org/apache/tomcat/util/net/jsse/PEMFile.java index c374e402e6..3972822398 100644 --- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java +++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java @@ -65,7 +65,6 @@ public class PEMFile { private static final byte[] OID_EC_PUBLIC_KEY = new byte[] { 0x06, 0x07, 0x2A, (byte) 0x86, 0x48, (byte) 0xCE, 0x3D, 0x02, 0x01 }; - private static final String OID_PKCS5_PBES2 = "1.2.840.113549.1.5.13"; private static final String PBES2 = "PBES2"; public static String toPEM(X509Certificate certificate) throws CertificateEncodingException { @@ -295,9 +294,8 @@ public class PEMFile { private String getPBEAlgorithm(EncryptedPrivateKeyInfo privateKeyInfo) { AlgorithmParameters parameters = privateKeyInfo.getAlgParameters(); String algName = privateKeyInfo.getAlgName(); - // Java 11 returns OID_PKCS5_PBES2 - // Java 17 returns PBES2 - if (parameters != null && (OID_PKCS5_PBES2.equals(algName) || PBES2.equals(algName))) { + // Java 17+ returns PBES2 + if (parameters != null && PBES2.equals(algName)) { /* * This should be "PBEWith<prf>And<encryption>". * Relying on the toString() implementation is potentially --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org