tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1717984 - /tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
Date Fri, 04 Dec 2015 15:32:17 GMT
Author: remm
Date: Fri Dec  4 15:32:16 2015
New Revision: 1717984

URL: http://svn.apache.org/viewvc?rev=1717984&view=rev
Log:
Some small cleanups.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java?rev=1717984&r1=1717983&r2=1717984&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java Fri Dec  4 15:32:16
2015
@@ -65,7 +65,6 @@ public final class OpenSSLEngine extends
 
     private static final Certificate[] EMPTY_CERTIFICATES = new Certificate[0];
     private static final SSLException ENGINE_CLOSED = new SSLException(sm.getString("engine.engineClosed"));
-    private static final SSLException RENEGOTIATION_UNSUPPORTED = new SSLException(sm.getString("engine.renegociationUnsupported"));
     private static final SSLException ENCRYPTED_PACKET_OVERSIZED = new SSLException(sm.getString("engine.oversizedPacket"));
 
     private static final Set<String> AVAILABLE_CIPHER_SUITES;
@@ -103,7 +102,6 @@ public final class OpenSSLEngine extends
 
     static {
         ENGINE_CLOSED.setStackTrace(new StackTraceElement[0]);
-        RENEGOTIATION_UNSUPPORTED.setStackTrace(new StackTraceElement[0]);
         ENCRYPTED_PACKET_OVERSIZED.setStackTrace(new StackTraceElement[0]);
         DESTROYED_UPDATER = AtomicIntegerFieldUpdater.newUpdater(OpenSSLEngine.class, "destroyed");
     }
@@ -889,13 +887,12 @@ public final class OpenSSLEngine extends
         int code = SSL.renegotiate(ssl);
         if (code <= 0) {
             checkLastError();
-        } else {
-            handshakeFinished = false;
-            peerCerts = null;
-            x509PeerCerts = null;
         }
-        code = SSL.doHandshake(ssl);
-        if (code <= 0) {
+        handshakeFinished = false;
+        peerCerts = null;
+        x509PeerCerts = null;
+        int code2 = SSL.doHandshake(ssl);
+        if (code2 <= 0) {
             checkLastError();
         }
     }
@@ -1226,7 +1223,7 @@ public final class OpenSSLEngine extends
 
         @Override
         public Certificate[] getLocalCertificates() {
-            // FIXME: Not currently exposed by the native API
+            // FIXME (if possible): Not available in the OpenSSL API
             return EMPTY_CERTIFICATES;
         }
 



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


Mime
View raw message