diff options
author | David Benjamin <davidben@google.com> | 2017-09-17 16:01:54 -0400 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2017-11-11 20:42:49 +1100 |
commit | 9637a7b58caf034c2afc5869ecd120cf262eaaf9 (patch) | |
tree | 98c8605b3b6a9e3d8e32b1aaa987b1384479f91a /src/node_crypto.h | |
parent | 0f842f500eb7e117428e2227482f864ae72f58f0 (diff) | |
download | android-node-v8-9637a7b58caf034c2afc5869ecd120cf262eaaf9.tar.gz android-node-v8-9637a7b58caf034c2afc5869ecd120cf262eaaf9.tar.bz2 android-node-v8-9637a7b58caf034c2afc5869ecd120cf262eaaf9.zip |
crypto: account for new 1.1.0 SSL APIs
This is cherry-picked from PR #8491 and tidied up. This change does
*not* account for the larger ticket key in OpenSSL 1.1.0. That will be
done in a follow-up commit as the 48-byte ticket key is part of Node's
public API.
rvagg: removed BORINGSSL defines before landing
PR-URL: https://github.com/nodejs/node/pull/16130
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'src/node_crypto.h')
-rw-r--r-- | src/node_crypto.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h index 235736dde6..9fba7cda0d 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -241,10 +241,17 @@ class SSLWrap { static void InitNPN(SecureContext* sc); static void AddMethods(Environment* env, v8::Local<v8::FunctionTemplate> t); +#if OPENSSL_VERSION_NUMBER < 0x10100000L static SSL_SESSION* GetSessionCallback(SSL* s, unsigned char* key, int len, int* copy); +#else + static SSL_SESSION* GetSessionCallback(SSL* s, + const unsigned char* key, + int len, + int* copy); +#endif static int NewSessionCallback(SSL* s, SSL_SESSION* sess); static void OnClientHello(void* arg, const ClientHelloParser::ClientHello& hello); |