diff options
author | joelostrowski <jo@craftwork.dk> | 2016-04-15 16:49:36 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-11-11 13:35:23 -0800 |
commit | 6ee985f311de14621c440377f76d0391b6b23320 (patch) | |
tree | 59f867c0c20454201dba81344aab16bff5c72a48 /lib/_tls_wrap.js | |
parent | f7436ba1358f6af30d7d9baffdbef8754573f0e5 (diff) | |
download | android-node-v8-6ee985f311de14621c440377f76d0391b6b23320.tar.gz android-node-v8-6ee985f311de14621c440377f76d0391b6b23320.tar.bz2 android-node-v8-6ee985f311de14621c440377f76d0391b6b23320.zip |
tls: implement clientCertEngine option
Add an option 'clientCertEngine' to `tls.createSecureContext()` which gets
wired up to OpenSSL function `SSL_CTX_set_client_cert_engine`. The option
is passed through from `https.request()` as well. This allows using a custom
OpenSSL engine to provide the client certificate.
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r-- | lib/_tls_wrap.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 1bd76a7f97..b272d8090b 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -816,6 +816,7 @@ function tlsConnectionListener(rawSocket) { // - rejectUnauthorized. Boolean, default to true. // - key. string. // - cert: string. +// - clientCertEngine: string. // - ca: string or array of strings. // - sessionTimeout: integer. // @@ -859,6 +860,7 @@ function Server(options, listener) { key: this.key, passphrase: this.passphrase, cert: this.cert, + clientCertEngine: this.clientCertEngine, ca: this.ca, ciphers: this.ciphers, ecdhCurve: this.ecdhCurve, @@ -931,6 +933,8 @@ Server.prototype.setOptions = function(options) { if (options.key) this.key = options.key; if (options.passphrase) this.passphrase = options.passphrase; if (options.cert) this.cert = options.cert; + if (options.clientCertEngine) + this.clientCertEngine = options.clientCertEngine; if (options.ca) this.ca = options.ca; if (options.secureProtocol) this.secureProtocol = options.secureProtocol; if (options.crl) this.crl = options.crl; |