aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/providers/common/securitycheck_fips.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/providers/common/securitycheck_fips.c')
-rw-r--r--crypto/openssl/providers/common/securitycheck_fips.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/crypto/openssl/providers/common/securitycheck_fips.c b/crypto/openssl/providers/common/securitycheck_fips.c
index ea07ccd42bb8..e67641702282 100644
--- a/crypto/openssl/providers/common/securitycheck_fips.c
+++ b/crypto/openssl/providers/common/securitycheck_fips.c
@@ -34,27 +34,27 @@ int ossl_digest_rsa_sign_get_md_nid(const EVP_MD *md)
}
int ossl_fips_ind_rsa_key_check(OSSL_FIPS_IND *ind, int id,
- OSSL_LIB_CTX *libctx,
- const RSA *rsa, const char *desc, int protect)
+ OSSL_LIB_CTX *libctx,
+ const RSA *rsa, const char *desc, int protect)
{
int key_approved = ossl_rsa_check_key_size(rsa, protect);
if (!key_approved) {
if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, "Key size",
- ossl_fips_config_securitycheck_enabled)) {
- ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH,
- "operation: %s", desc);
+ ossl_fips_config_securitycheck_enabled)) {
+ ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH,
+ "operation: %s", desc);
return 0;
}
}
return 1;
}
-# ifndef OPENSSL_NO_EC
+#ifndef OPENSSL_NO_EC
int ossl_fips_ind_ec_key_check(OSSL_FIPS_IND *ind, int id,
- OSSL_LIB_CTX *libctx,
- const EC_GROUP *group, const char *desc,
- int protect)
+ OSSL_LIB_CTX *libctx,
+ const EC_GROUP *group, const char *desc,
+ int protect)
{
int curve_allowed, strength_allowed;
@@ -66,7 +66,7 @@ int ossl_fips_ind_ec_key_check(OSSL_FIPS_IND *ind, int id,
if (!strength_allowed || !curve_allowed) {
if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, "EC Key",
- ossl_fips_config_securitycheck_enabled)) {
+ ossl_fips_config_securitycheck_enabled)) {
if (!curve_allowed)
ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_CURVE);
if (!strength_allowed)
@@ -79,15 +79,15 @@ int ossl_fips_ind_ec_key_check(OSSL_FIPS_IND *ind, int id,
#endif
int ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND *ind, int id,
- OSSL_LIB_CTX *libctx,
- const EVP_MD *md, const char *desc)
+ OSSL_LIB_CTX *libctx,
+ const EVP_MD *md, const char *desc)
{
int nid = ossl_digest_get_approved_nid(md);
int approved = (nid != NID_undef && nid != NID_sha1);
if (!approved) {
if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, "Digest",
- ossl_fips_config_securitycheck_enabled)) {
+ ossl_fips_config_securitycheck_enabled)) {
ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST);
return 0;
}
@@ -96,11 +96,11 @@ int ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND *ind, int id,
}
int ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND *ind, int id,
- OSSL_LIB_CTX *libctx,
- int nid, int sha1_allowed,
- int sha512_trunc_allowed,
- const char *desc,
- OSSL_FIPS_IND_CHECK_CB *config_check_f)
+ OSSL_LIB_CTX *libctx,
+ int nid, int sha1_allowed,
+ int sha512_trunc_allowed,
+ const char *desc,
+ OSSL_FIPS_IND_CHECK_CB *config_check_f)
{
int approved;
const char *op = "none";
@@ -125,7 +125,7 @@ int ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND *ind, int id,
if (!approved) {
if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, op,
- config_check_f)) {
+ config_check_f)) {
ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST);
return 0;
}