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/07/28 10:35:37 UTC
[tomcat] branch 8.5.x updated: Clean-up. No functional change.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new f6f8ad3 Clean-up. No functional change.
f6f8ad3 is described below
commit f6f8ad3d3dce96c755671fab5268b5f1d0268a17
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 8110ff1..5fc4db9 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -66,45 +66,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 {
@@ -183,6 +171,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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org