From fee38dcb9a0d0a638bff92e758e5dd7495c9bc6b Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 24 Jun 2004 12:31:48 +0000 Subject: [PATCH] Return an error if an attempt is made to encode or decode cipher ASN1 parameters and the cipher doesn't support it. --- crypto/evp/evp_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index f14028dc31..a63ba19317 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -68,7 +68,7 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) if (c->cipher->set_asn1_parameters != NULL) ret=c->cipher->set_asn1_parameters(c,type); else - ret=1; + return -1; return(ret); } @@ -79,7 +79,7 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) if (c->cipher->get_asn1_parameters != NULL) ret=c->cipher->get_asn1_parameters(c,type); else - ret=1; + return -1; return(ret); } -- 2.40.0