This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new c0beb0271e Fix possible NPE c0beb0271e is described below commit c0beb0271e9aaf552fed19464a8dc4da093efdaf Author: remm <r...@apache.org> AuthorDate: Thu Sep 21 11:54:07 2023 +0200 Fix possible NPE --- java/org/apache/catalina/valves/rewrite/ResolverImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java index 43d9b75f93..1035c88e55 100644 --- a/java/org/apache/catalina/valves/rewrite/ResolverImpl.java +++ b/java/org/apache/catalina/valves/rewrite/ResolverImpl.java @@ -185,10 +185,12 @@ public class ResolverImpl extends Resolver { } } else if (key.equals("SSL_CIPHER_ALGKEYSIZE")) { String cipherSuite = sslSupport.getCipherSuite(); - Set<Cipher> cipherList = OpenSSLCipherConfigurationParser.parse(cipherSuite); - if (cipherList.size() == 1) { - Cipher cipher = cipherList.iterator().next(); - return String.valueOf(cipher.getAlg_bits()); + if (cipherSuite != null) { + Set<Cipher> cipherList = OpenSSLCipherConfigurationParser.parse(cipherSuite); + if (cipherList.size() == 1) { + Cipher cipher = cipherList.iterator().next(); + return String.valueOf(cipher.getAlg_bits()); + } } } else if (key.equals("SSL_CIPHER_USEKEYSIZE")) { Integer keySize = sslSupport.getKeySize(); @@ -261,6 +263,7 @@ public class ResolverImpl extends Resolver { try { return PEMFile.toPEM(certificates[0]); } catch (CertificateEncodingException e) { + // Ignore } } else if (key.startsWith("CERT_CHAIN_")) { key = key.substring("CERT_CHAIN_".length()); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org