You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/09/24 12:06:51 UTC

[tomcat] branch 9.0.x updated (0004b62 -> f14610e)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


    from 0004b62  Fix incorrect indent
     new 7746fbc  Additional clean-up after removal of APR
     new f14610e  Backport deprecation

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/AbstractProtocol.java       |  2 ++
 java/org/apache/tomcat/util/net/AprEndpoint.java   |  6 ++++++
 java/org/apache/tomcat/util/net/Nio2Endpoint.java  |  6 +-----
 java/org/apache/tomcat/util/net/NioEndpoint.java   |  6 +-----
 .../apache/tomcat/util/net/SocketWrapperBase.java  | 22 +++++++++++++++++++++-
 5 files changed, 31 insertions(+), 11 deletions(-)

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


[tomcat] 02/02: Backport deprecation

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f14610e7237db303ca9bdffe3371f8a80d83aa72
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Sep 24 13:06:02 2021 +0100

    Backport deprecation
---
 java/org/apache/coyote/AbstractProtocol.java     | 2 ++
 java/org/apache/tomcat/util/net/AprEndpoint.java | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java
index c8b4a94..c7042e1 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -787,6 +787,7 @@ public abstract class AbstractProtocol<S> implements ProtocolHandler,
         }
 
 
+        @SuppressWarnings("deprecation")
         @Override
         public SocketState process(SocketWrapperBase<S> wrapper, SocketEvent status) {
             if (getLog().isDebugEnabled()) {
@@ -882,6 +883,7 @@ public abstract class AbstractProtocol<S> implements ProtocolHandler,
                     }
                 }
 
+                // Can switch to non-deprecated version in Tomcat 10.1.x
                 processor.setSslSupport(
                         wrapper.getSslSupport(getProtocol().getClientCertProvider()));
 
diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java
index 3c2f68a..9cdf9de 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -2574,6 +2574,12 @@ public class AprEndpoint extends AbstractEndpoint<Long,Long> implements SNICallB
 
 
         @Override
+        public SSLSupport getSslSupport() {
+            throw new UnsupportedOperationException();
+        }
+
+
+        @Override
         public void doClientAuth(SSLSupport sslSupport) throws IOException {
             long socket = getSocket().longValue();
             // Configure connection to require a certificate. This requires a

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


[tomcat] 01/02: Additional clean-up after removal of APR

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 7746fbcd250739fbb54e423cdccfb67880ffe78c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Sep 24 12:59:19 2021 +0100

    Additional clean-up after removal of APR
---
 java/org/apache/tomcat/util/net/Nio2Endpoint.java  |  6 +-----
 java/org/apache/tomcat/util/net/NioEndpoint.java   |  6 +-----
 .../apache/tomcat/util/net/SocketWrapperBase.java  | 22 +++++++++++++++++++++-
 3 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
index 56d7295..88f0382 100644
--- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java
+++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
@@ -1581,12 +1581,8 @@ public class Nio2Endpoint extends AbstractJsseEndpoint<Nio2Channel,AsynchronousS
         }
 
 
-        /**
-         * {@inheritDoc}
-         * @param clientCertProvider Ignored for this implementation
-         */
         @Override
-        public SSLSupport getSslSupport(String clientCertProvider) {
+        public SSLSupport getSslSupport() {
             if (getSocket() instanceof SecureNio2Channel) {
                 SecureNio2Channel ch = (SecureNio2Channel) getSocket();
                 return ch.getSSLSupport();
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 7fedf39..da77764 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1509,12 +1509,8 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel>
         }
 
 
-        /**
-         * {@inheritDoc}
-         * @param clientCertProvider Ignored for this implementation
-         */
         @Override
-        public SSLSupport getSslSupport(String clientCertProvider) {
+        public SSLSupport getSslSupport() {
             if (getSocket() instanceof SecureNioChannel) {
                 SecureNioChannel ch = (SecureNioChannel) getSocket();
                 return ch.getSSLSupport();
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index 008715e..81a89e3 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -818,7 +818,27 @@ public abstract class SocketWrapperBase<E> {
      */
     public abstract void doClientAuth(SSLSupport sslSupport) throws IOException;
 
-    public abstract SSLSupport getSslSupport(String clientCertProvider);
+    /**
+     * Obtain an SSLSupport instance for this socket.
+     *
+     * @param clientCertProvider The name of the client certificate provider to
+     *                           use. Only used by APR/native.
+     *
+     * @return An SSLSupport instance for this socket.
+     *
+     * @deprecated Will be removed in Tomcat 10.1.x onwards
+     */
+    @Deprecated
+    public SSLSupport getSslSupport(String clientCertProvider) {
+        return getSslSupport();
+    }
+
+    /**
+     * Obtain an SSLSupport instance for this socket.
+     *
+     * @return An SSLSupport instance for this socket.
+     */
+    public abstract SSLSupport getSslSupport();
 
 
     // ------------------------------------------------------- NIO 2 style APIs

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