File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ export interface ClientConfig {
2929 tlsTrustCertsFilePath ?: string ;
3030 tlsValidateHostname ?: boolean ;
3131 tlsAllowInsecureConnection ?: boolean ;
32+ tlsCertificateFilePath ?: string ;
33+ tlsPrivateKeyFilePath ?: string ;
3234 statsIntervalInSeconds ?: number ;
3335 log ?: ( level : LogLevel , file : string , line : number , message : string ) => void ;
3436}
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ static const std::string CFG_USE_TLS = "useTls";
3838static const std::string CFG_TLS_TRUST_CERT = " tlsTrustCertsFilePath" ;
3939static const std::string CFG_TLS_VALIDATE_HOSTNAME = " tlsValidateHostname" ;
4040static const std::string CFG_TLS_ALLOW_INSECURE = " tlsAllowInsecureConnection" ;
41+ static const std::string CFG_TLS_CERTIFICATE_FILE_PATH = " tlsCertificateFilePath" ;
42+ static const std::string CFG_TLS_PRIVATE_KEY_FILE_PATH = " tlsPrivateKeyFilePath" ;
4143static const std::string CFG_STATS_INTERVAL = " statsIntervalInSeconds" ;
4244static const std::string CFG_LOG = " log" ;
4345
@@ -175,6 +177,12 @@ Client::Client(const Napi::CallbackInfo &info) : Napi::ObjectWrap<Client>(info)
175177 pulsar_client_configuration_set_validate_hostname (cClientConfig.get (), tlsValidateHostname.Value ());
176178 }
177179
180+ if (clientConfig.Has (CFG_TLS_ALLOW_INSECURE) && clientConfig.Get (CFG_TLS_ALLOW_INSECURE).IsBoolean ()) {
181+ Napi::Boolean tlsAllowInsecureConnection = clientConfig.Get (CFG_TLS_ALLOW_INSECURE).ToBoolean ();
182+ pulsar_client_configuration_set_tls_allow_insecure_connection (cClientConfig.get (),
183+ tlsAllowInsecureConnection.Value ());
184+ }
185+
178186 if (clientConfig.Has (CFG_TLS_ALLOW_INSECURE) && clientConfig.Get (CFG_TLS_ALLOW_INSECURE).IsBoolean ()) {
179187 Napi::Boolean tlsAllowInsecureConnection = clientConfig.Get (CFG_TLS_ALLOW_INSECURE).ToBoolean ();
180188 pulsar_client_configuration_set_tls_allow_insecure_connection (cClientConfig.get (),
You can’t perform that action at this time.
0 commit comments