diff options
author | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2015-03-30 14:41:01 +0900 |
---|---|---|
committer | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2015-04-15 00:36:13 +0900 |
commit | e4872d7405c60da50692e3c4cd5a9df2e96a5680 (patch) | |
tree | 2ccc49f465ec7364702c99f6aa190c8c60de16ef /deps/openssl/openssl/crypto/dh/dh_key.c | |
parent | 50e9fc197d57ecd7b3c23ae85d66b59fedf4ea82 (diff) | |
download | android-node-v8-e4872d7405c60da50692e3c4cd5a9df2e96a5680.tar.gz android-node-v8-e4872d7405c60da50692e3c4cd5a9df2e96a5680.tar.bz2 android-node-v8-e4872d7405c60da50692e3c4cd5a9df2e96a5680.zip |
deps: upgrade openssl to 1.0.2a
This just replaces all sources in deps/openssl/openssl to originals in
https://www.openssl.org/source/openssl-1.0.2a.tar.gz
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/openssl/openssl/crypto/dh/dh_key.c')
-rw-r--r-- | deps/openssl/openssl/crypto/dh/dh_key.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deps/openssl/openssl/crypto/dh/dh_key.c b/deps/openssl/openssl/crypto/dh/dh_key.c index 9e1d8e5822..1d80fb2c5f 100644 --- a/deps/openssl/openssl/crypto/dh/dh_key.c +++ b/deps/openssl/openssl/crypto/dh/dh_key.c @@ -94,6 +94,20 @@ int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) return dh->meth->compute_key(key, pub_key, dh); } +int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) +{ + int rv, pad; + rv = dh->meth->compute_key(key, pub_key, dh); + if (rv <= 0) + return rv; + pad = BN_num_bytes(dh->p) - rv; + if (pad > 0) { + memmove(key + pad, key, rv); + memset(key, 0, pad); + } + return rv + pad; +} + static DH_METHOD dh_ossl = { "OpenSSL DH Method", generate_key, |