You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/07 08:22:36 UTC

[GitHub] [pulsar] nodece commented on a change in pull request #13740: [Security] Fix handshake failure on web service

nodece commented on a change in pull request #13740:
URL: https://github.com/apache/pulsar/pull/13740#discussion_r820469653



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
##########
@@ -109,17 +108,24 @@ public WebService(PulsarService pulsar) throws PulsarServerException {
                             config.getTlsTrustStore(),
                             config.getTlsTrustStorePassword(),
                             config.isTlsRequireTrustedClientCertOnConnect(),
-                            config.getWebServiceTlsCiphers(),
-                            config.getWebServiceTlsProtocols(),
+                            config.getWebServiceTlsCiphers() != null ? config.getWebServiceTlsCiphers() :
+                                    config.getTlsCiphers(),
+                            config.getWebServiceTlsProtocols() != null ? config.getWebServiceTlsProtocols() :
+                                    config.getTlsCiphers(),

Review comment:
       Fixed.

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
##########
@@ -109,17 +108,24 @@ public WebService(PulsarService pulsar) throws PulsarServerException {
                             config.getTlsTrustStore(),
                             config.getTlsTrustStorePassword(),
                             config.isTlsRequireTrustedClientCertOnConnect(),
-                            config.getWebServiceTlsCiphers(),
-                            config.getWebServiceTlsProtocols(),
+                            config.getWebServiceTlsCiphers() != null ? config.getWebServiceTlsCiphers() :
+                                    config.getTlsCiphers(),
+                            config.getWebServiceTlsProtocols() != null ? config.getWebServiceTlsProtocols() :
+                                    config.getTlsCiphers(),
                             config.getTlsCertRefreshCheckDurationSec()
                     );
                 } else {
-                    sslCtxFactory = SecurityUtility.createSslContextFactory(
+                    sslCtxFactory = JettySslContextFactory.createServerSslContext(
+                            config.getTlsProvider(),
                             config.isTlsAllowInsecureConnection(),
                             config.getTlsTrustCertsFilePath(),
                             config.getTlsCertificateFilePath(),
                             config.getTlsKeyFilePath(),
-                            config.isTlsRequireTrustedClientCertOnConnect(), true,
+                            config.isTlsRequireTrustedClientCertOnConnect(),
+                            config.getWebServiceTlsCiphers() != null ? config.getWebServiceTlsCiphers() :
+                                    config.getTlsCiphers(),
+                            config.getWebServiceTlsProtocols() != null ? config.getWebServiceTlsProtocols() :
+                                    config.getTlsCiphers(),

Review comment:
       Fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org