diff options
author | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2015-06-12 00:00:05 +0900 |
---|---|---|
committer | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2015-06-12 09:47:44 +0900 |
commit | c21b24decf6fef3d808cdf1e2fa58be156898d65 (patch) | |
tree | 3c4cfc597b96b6fbb1c1f18bce4693396c97b32d /deps/openssl/openssl/apps/enc.c | |
parent | a6b8ee19b85bbd798510191f0aee596f36b909d2 (diff) | |
download | android-node-v8-c21b24decf6fef3d808cdf1e2fa58be156898d65.tar.gz android-node-v8-c21b24decf6fef3d808cdf1e2fa58be156898d65.tar.bz2 android-node-v8-c21b24decf6fef3d808cdf1e2fa58be156898d65.zip |
deps: upgrade openssl sources to 1.0.2b
This just replaces all sources of openssl-1.0.2b.tar.gz
into deps/openssl/openssl
Fixes: https://github.com/nodejs/io.js/issues/1921
PR-URL: https://github.com/nodejs/io.js/pull/1950
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/openssl/openssl/apps/enc.c')
-rw-r--r-- | deps/openssl/openssl/apps/enc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/deps/openssl/openssl/apps/enc.c b/deps/openssl/openssl/apps/enc.c index 5c2cf7a4ac..7b7c70b132 100644 --- a/deps/openssl/openssl/apps/enc.c +++ b/deps/openssl/openssl/apps/enc.c @@ -548,9 +548,14 @@ int MAIN(int argc, char **argv) else OPENSSL_cleanse(str, strlen(str)); } - if ((hiv != NULL) && !set_hex(hiv, iv, sizeof iv)) { - BIO_printf(bio_err, "invalid hex iv value\n"); - goto end; + if (hiv != NULL) { + int siz = EVP_CIPHER_iv_length(cipher); + if (siz == 0) { + BIO_printf(bio_err, "warning: iv not use by this cipher\n"); + } else if (!set_hex(hiv, iv, sizeof iv)) { + BIO_printf(bio_err, "invalid hex iv value\n"); + goto end; + } } if ((hiv == NULL) && (str == NULL) && EVP_CIPHER_iv_length(cipher) != 0) { @@ -562,7 +567,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "iv undefined\n"); goto end; } - if ((hkey != NULL) && !set_hex(hkey, key, sizeof key)) { + if ((hkey != NULL) && !set_hex(hkey, key, EVP_CIPHER_key_length(cipher))) { BIO_printf(bio_err, "invalid hex key value\n"); goto end; } |