summaryrefslogtreecommitdiff
path: root/src/node_crypto.h
diff options
context:
space:
mode:
authorjoelostrowski <jo@craftwork.dk>2016-04-15 16:49:36 +0200
committerRich Trott <rtrott@gmail.com>2017-11-11 13:35:23 -0800
commit6ee985f311de14621c440377f76d0391b6b23320 (patch)
tree59f867c0c20454201dba81344aab16bff5c72a48 /src/node_crypto.h
parentf7436ba1358f6af30d7d9baffdbef8754573f0e5 (diff)
downloadandroid-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 'src/node_crypto.h')
-rw-r--r--src/node_crypto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h
index c3bc5d24c3..a9719dec25 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -93,6 +93,9 @@ class SecureContext : public BaseObject {
SSL_CTX* ctx_;
X509* cert_;
X509* issuer_;
+#ifndef OPENSSL_NO_ENGINE
+ bool client_cert_engine_provided_ = false;
+#endif // !OPENSSL_NO_ENGINE
static const int kMaxSessionSize = 10 * 1024;
@@ -135,6 +138,10 @@ class SecureContext : public BaseObject {
const v8::FunctionCallbackInfo<v8::Value>& args);
static void Close(const v8::FunctionCallbackInfo<v8::Value>& args);
static void LoadPKCS12(const v8::FunctionCallbackInfo<v8::Value>& args);
+#ifndef OPENSSL_NO_ENGINE
+ static void SetClientCertEngine(
+ const v8::FunctionCallbackInfo<v8::Value>& args);
+#endif // !OPENSSL_NO_ENGINE
static void GetTicketKeys(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetTicketKeys(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetFreeListLength(