Browse Source

fips module header inclusion fine-tunning

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15974)
master
Tomas Mraz 4 months ago
committed by Pauli
parent
commit
3f773c911a
35 changed files with 88 additions and 56 deletions
  1. +3
    -0
      crypto/dh/dh_backend.c
  2. +3
    -1
      crypto/dh/dh_lib.c
  3. +3
    -0
      crypto/dsa/dsa_backend.c
  4. +3
    -1
      crypto/dsa/dsa_lib.c
  5. +4
    -1
      crypto/ec/ec_backend.c
  6. +3
    -1
      crypto/ec/ec_key.c
  7. +3
    -1
      crypto/ec/ec_kmeth.c
  8. +3
    -0
      crypto/ec/ecx_backend.c
  9. +3
    -1
      crypto/evp/digest.c
  10. +3
    -1
      crypto/evp/evp_enc.c
  11. +1
    -1
      crypto/evp/evp_lib.c
  12. +0
    -5
      crypto/evp/evp_rand.c
  13. +0
    -3
      crypto/evp/kdf_lib.c
  14. +0
    -1
      crypto/evp/keymgmt_lib.c
  15. +0
    -1
      crypto/evp/m_sigver.c
  16. +7
    -4
      crypto/evp/p_lib.c
  17. +3
    -1
      crypto/evp/pmeth_check.c
  18. +3
    -1
      crypto/evp/pmeth_gn.c
  19. +6
    -3
      crypto/evp/pmeth_lib.c
  20. +4
    -1
      crypto/rsa/rsa_backend.c
  21. +3
    -1
      crypto/rsa/rsa_lib.c
  22. +16
    -16
      crypto/rsa/rsa_sign.c
  23. +0
    -1
      include/crypto/dh.h
  24. +0
    -1
      include/crypto/dsa.h
  25. +0
    -1
      include/crypto/ec.h
  26. +0
    -1
      include/crypto/ecx.h
  27. +0
    -1
      include/crypto/rsa.h
  28. +1
    -1
      providers/common/include/prov/provider_util.h
  29. +3
    -0
      providers/common/provider_util.c
  30. +3
    -0
      providers/implementations/keymgmt/mac_legacy_kmgmt.c
  31. +1
    -2
      providers/implementations/macs/cmac_prov.c
  32. +0
    -1
      providers/implementations/macs/gmac_prov.c
  33. +0
    -1
      providers/implementations/macs/hmac_prov.c
  34. +3
    -0
      providers/implementations/signature/mac_legacy_sig.c
  35. +3
    -1
      ssl/s3_cbc.c

+ 3
- 0
crypto/dh/dh_backend.c View File

@ -15,6 +15,9 @@
#include <openssl/err.h>
#include <openssl/core_names.h>
#ifndef FIPS_MODULE
# include <openssl/x509.h>
#endif
#include "internal/param_build_set.h"
#include "crypto/dh.h"
#include "dh_local.h"


+ 3
- 1
crypto/dh/dh_lib.c View File

@ -15,7 +15,9 @@
#include <stdio.h>
#include <openssl/bn.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/obj_mac.h>
#include <openssl/core_names.h>
#include "internal/cryptlib.h"


+ 3
- 0
crypto/dsa/dsa_backend.c View File

@ -15,6 +15,9 @@
#include <openssl/core_names.h>
#include <openssl/err.h>
#ifndef FIPS_MODULE
# include <openssl/x509.h>
#endif
#include "crypto/dsa.h"
#include "dsa_local.h"


+ 3
- 1
crypto/dsa/dsa_lib.c View File

@ -14,7 +14,9 @@
#include "internal/deprecated.h"
#include <openssl/bn.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include "internal/cryptlib.h"
#include "internal/refcount.h"
#include "crypto/dsa.h"


+ 4
- 1
crypto/ec/ec_backend.c View File

@ -17,7 +17,10 @@
#include <openssl/objects.h>
#include <openssl/params.h>
#include <openssl/err.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
# include <openssl/x509.h>
#endif
#include "crypto/bn.h"
#include "crypto/ec.h"
#include "ec_local.h"


+ 3
- 1
crypto/ec/ec_key.c View File

@ -19,7 +19,9 @@
#include "ec_local.h"
#include "internal/refcount.h"
#include <openssl/err.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/self_test.h>
#include "prov/providercommon.h"
#include "crypto/bn.h"


+ 3
- 1
crypto/ec/ec_kmeth.c View File

@ -15,7 +15,9 @@
#include <string.h>
#include <openssl/ec.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/err.h>
#include "ec_local.h"


+ 3
- 0
crypto/ec/ecx_backend.c View File

@ -13,6 +13,9 @@
#include <openssl/ec.h>
#include <openssl/rand.h>
#include <openssl/err.h>
#ifndef FIPS_MODULE
# include <openssl/x509.h>
#endif
#include "crypto/ecx.h"
#include "ecx_backend.h"


+ 3
- 1
crypto/evp/digest.c View File

@ -14,7 +14,9 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/ec.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/params.h>
#include <openssl/core_names.h>
#include "internal/cryptlib.h"


+ 3
- 1
crypto/evp/evp_enc.c View File

@ -16,7 +16,9 @@
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/params.h>
#include <openssl/core_names.h>
#include "internal/cryptlib.h"


+ 1
- 1
crypto/evp/evp_lib.c View File

@ -25,11 +25,11 @@
#include <openssl/dh.h>
#include <openssl/ec.h>
#include "crypto/evp.h"
#include "crypto/asn1.h"
#include "internal/provider.h"
#include "evp_local.h"
#if !defined(FIPS_MODULE)
# include "crypto/asn1.h"
int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
{


+ 0
- 5
crypto/evp/evp_rand.c View File

@ -7,13 +7,9 @@
* https://www.openssl.org/source/license.html
*/
#include <openssl/evp.h>
#include <stdio.h>
#include <stdlib.h>
#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/x509v3.h>
#include <openssl/rand.h>
#include <openssl/core.h>
#include <openssl/core_names.h>
@ -22,7 +18,6 @@
#include "internal/numbers.h"
#include "internal/provider.h"
#include "internal/core.h"
#include "crypto/asn1.h"
#include "crypto/evp.h"
#include "evp_local.h"


+ 0
- 3
crypto/evp/kdf_lib.c View File

@ -11,13 +11,10 @@
#include <stdio.h>
#include <stdlib.h>
#include "internal/cryptlib.h"
#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/x509v3.h>
#include <openssl/kdf.h>
#include <openssl/core.h>
#include <openssl/core_names.h>
#include "crypto/asn1.h"
#include "crypto/evp.h"
#include "internal/numbers.h"
#include "internal/provider.h"


+ 0
- 1
crypto/evp/keymgmt_lib.c View File

@ -11,7 +11,6 @@
#include "internal/cryptlib.h"
#include "internal/nelem.h"
#include "crypto/evp.h"
#include "crypto/asn1.h"
#include "internal/core.h"
#include "internal/provider.h"
#include "evp_local.h"


+ 0
- 1
crypto/evp/m_sigver.c View File

@ -11,7 +11,6 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include "crypto/evp.h"
#include "internal/provider.h"
#include "internal/numbers.h" /* includes SIZE_MAX */


+ 7
- 4
crypto/evp/p_lib.c View File

@ -22,13 +22,14 @@
#include <openssl/err.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/rsa.h>
#include <openssl/dsa.h>
#include <openssl/dh.h>
#include <openssl/ec.h>
#include <openssl/cmac.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/params.h>
#include <openssl/param_build.h>
#include <openssl/encoder.h>
@ -36,14 +37,16 @@
#include "internal/numbers.h" /* includes SIZE_MAX */
#include "internal/ffc.h"
#include "crypto/asn1.h"
#include "crypto/evp.h"
#include "crypto/dh.h"
#include "crypto/dsa.h"
#include "crypto/ec.h"
#include "crypto/ecx.h"
#include "crypto/rsa.h"
#include "crypto/x509.h"
#ifndef FIPS_MODULE
# include "crypto/asn1.h"
# include "crypto/x509.h"
#endif
#include "internal/provider.h"
#include "evp_local.h"


+ 3
- 1
crypto/evp/pmeth_check.c View File

@ -13,7 +13,9 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include "crypto/bn.h"
#include "crypto/asn1.h"
#ifndef FIPS_MODULE
# include "crypto/asn1.h"
#endif
#include "crypto/evp.h"
#include "evp_local.h"


+ 3
- 1
crypto/evp/pmeth_gn.c View File

@ -16,7 +16,9 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include "crypto/bn.h"
#include "crypto/asn1.h"
#ifndef FIPS_MODULE
# include "crypto/asn1.h"
#endif
#include "crypto/evp.h"
#include "evp_local.h"


+ 6
- 3
crypto/evp/pmeth_lib.c View File

@ -15,15 +15,18 @@
#include <stdio.h>
#include <stdlib.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/evp.h>
#include <openssl/x509v3.h>
#include <openssl/core_names.h>
#include <openssl/dh.h>
#include <openssl/rsa.h>
#include <openssl/kdf.h>
#include "internal/cryptlib.h"
#include "crypto/asn1.h"
#ifndef FIPS_MODULE
# include "crypto/asn1.h"
#endif
#include "crypto/evp.h"
#include "crypto/dh.h"
#include "crypto/ec.h"


+ 4
- 1
crypto/rsa/rsa_backend.c View File

@ -18,9 +18,12 @@
#include <openssl/params.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#ifndef FIPS_MODULE
# include <openssl/x509.h>
# include "crypto/asn1.h"
#endif
#include "internal/sizes.h"
#include "internal/param_build_set.h"
#include "crypto/asn1.h"
#include "crypto/rsa.h"
#include "rsa_local.h"


+ 3
- 1
crypto/rsa/rsa_lib.c View File

@ -15,7 +15,9 @@
#include <openssl/crypto.h>
#include <openssl/core_names.h>
#include <openssl/engine.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include <openssl/evp.h>
#include <openssl/param_build.h>
#include "internal/cryptlib.h"


+ 16
- 16
crypto/rsa/rsa_sign.c View File

@ -18,22 +18,22 @@
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include "crypto/x509.h"
#ifndef OPENSSL_NO_MD2
# include <openssl/md2.h> /* uses MD2_DIGEST_LENGTH */
#endif
#ifndef OPENSSL_NO_MD4
# include <openssl/md4.h> /* uses MD4_DIGEST_LENGTH */
#endif
#ifndef OPENSSL_NO_MD5
# include <openssl/md5.h> /* uses MD5_DIGEST_LENGTH */
#endif
#ifndef OPENSSL_NO_MDC2
# include <openssl/mdc2.h> /* uses MDC2_DIGEST_LENGTH */
#endif
#ifndef OPENSSL_NO_RMD160
# include <openssl/ripemd.h> /* uses RIPEMD160_DIGEST_LENGTH */
#ifndef FIPS_MODULE
# ifndef OPENSSL_NO_MD2
# include <openssl/md2.h> /* uses MD2_DIGEST_LENGTH */
# endif
# ifndef OPENSSL_NO_MD4
# include <openssl/md4.h> /* uses MD4_DIGEST_LENGTH */
# endif
# ifndef OPENSSL_NO_MD5
# include <openssl/md5.h> /* uses MD5_DIGEST_LENGTH */
# endif
# ifndef OPENSSL_NO_MDC2
# include <openssl/mdc2.h> /* uses MDC2_DIGEST_LENGTH */
# endif
# ifndef OPENSSL_NO_RMD160
# include <openssl/ripemd.h> /* uses RIPEMD160_DIGEST_LENGTH */
# endif
#endif
#include <openssl/sha.h> /* uses SHA???_DIGEST_LENGTH */
#include "crypto/rsa.h"


+ 0
- 1
include/crypto/dh.h View File

@ -14,7 +14,6 @@
# include <openssl/core.h>
# include <openssl/params.h>
# include <openssl/dh.h>
# include <openssl/x509.h>
# include "internal/ffc.h"
DH *ossl_dh_new_by_nid_ex(OSSL_LIB_CTX *libctx, int nid);


+ 0
- 1
include/crypto/dsa.h View File

@ -13,7 +13,6 @@
# include <openssl/core.h>
# include <openssl/dsa.h>
# include <openssl/x509.h>
# include "internal/ffc.h"
#define DSA_PARAMGEN_TYPE_FIPS_186_4 0 /* Use FIPS186-4 standard */


+ 0
- 1
include/crypto/ec.h View File

@ -24,7 +24,6 @@ int evp_pkey_ctx_set_ec_param_enc_prov(EVP_PKEY_CTX *ctx, int param_enc);
# ifndef OPENSSL_NO_EC
# include <openssl/core.h>
# include <openssl/ec.h>
# include <openssl/x509.h>
# include "crypto/types.h"
/*-


+ 0
- 1
include/crypto/ecx.h View File

@ -20,7 +20,6 @@
# include <openssl/core.h>
# include <openssl/e_os2.h>
# include <openssl/crypto.h>
# include <openssl/x509.h>
# include "internal/refcount.h"
# include "crypto/types.h"


+ 0
- 1
include/crypto/rsa.h View File

@ -13,7 +13,6 @@
# include <openssl/core.h>
# include <openssl/rsa.h>
# include <openssl/x509.h>
# include "crypto/types.h"
#define RSA_MIN_MODULUS_BITS 512


+ 1
- 1
providers/common/include/prov/provider_util.h View File

@ -8,7 +8,7 @@
*/
#include <openssl/provider.h>
#include <openssl/engine.h>
#include <openssl/types.h>
typedef struct {
/*


+ 3
- 0
providers/common/provider_util.c View File

@ -14,6 +14,9 @@
#include <openssl/core_names.h>
#include <openssl/err.h>
#include <openssl/proverr.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include "prov/provider_util.h"
#include "internal/nelem.h"


+ 3
- 0
providers/implementations/keymgmt/mac_legacy_kmgmt.c View File

@ -18,6 +18,9 @@
#include <openssl/evp.h>
#include <openssl/proverr.h>
#include <openssl/param_build.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include "internal/param_build_set.h"
#include "prov/implementations.h"
#include "prov/providercommon.h"


+ 1
- 2
providers/implementations/macs/cmac_prov.c View File

@ -16,7 +16,6 @@
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
#include <openssl/params.h>
#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/cmac.h>
@ -111,7 +110,7 @@ static int cmac_setkey(struct cmac_data_st *macctx,
ossl_prov_cipher_cipher(&macctx->cipher),
ossl_prov_cipher_engine(&macctx->cipher));
ossl_prov_cipher_reset(&macctx->cipher);
return rv;
return rv;
}
static int cmac_init(void *vmacctx, const unsigned char *key,


+ 0
- 1
providers/implementations/macs/gmac_prov.c View File

@ -11,7 +11,6 @@
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
#include <openssl/params.h>
#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/proverr.h>


+ 0
- 1
providers/implementations/macs/hmac_prov.c View File

@ -18,7 +18,6 @@
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
#include <openssl/params.h>
#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>


+ 3
- 0
providers/implementations/signature/mac_legacy_sig.c View File

@ -16,6 +16,9 @@
#include <openssl/core_names.h>
#include <openssl/params.h>
#include <openssl/err.h>
#ifndef FIPS_MODULE
# include <openssl/engine.h>
#endif
#include "prov/implementations.h"
#include "prov/provider_ctx.h"
#include "prov/macsignature.h"


+ 3
- 1
ssl/s3_cbc.c View File

@ -27,7 +27,9 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/md5.h>
#ifndef FIPS_MODULE
# include <openssl/md5.h>
#endif
#include <openssl/sha.h>
char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx);


Loading…
Cancel
Save