mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
Call ERR_clear_error on EVP_MD_fetch or EVP_##alg error
This commit is contained in:
@@ -181,6 +181,9 @@ const isc_md_type_t *isc__md_sha512 = NULL;
|
|||||||
{ \
|
{ \
|
||||||
REQUIRE(isc__md_##alg == NULL); \
|
REQUIRE(isc__md_##alg == NULL); \
|
||||||
isc__md_##alg = EVP_MD_fetch(NULL, algname, NULL); \
|
isc__md_##alg = EVP_MD_fetch(NULL, algname, NULL); \
|
||||||
|
if (isc__md_##alg == NULL) { \
|
||||||
|
ERR_clear_error(); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define md_unregister_algorithm(alg) \
|
#define md_unregister_algorithm(alg) \
|
||||||
@@ -195,6 +198,9 @@ const isc_md_type_t *isc__md_sha512 = NULL;
|
|||||||
#define md_register_algorithm(alg, algname) \
|
#define md_register_algorithm(alg, algname) \
|
||||||
{ \
|
{ \
|
||||||
isc__md_##alg = EVP_##alg(); \
|
isc__md_##alg = EVP_##alg(); \
|
||||||
|
if (isc__md_##alg == NULL) { \
|
||||||
|
ERR_clear_error(); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
#define md_unregister_algorithm(alg)
|
#define md_unregister_algorithm(alg)
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user