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