From: Dr. Stephen Henson Date: Thu, 24 Jun 2004 12:31:48 +0000 (+0000) Subject: Return an error if an attempt is made to encode or decode X-Git-Tag: OpenSSL_0_9_7e~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fee38dcb9a0d0a638bff92e758e5dd7495c9bc6b;p=openssl Return an error if an attempt is made to encode or decode cipher ASN1 parameters and the cipher doesn't support it. --- 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); }