Skip to content

Commit 964f353

Browse files
committed
rename property
1 parent 098e7c5 commit 964f353

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,8 +1776,8 @@ and [SASL authentication for ZooKeeper](https://cwiki.apache.org/confluence/disp
17761776
Specifies whether Online Certificate Status Protocol is enabled in client and quorum TLS protocols.
17771777
Default: false
17781778

1779-
* *ssl.tcnative.ocsp* and *ssl.quorum.tcnative.ocsp* :
1780-
(Java system properties: **zookeeper.ssl.tcnative.ocsp** and **zookeeper.ssl.quorum.tcnative.ocsp**)
1779+
* *ssl.tcnative.ocsp.stapling* and *ssl.quorum.tcnative.ocsp.stapling* :
1780+
(Java system properties: **zookeeper.ssl.tcnative.ocsp.stapling** and **zookeeper.ssl.quorum.tcnative.ocsp.stapling**)
17811781
**New in 3.10.0:**
17821782
Specifies whether OCSP stapling is requested by the client.
17831783
This option has no effect unless the the OpenSSL tcnative SSL provider with the OpenSSL library is used.

zookeeper-server/src/main/java/org/apache/zookeeper/common/ClientX509Util.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ public SslContext createNettySslContextForClient(ZKConfig config)
8989
sslContextBuilder.enableOcsp(ocspEnabled);
9090
}
9191
// Explicit option takes precedence if set
92-
if (config.getTristate(getSslTcnativeOcspEnabledProperty()).isTrue()) {
92+
if (config.getTristate(getSslTcnativeOcspStaplingEnabledProperty()).isTrue()) {
9393
logTcnativeOcsp(true);
9494
sslContextBuilder.enableOcsp(true);
95-
} else if (config.getTristate(getSslTcnativeOcspEnabledProperty()).isFalse()) {
95+
} else if (config.getTristate(getSslTcnativeOcspStaplingEnabledProperty()).isFalse()) {
9696
sslContextBuilder.enableOcsp(false);
9797
}
9898
String[] enabledProtocols = getEnabledProtocols(config);
@@ -117,7 +117,7 @@ private void logTcnativeOcsp(boolean enable) {
117117
if (enable && !OpenSsl.isOcspSupported()) {
118118
// SslContextBuilder.enableOcsp() doesn't do anything, unless the default BoringSSL
119119
// tcnative dependency is replaced with an OpenSsl one.
120-
LOG.warn("Trying to enable OCSP for tcnative OpenSSL provider, but it is not supported. The setting will be ignored");
120+
LOG.warn("Trying to enable OCSP for tcnative OpenSSL provider, but it is not supported. The setting will be ignored", OpenSsl.versionString());
121121
}
122122
}
123123

@@ -150,9 +150,9 @@ public SslContext createNettySslContextForServer(ZKConfig config, KeyManager key
150150
if (sslProvider == SslProvider.OPENSSL || sslProvider == SslProvider.OPENSSL_REFCNT) {
151151
sslContextBuilder.enableOcsp(config.getBoolean(getSslOcspEnabledProperty()));
152152
}
153-
if (config.getTristate(getSslTcnativeOcspEnabledProperty()).isTrue()) {
153+
if (config.getTristate(getSslTcnativeOcspStaplingEnabledProperty()).isTrue()) {
154154
sslContextBuilder.enableOcsp(true);
155-
} else if (config.getTristate(getSslTcnativeOcspEnabledProperty()).isFalse()) {
155+
} else if (config.getTristate(getSslTcnativeOcspStaplingEnabledProperty()).isFalse()) {
156156
sslContextBuilder.enableOcsp(false);
157157
}
158158
String[] enabledProtocols = getEnabledProtocols(config);

zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public io.netty.handler.ssl.ClientAuth toNettyClientAuth() {
164164
private final String sslClientHostnameVerificationEnabledProperty = getConfigPrefix() + "clientHostnameVerification";
165165
private final String sslCrlEnabledProperty = getConfigPrefix() + "crl";
166166
private final String sslOcspEnabledProperty = getConfigPrefix() + "ocsp";
167-
private final String sslTcnativeOcspEnabledProperty = getConfigPrefix() + ".tcnative.ocsp";
167+
private final String sslTcnativeOcspStaplingEnabledProperty = getConfigPrefix() + ".tcnative.ocsp.stapling";
168168
private final String sslClientAuthProperty = getConfigPrefix() + "clientAuth";
169169
private final String sslHandshakeDetectionTimeoutMillisProperty = getConfigPrefix() + "handshakeDetectionTimeoutMillis";
170170

@@ -249,8 +249,8 @@ public String getSslOcspEnabledProperty() {
249249
return sslOcspEnabledProperty;
250250
}
251251

252-
public String getSslTcnativeOcspEnabledProperty() {
253-
return sslTcnativeOcspEnabledProperty;
252+
public String getSslTcnativeOcspStaplingEnabledProperty() {
253+
return sslTcnativeOcspStaplingEnabledProperty;
254254
}
255255

256256
public String getSslClientAuthProperty() {

zookeeper-server/src/main/java/org/apache/zookeeper/common/ZKConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void putSSLProperties(X509Util x509Util) {
131131
properties.put(x509Util.getSslHostnameVerificationEnabledProperty(), System.getProperty(x509Util.getSslHostnameVerificationEnabledProperty()));
132132
properties.put(x509Util.getSslCrlEnabledProperty(), System.getProperty(x509Util.getSslCrlEnabledProperty()));
133133
properties.put(x509Util.getSslOcspEnabledProperty(), System.getProperty(x509Util.getSslOcspEnabledProperty()));
134-
properties.put(x509Util.getSslTcnativeOcspEnabledProperty(), System.getProperty(x509Util.getSslTcnativeOcspEnabledProperty()));
134+
properties.put(x509Util.getSslTcnativeOcspStaplingEnabledProperty(), System.getProperty(x509Util.getSslTcnativeOcspStaplingEnabledProperty()));
135135
properties.put(x509Util.getSslClientAuthProperty(), System.getProperty(x509Util.getSslClientAuthProperty()));
136136
properties.put(x509Util.getSslHandshakeDetectionTimeoutMillisProperty(), System.getProperty(x509Util.getSslHandshakeDetectionTimeoutMillisProperty()));
137137
properties.put(x509Util.getFipsModeProperty(), System.getProperty(x509Util.getFipsModeProperty()));

0 commit comments

Comments
 (0)