summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/enc.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-07-19 19:59:37 +0000
committerkris <kris@FreeBSD.org>2001-07-19 19:59:37 +0000
commit84fabcda925860c067e7f03b07d3a988add59e0b (patch)
treeef18fca7a2e8717f4db054621eb99df1a2637e56 /crypto/openssl/apps/enc.c
parentd0bb02b6446135ca9fe648fd3c37af5f01a47815 (diff)
parent3b19ada1e8e5f87b844d2cc1e72907cfb7774fb6 (diff)
downloadFreeBSD-src-84fabcda925860c067e7f03b07d3a988add59e0b.zip
FreeBSD-src-84fabcda925860c067e7f03b07d3a988add59e0b.tar.gz
This commit was generated by cvs2svn to compensate for changes in r79998,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/openssl/apps/enc.c')
-rw-r--r--crypto/openssl/apps/enc.c8
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");
OpenPOWER on IntegriCloud