提交 de4bbe8d 编写于 作者: R Rajan Dhabalia 提交者: Matteo Merli

[pulsar-admin-cli] add tls-trust-cert-path option to cli input (#3709)

上级 1cfbfe85
...@@ -49,8 +49,10 @@ public class PulsarAdminTool { ...@@ -49,8 +49,10 @@ public class PulsarAdminTool {
@Parameter(names = { "--tls-allow-insecure" }, description = "Allow TLS insecure connection") @Parameter(names = { "--tls-allow-insecure" }, description = "Allow TLS insecure connection")
Boolean tlsAllowInsecureConnection; Boolean tlsAllowInsecureConnection;
@Parameter(names = { "--tls-trust-cert-path" }, description = "Allow TLS trust cert file path")
String tlsTrustCertsFilePath;
@Parameter(names = { "--tls-enable-hostname-verification" }, description = "Enable TLS common name verification") @Parameter(names = { "--tls-enable-hostname-verification" }, description = "Enable TLS common name verification")
Boolean tlsEnableHostnameVerification; Boolean tlsEnableHostnameVerification;
...@@ -70,7 +72,9 @@ public class PulsarAdminTool { ...@@ -70,7 +72,9 @@ public class PulsarAdminTool {
boolean tlsEnableHostnameVerification = this.tlsEnableHostnameVerification != null boolean tlsEnableHostnameVerification = this.tlsEnableHostnameVerification != null
? this.tlsEnableHostnameVerification ? this.tlsEnableHostnameVerification
: Boolean.parseBoolean(properties.getProperty("tlsEnableHostnameVerification", "false")); : Boolean.parseBoolean(properties.getProperty("tlsEnableHostnameVerification", "false"));
String tlsTrustCertsFilePath = properties.getProperty("tlsTrustCertsFilePath"); final String tlsTrustCertsFilePath = StringUtils.isNotBlank(this.tlsTrustCertsFilePath)
? this.tlsTrustCertsFilePath
: properties.getProperty("tlsTrustCertsFilePath");
adminBuilder = PulsarAdmin.builder().allowTlsInsecureConnection(tlsAllowInsecureConnection) adminBuilder = PulsarAdmin.builder().allowTlsInsecureConnection(tlsAllowInsecureConnection)
.enableTlsHostnameVerification(tlsEnableHostnameVerification) .enableTlsHostnameVerification(tlsEnableHostnameVerification)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册