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