In EVP_PKEY_assign[_...], return 0 for an error when they
authorBodo Möller <bodo@openssl.org>
Fri, 14 Jan 2000 18:41:28 +0000 (18:41 +0000)
committerBodo Möller <bodo@openssl.org>
Fri, 14 Jan 2000 18:41:28 +0000 (18:41 +0000)
"key" is NULL.

crypto/evp/p_lib.c

index 94c4047..5dcbbc8 100644 (file)
@@ -202,7 +202,7 @@ int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key)
        pkey->type=EVP_PKEY_type(type);
        pkey->save_type=type;
        pkey->pkey.ptr=key;
        pkey->type=EVP_PKEY_type(type);
        pkey->save_type=type;
        pkey->pkey.ptr=key;
-       return(1);
+       return(key != NULL);
        }
 
 #ifndef NO_RSA
        }
 
 #ifndef NO_RSA