From 62f0afa2ecead02b1258dabab8097ca278a22f8f Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 21 Sep 2016 20:29:42 -0400 Subject: Import upstream version 0.9+1474479173.6c180c6 --- Cryptlib/OpenSSL/crypto/pem/pem_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Cryptlib/OpenSSL/crypto/pem/pem_lib.c') diff --git a/Cryptlib/OpenSSL/crypto/pem/pem_lib.c b/Cryptlib/OpenSSL/crypto/pem/pem_lib.c index a29821aa..e25cc685 100644 --- a/Cryptlib/OpenSSL/crypto/pem/pem_lib.c +++ b/Cryptlib/OpenSSL/crypto/pem/pem_lib.c @@ -84,7 +84,7 @@ int pem_check_suffix(const char *pem_str, const char *suffix); int PEM_def_callback(char *buf, int num, int w, void *key) { -#ifdef OPENSSL_NO_FP_API +#if defined(OPENSSL_NO_FP_API) || defined(OPENSSL_NO_UI) /* * We should not ever call the default callback routine from windows. */ @@ -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; } -- cgit v1.2.3