VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.7/providers/common/securitycheck_fips.c@ 106625

最後變更 在這個檔案從106625是 104078,由 vboxsync 提交於 12 月 前

openssl-3.1.5: Applied and adjusted our OpenSSL changes to 3.1.4. bugref:10638

檔案大小: 1.3 KB
 
1/*
2 * Copyright 2020-2023 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 "internal/deprecated.h"
11
12#include <openssl/rsa.h>
13#include <openssl/dsa.h>
14#include <openssl/dh.h>
15#include <openssl/ec.h>
16#include <openssl/err.h>
17#include <openssl/proverr.h>
18#include <openssl/core_names.h>
19#include <openssl/obj_mac.h>
20#include "prov/securitycheck.h"
21#include "prov/fipscommon.h"
22
23int ossl_securitycheck_enabled(OSSL_LIB_CTX *libctx)
24{
25#if !defined(OPENSSL_NO_FIPS_SECURITYCHECKS)
26 return FIPS_security_check_enabled(libctx);
27#else
28 return 0;
29#endif /* OPENSSL_NO_FIPS_SECURITYCHECKS */
30}
31
32int ossl_tls1_prf_ems_check_enabled(OSSL_LIB_CTX *libctx)
33{
34 return FIPS_tls_prf_ems_check(libctx);
35}
36
37int ossl_digest_rsa_sign_get_md_nid(OSSL_LIB_CTX *ctx, const EVP_MD *md,
38 int sha1_allowed)
39{
40#if !defined(OPENSSL_NO_FIPS_SECURITYCHECKS)
41 if (ossl_securitycheck_enabled(ctx))
42 return ossl_digest_get_approved_nid_with_sha1(ctx, md, sha1_allowed);
43#endif /* OPENSSL_NO_FIPS_SECURITYCHECKS */
44 return ossl_digest_get_approved_nid(md);
45}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette