Skip to content

Commit

Permalink
[pulsar-admin-cli] add tls-trust-cert-path option to cli input (apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhabalia authored and massakam committed Feb 28, 2019
1 parent 1dd7207 commit 8c181cd
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ public class PulsarAdminTool {

@Parameter(names = { "--tls-allow-insecure" }, description = "Allow TLS insecure connection")
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")
Boolean tlsEnableHostnameVerification;

Expand All @@ -74,7 +76,9 @@ public class PulsarAdminTool {
boolean tlsEnableHostnameVerification = this.tlsEnableHostnameVerification != null
? this.tlsEnableHostnameVerification
: 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)
.enableTlsHostnameVerification(tlsEnableHostnameVerification)
Expand Down

0 comments on commit 8c181cd

Please sign in to comment.