2020-08-29 15:59:07 +08:00
|
|
|
/*
|
2021-03-11 21:27:36 +08:00
|
|
|
* Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2020-08-29 15:59:07 +08:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
|
|
|
|
2020-10-04 22:34:31 +08:00
|
|
|
#include "crypto/types.h"
|
|
|
|
|
2020-09-04 15:55:28 +08:00
|
|
|
/* Functions that are common */
|
2021-04-10 00:26:34 +08:00
|
|
|
int ossl_rsa_check_key(OSSL_LIB_CTX *ctx, const RSA *rsa, int operation);
|
|
|
|
int ossl_ec_check_key(OSSL_LIB_CTX *ctx, const EC_KEY *ec, int protect);
|
|
|
|
int ossl_dsa_check_key(OSSL_LIB_CTX *ctx, const DSA *dsa, int sign);
|
|
|
|
int ossl_dh_check_key(OSSL_LIB_CTX *ctx, const DH *dh);
|
2020-08-29 15:59:07 +08:00
|
|
|
|
2021-04-10 00:26:34 +08:00
|
|
|
int ossl_digest_is_allowed(OSSL_LIB_CTX *ctx, const EVP_MD *md);
|
2021-05-10 22:51:39 +08:00
|
|
|
/* With security check enabled it can return -1 to indicate disallowed md */
|
2021-04-10 00:26:34 +08:00
|
|
|
int ossl_digest_get_approved_nid_with_sha1(OSSL_LIB_CTX *ctx, const EVP_MD *md,
|
|
|
|
int sha1_allowed);
|
2020-08-29 15:59:07 +08:00
|
|
|
|
|
|
|
/* Functions that are common */
|
2021-02-17 18:01:34 +08:00
|
|
|
int ossl_digest_md_to_nid(const EVP_MD *md, const OSSL_ITEM *it, size_t it_len);
|
|
|
|
int ossl_digest_get_approved_nid(const EVP_MD *md);
|
2020-09-04 15:55:28 +08:00
|
|
|
|
|
|
|
/* Functions that have different implementations for the FIPS_MODULE */
|
2021-04-10 00:26:34 +08:00
|
|
|
int ossl_digest_rsa_sign_get_md_nid(OSSL_LIB_CTX *ctx, const EVP_MD *md,
|
|
|
|
int sha1_allowed);
|
|
|
|
int ossl_securitycheck_enabled(OSSL_LIB_CTX *libctx);
|
2023-02-08 15:22:43 +08:00
|
|
|
int ossl_tls1_prf_ems_check_enabled(OSSL_LIB_CTX *libctx);
|