2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00

remove const qualifier in isc__crypto_*

The `EVP_MD *` pointers assigned with `EVP_MD_fetch` aren't const
qualified, adding a correctness issue.
This commit is contained in:
Aydın Mercan 2025-08-12 12:51:38 +03:00
parent 723439908a
commit f53b107bb2
No known key found for this signature in database
2 changed files with 18 additions and 18 deletions

View File

@ -33,12 +33,12 @@ static isc_mem_t *isc__crypto_mctx = NULL;
static OSSL_PROVIDER *base = NULL, *fips = NULL;
#endif /* OPENSSL_VERSION_NUMBER >= 0x30000000L */
const EVP_MD *isc__crypto_md5 = NULL;
const EVP_MD *isc__crypto_sha1 = NULL;
const EVP_MD *isc__crypto_sha224 = NULL;
const EVP_MD *isc__crypto_sha256 = NULL;
const EVP_MD *isc__crypto_sha384 = NULL;
const EVP_MD *isc__crypto_sha512 = NULL;
EVP_MD *isc__crypto_md5 = NULL;
EVP_MD *isc__crypto_sha1 = NULL;
EVP_MD *isc__crypto_sha224 = NULL;
EVP_MD *isc__crypto_sha256 = NULL;
EVP_MD *isc__crypto_sha384 = NULL;
EVP_MD *isc__crypto_sha512 = NULL;
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#define md_register_algorithm(alg, algname) \
@ -53,7 +53,7 @@ const EVP_MD *isc__crypto_sha512 = NULL;
#define md_unregister_algorithm(alg) \
{ \
if (isc__crypto_##alg != NULL) { \
EVP_MD_free(UNCONST(isc__crypto_##alg)); \
EVP_MD_free(isc__crypto_##alg); \
isc__crypto_##alg = NULL; \
} \
}

View File

@ -17,12 +17,12 @@
#include <isc/types.h>
extern const EVP_MD *isc__crypto_md5;
extern const EVP_MD *isc__crypto_sha1;
extern const EVP_MD *isc__crypto_sha224;
extern const EVP_MD *isc__crypto_sha256;
extern const EVP_MD *isc__crypto_sha384;
extern const EVP_MD *isc__crypto_sha512;
extern EVP_MD *isc__crypto_md5;
extern EVP_MD *isc__crypto_sha1;
extern EVP_MD *isc__crypto_sha224;
extern EVP_MD *isc__crypto_sha256;
extern EVP_MD *isc__crypto_sha384;
extern EVP_MD *isc__crypto_sha512;
bool
isc_crypto_fips_mode(void);