4
0
mirror of https://github.com/QuasarApp/openssl.git synced 2025-05-02 12:39:38 +00:00

crypto/provider_core.c: fix a couple of faulty ERR_raise_data() calls

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13318)
This commit is contained in:
Richard Levitte 2020-11-10 10:28:16 +01:00
parent a150f8e1fc
commit 105d01f1eb

@ -284,7 +284,7 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
if ((prov = ossl_provider_find(libctx, name,
noconfig)) != NULL) { /* refcount +1 */
ossl_provider_free(prov); /* refcount -1 */
ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_PROVIDER_ALREADY_EXISTS, NULL,
ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_PROVIDER_ALREADY_EXISTS,
"name=%s", name);
return NULL;
}
@ -534,7 +534,7 @@ static int provider_activate(OSSL_PROVIDER *prov)
if (prov->init_function == NULL
|| !prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
&provider_dispatch, &tmp_provctx)) {
ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL, NULL,
ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
"name=%s", prov->name);
#ifndef FIPS_MODULE
DSO_free(prov->module);