summaryrefslogtreecommitdiffstats
path: root/crypto/pem/pem_lib.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-05-03 18:00:27 +0000
committerjkim <jkim@FreeBSD.org>2016-05-03 18:00:27 +0000
commitacb827e3083196de4c00b67ac9ae3bf860ffd4a9 (patch)
tree2dd85c58056a364765d9ae59d6a1774d41f88523 /crypto/pem/pem_lib.c
parent72d32bf80dfdcfe0e69da200b66f195e919653f7 (diff)
downloadFreeBSD-src-acb827e3083196de4c00b67ac9ae3bf860ffd4a9.zip
FreeBSD-src-acb827e3083196de4c00b67ac9ae3bf860ffd4a9.tar.gz
Import OpenSSL 1.0.2h.
Diffstat (limited to 'crypto/pem/pem_lib.c')
-rw-r--r--crypto/pem/pem_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index a29821a..fe881d6 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -348,7 +348,7 @@ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
if (enc != NULL) {
objstr = OBJ_nid2sn(EVP_CIPHER_nid(enc));
- if (objstr == NULL) {
+ if (objstr == NULL || EVP_CIPHER_iv_length(enc) == 0) {
PEMerr(PEM_F_PEM_ASN1_WRITE_BIO, PEM_R_UNSUPPORTED_CIPHER);
goto err;
}
OpenPOWER on IntegriCloud