7d163f70fa4f243d0a05c00585b387f9326fad5f
[openssl.git] / providers / common / include / prov / securitycheck.h
1 /*
2  * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 #include "crypto/types.h"
11
12 /* Functions that are common */
13 int ossl_rsa_check_key(const RSA *rsa, int operation);
14 int ossl_ec_check_key(const EC_KEY *ec, int protect);
15 int ossl_dsa_check_key(const DSA *dsa, int sign);
16 int ossl_dh_check_key(const DH *dh);
17
18 int ossl_digest_is_allowed(const EVP_MD *md);
19 int ossl_digest_get_approved_nid_with_sha1(const EVP_MD *md, int sha1_allowed);
20
21 /* Functions that are common */
22 int ossl_digest_md_to_nid(const EVP_MD *md, const OSSL_ITEM *it, size_t it_len);
23 int ossl_digest_get_approved_nid(const EVP_MD *md);
24
25 /* Functions that have different implementations for the FIPS_MODULE */
26 int ossl_digest_rsa_sign_get_md_nid(const EVP_MD *md, int sha1_allowed);
27 int ossl_securitycheck_enabled(void);