2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00
bind/lib/isc/include/isc/crypto.h
Aydın Mercan f53b107bb2
remove const qualifier in isc__crypto_*
The `EVP_MD *` pointers assigned with `EVP_MD_fetch` aren't const
qualified, adding a correctness issue.
2025-08-12 12:51:38 +03:00

53 lines
1.0 KiB
C

/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
#include <openssl/evp.h>
#include <isc/types.h>
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);
/*
* Return if FIPS mode is currently enabled or not.
*/
isc_result_t
isc_crypto_fips_enable(void);
/*
* Enable FIPS mode. It cannot be disabled afterwards.
*
* This function is NOT thread safe.
*/
/**
* Private
*/
void
isc__crypto_setdestroycheck(bool check);
void
isc__crypto_initialize(void);
void
isc__crypto_shutdown(void);