tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1174882 - in /tomcat/trunk/java/org/apache/tomcat/util/net/jsse: JSSESupport.java res/LocalStrings.properties
Date Fri, 23 Sep 2011 16:55:21 GMT
Author: markt
Date: Fri Sep 23 16:55:21 2011
New Revision: 1174882

URL: http://svn.apache.org/viewvc?rev=1174882&view=rev
Log:
Use the StringManager for i18n

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
    tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1174882&r1=1174881&r2=1174882&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Fri Sep 23 16:55:21
2011
@@ -35,6 +35,7 @@ import javax.security.cert.X509Certifica
 
 import org.apache.tomcat.util.net.SSLSessionManager;
 import org.apache.tomcat.util.net.SSLSupport;
+import org.apache.tomcat.util.res.StringManager;
 
 /** JSSESupport
 
@@ -56,6 +57,9 @@ class JSSESupport implements SSLSupport,
     private static final org.apache.juli.logging.Log log =
         org.apache.juli.logging.LogFactory.getLog(JSSESupport.class);
     
+    private static final StringManager sm =
+        StringManager.getManager("org.apache.tomcat.util.net.jsse.res");
+
     private static final Map<SSLSession,Integer> keySizeCache =
         new WeakHashMap<SSLSession, Integer>();
 
@@ -94,7 +98,7 @@ class JSSESupport implements SSLSupport,
         try {
             certs = session.getPeerCertificates();
         } catch( Throwable t ) {
-            log.debug("Error getting client certs",t);
+            log.debug(sm.getString("jsseSupport.clientCertError"), t);
             return null;
         }
         if( certs==null ) return null;
@@ -115,7 +119,8 @@ class JSSESupport implements SSLSupport,
                     x509Certs[i] = (java.security.cert.X509Certificate)
                             cf.generateCertificate(stream);
                 } catch(Exception ex) { 
-                    log.info("Error translating cert " + certs[i], ex);
+                    log.info(sm.getString(
+                            "jseeSupport.certTranslationError", certs[i]), ex);
                     return null;
                 }
             }
@@ -153,7 +158,7 @@ class JSSESupport implements SSLSupport,
 
     protected void handShake() throws IOException {
         if( ssl.getWantClientAuth() ) {
-            log.debug("No client cert sent for want");
+            log.debug(sm.getString("jsseSupport.noCertWant"));
         } else {
             ssl.setNeedClientAuth(true);
         }
@@ -161,7 +166,7 @@ class JSSESupport implements SSLSupport,
         if (ssl.getEnabledCipherSuites().length == 0) {
             // Handshake is never going to be successful.
             // Assume this is because handshakes are disabled
-            log.warn("SSL server initiated renegotiation is disabled, closing connection");
+            log.warn(sm.getString("jsseSupport.serverRenegDisabled"));
             session.invalidate();
             ssl.close();
             return;
@@ -180,7 +185,7 @@ class JSSESupport implements SSLSupport,
             try {
                 in.read(b);
             } catch(SSLException sslex) {
-                log.info("SSL Error getting client Certs",sslex);
+                log.info(sm.getString("jsseSupport.clientCertError"), sslex);
                 throw sslex;
             } catch (IOException e) {
                 // ignore - presumably the timeout

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties?rev=1174882&r1=1174881&r2=1174882&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties Fri Sep
23 16:55:21 2011
@@ -17,4 +17,9 @@ jsse.alias_no_key_entry=Alias name {0} d
 jsse.keystore_load_failed=Failed to load keystore type {0} with path {1} due to {2}
 jsse.invalid_ssl_conf=SSL configuration is invalid due to {0}
 jsse.invalid_truststore_password=The provided trust store password could not be used to unlock
and/or validate the trust store. Retrying to access the trust store with a null password which
will skip validation.
-jsse.invalidTrustManagerClassName=The trustManagerClassName provided [{0}] does not implement
javax.net.ssl.TrustManager 
\ No newline at end of file
+jsse.invalidTrustManagerClassName=The trustManagerClassName provided [{0}] does not implement
javax.net.ssl.TrustManager
+jsseSupport.clientCertError=Error trying to obtain a certificate from the client
+jseeSupport.certTranslationError=Error translating certificate [{0}]
+jsseSupport.noCertWant=No client certificate sent for want
+jsseSupport.serverRenegDisabled=SSL server initiated renegotiation is disabled, closing connection
+jsseSupport.unexpectedData=Unexpected data read from input stream
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message