]> granicus.if.org Git - openssl/commitdiff
Return an error if an attempt is made to encode or decode
authorDr. Stephen Henson <steve@openssl.org>
Thu, 24 Jun 2004 12:31:48 +0000 (12:31 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 24 Jun 2004 12:31:48 +0000 (12:31 +0000)
cipher ASN1 parameters and the cipher doesn't support it.

crypto/evp/evp_lib.c

index f14028dc3122db7e63e967152ccea723862afb6e..a63ba19317c8feb4c68562e943a6925822efa7f8 100644 (file)
@@ -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);
        }