Skip to content

Commit

Permalink
add two tls options
Browse files Browse the repository at this point in the history
  • Loading branch information
Omidznlp committed Sep 16, 2022
1 parent 22ba24d commit ce0de25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ passed through from [this](https://nodejs.org/api/tls.html#new-tlstlssocketsocke
passed through from [this](https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options) constructor.
* __ecdhCurve:__ See <https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions> for more information on this option,
passed through from [this](https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options) constructor.
* __rejectUnauthorized:__ See <https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options> for more information on this option,
passed through from [this](https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options) constructor.
* __requestCert:__ See <https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options> for more information on this option,
passed through from [this](https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options) constructor.

*Metadata:* Logged as string compiled by [glossy][3].

Expand Down
6 changes: 5 additions & 1 deletion lib/winston-syslog.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class Syslog extends Transport {
this.secureProtocol = options.secureProtocol;
this.ciphers = options.ciphers;
this.ecdhCurve = options.ecdhCurve;
this.rejectUnauthorized = options.rejectUnauthorized;
this.requestCert = options.requestCert;
// end options for secure socket
//
// Merge the default message options.
Expand Down Expand Up @@ -353,7 +355,9 @@ class Syslog extends Transport {
const options = {
secureProtocol: this.secureProtocol,
ciphers: this.ciphers,
ecdhCurve: this.ecdhCurve
ecdhCurve: this.ecdhCurve,
rejectUnauthorized: this.rejectUnauthorized,
requestCert: this.requestCert
};

this.socket = /^tls[4|6]?$/.test(this.protocol)
Expand Down

0 comments on commit ce0de25

Please sign in to comment.