This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 7f2ae5c Clean-up. No functional change. 7f2ae5c is described below commit 7f2ae5c4a433f461e68c7fd960cc7b151e3607f8 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jul 28 11:28:10 2021 +0100 Clean-up. No functional change. --- .../tomcat/util/net/openssl/OpenSSLContext.java | 53 +++++++++++----------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java index ce3cce3..7e6d198 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java @@ -64,45 +64,33 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { private static final String defaultProtocol = "TLS"; - private final SSLHostConfig sslHostConfig; - private final SSLHostConfigCertificate certificate; - private OpenSSLSessionContext sessionContext; - private X509TrustManager x509TrustManager; - - private final List<String> negotiableProtocols; - - private String enabledProtocol; - - public String getEnabledProtocol() { - return enabledProtocol; - } + private static final String BEGIN_KEY = "-----BEGIN PRIVATE KEY-----\n"; + private static final Object END_KEY = "\n-----END PRIVATE KEY-----"; - public void setEnabledProtocol(String protocol) { - enabledProtocol = (protocol == null) ? defaultProtocol : protocol; + static final CertificateFactory X509_CERT_FACTORY; + static { + try { + X509_CERT_FACTORY = CertificateFactory.getInstance("X.509"); + } catch (CertificateException e) { + throw new IllegalStateException(sm.getString("openssl.X509FactoryError"), e); + } } + private final SSLHostConfig sslHostConfig; + private final SSLHostConfigCertificate certificate; + private final List<String> negotiableProtocols; private final long aprPool; private final AtomicInteger aprPoolDestroyed = new AtomicInteger(0); - // OpenSSLConfCmd context protected final long cctx; // SSL context protected final long ctx; - static final CertificateFactory X509_CERT_FACTORY; - - private static final String BEGIN_KEY = "-----BEGIN PRIVATE KEY-----\n"; - - private static final Object END_KEY = "\n-----END PRIVATE KEY-----"; + private OpenSSLSessionContext sessionContext; + private X509TrustManager x509TrustManager; + private String enabledProtocol; private boolean initialized = false; - static { - try { - X509_CERT_FACTORY = CertificateFactory.getInstance("X.509"); - } catch (CertificateException e) { - throw new IllegalStateException(sm.getString("openssl.X509FactoryError"), e); - } - } public OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols) throws SSLException { @@ -181,6 +169,17 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { } } + + public String getEnabledProtocol() { + return enabledProtocol; + } + + + public void setEnabledProtocol(String protocol) { + enabledProtocol = (protocol == null) ? defaultProtocol : protocol; + } + + @Override public synchronized void destroy() { // Guard against multiple destroyPools() calls triggered by construction exception and finalize() later --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org