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