diff options
author | kris <kris@FreeBSD.org> | 2001-07-19 19:59:37 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-07-19 19:59:37 +0000 |
commit | 3b19ada1e8e5f87b844d2cc1e72907cfb7774fb6 (patch) | |
tree | 97ecedd5f90991a7abe96b7ca0cb51fa579341b5 /crypto/openssl/apps/enc.c | |
parent | 12896e829e9474d92c70a1528cc64270e9dc08ad (diff) | |
download | FreeBSD-src-3b19ada1e8e5f87b844d2cc1e72907cfb7774fb6.zip FreeBSD-src-3b19ada1e8e5f87b844d2cc1e72907cfb7774fb6.tar.gz |
Initial import of OpenSSL 0.9.6b
Diffstat (limited to 'crypto/openssl/apps/enc.c')
-rw-r--r-- | crypto/openssl/apps/enc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/openssl/apps/enc.c b/crypto/openssl/apps/enc.c index 2101b4c..ef0e872 100644 --- a/crypto/openssl/apps/enc.c +++ b/crypto/openssl/apps/enc.c @@ -515,6 +515,14 @@ bad: BIO_printf(bio_err,"invalid hex iv value\n"); goto end; } + if ((hiv == NULL) && (str == NULL)) + { + /* No IV was explicitly set and no IV was generated + * during EVP_BytesToKey. Hence the IV is undefined, + * making correct decryption impossible. */ + BIO_printf(bio_err, "iv undefined\n"); + goto end; + } if ((hkey != NULL) && !set_hex(hkey,key,24)) { BIO_printf(bio_err,"invalid hex key value\n"); |