From 8fc616143b660a652795159254b7febe99f61877 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 22 Jun 2011 17:11:03 +0000 Subject: [PATCH] Fix copy/paste error that broke crl handling git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1138555 13f79535-47bb-0310-9956-ffa450edef68 --- .../tomcat/util/net/jsse/JSSESocketFactory.java | 20 +++++++++++++------- webapps/docs/changelog.xml | 4 ++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java b/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java index fb36edcda..445409300 100644 --- a/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java +++ b/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java @@ -508,17 +508,23 @@ public class JSSESocketFactory implements ServerSocketFactory, SSLUtil { @Override public TrustManager[] getTrustManagers() throws Exception { - String keystoreType = endpoint.getKeystoreType(); - if (keystoreType == null) { - keystoreType = defaultKeystoreType; + String truststoreType = endpoint.getTruststoreType(); + if (truststoreType == null) { + truststoreType = System.getProperty("javax.net.ssl.trustStoreType"); } - - String algorithm = endpoint.getAlgorithm(); + if (truststoreType == null) { + truststoreType = endpoint.getKeystoreType(); + } + if (truststoreType == null) { + truststoreType = defaultKeystoreType; + } + + String algorithm = endpoint.getTruststoreAlgorithm(); if (algorithm == null) { - algorithm = KeyManagerFactory.getDefaultAlgorithm(); + algorithm = TrustManagerFactory.getDefaultAlgorithm(); } - return getTrustManagers(keystoreType, endpoint.getKeystoreProvider(), + return getTrustManagers(truststoreType, endpoint.getKeystoreProvider(), algorithm); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 572d7961c..9bab1e8bb 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -147,6 +147,10 @@ Various refactorings to reduce code duplication and unnecessary code in the connectors. (markt) + + Correct a regression introduced in Apache Tomcat 7.0.11 that broke + certificate revokation list handling. (markt) + -- 2.11.0