Skip to content

Commit

Permalink
fix(uri_parser): TLS uri variants imply ssl=true
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Jan 17, 2020
1 parent f8bdb8d commit c8d182e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/core/uri_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,12 @@ function translateTLSOptions(queryString) {
}

if (queryString.tlsCAFile) {
queryString.ssl = true;
queryString.sslCA = queryString.tlsCAFile;
}

if (queryString.tlsCertificateKeyFile) {
queryString.ssl = true;
if (queryString.tlsCertificateFile) {
queryString.sslCert = queryString.tlsCertificateFile;
queryString.sslKey = queryString.tlsCertificateKeyFile;
Expand All @@ -450,6 +452,7 @@ function translateTLSOptions(queryString) {
}

if (queryString.tlsCertificateKeyFilePassword) {
queryString.ssl = true;
queryString.sslPass = queryString.tlsCertificateKeyFilePassword;
}

Expand Down

0 comments on commit c8d182e

Please sign in to comment.