From: Richard Levitte Date: Fri, 4 Oct 2019 13:20:48 +0000 (+0200) Subject: Cleanup: move providers/common/include/internal/provider_args.h X-Git-Tag: openssl-3.0.0-alpha1~1168 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=af3e7e1bccbed8e3b958488a07daf5a8f4115fa9;p=oweals%2Fopenssl.git Cleanup: move providers/common/include/internal/provider_args.h New name is providers/implementations/include/prov/implementations.h All inclusions are adapted accordingly. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10088) --- diff --git a/providers/common/include/internal/provider_algs.h b/providers/common/include/internal/provider_algs.h deleted file mode 100644 index f52711bb01..0000000000 --- a/providers/common/include/internal/provider_algs.h +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. - * - * 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 - */ - -/* Digests */ -extern const OSSL_DISPATCH sha1_functions[]; -extern const OSSL_DISPATCH sha224_functions[]; -extern const OSSL_DISPATCH sha256_functions[]; -extern const OSSL_DISPATCH sha384_functions[]; -extern const OSSL_DISPATCH sha512_functions[]; -extern const OSSL_DISPATCH sha512_224_functions[]; -extern const OSSL_DISPATCH sha512_256_functions[]; -extern const OSSL_DISPATCH sha3_224_functions[]; -extern const OSSL_DISPATCH sha3_256_functions[]; -extern const OSSL_DISPATCH sha3_384_functions[]; -extern const OSSL_DISPATCH sha3_512_functions[]; -extern const OSSL_DISPATCH keccak_kmac_128_functions[]; -extern const OSSL_DISPATCH keccak_kmac_256_functions[]; -extern const OSSL_DISPATCH shake_128_functions[]; -extern const OSSL_DISPATCH shake_256_functions[]; -extern const OSSL_DISPATCH blake2s256_functions[]; -extern const OSSL_DISPATCH blake2b512_functions[]; -extern const OSSL_DISPATCH md5_functions[]; -extern const OSSL_DISPATCH md5_sha1_functions[]; -extern const OSSL_DISPATCH sm3_functions[]; -extern const OSSL_DISPATCH md2_functions[]; -extern const OSSL_DISPATCH md4_functions[]; -extern const OSSL_DISPATCH mdc2_functions[]; -extern const OSSL_DISPATCH wp_functions[]; -extern const OSSL_DISPATCH ripemd160_functions[]; - -/* Ciphers */ -extern const OSSL_DISPATCH aes256ecb_functions[]; -extern const OSSL_DISPATCH aes192ecb_functions[]; -extern const OSSL_DISPATCH aes128ecb_functions[]; -extern const OSSL_DISPATCH aes256cbc_functions[]; -extern const OSSL_DISPATCH aes192cbc_functions[]; -extern const OSSL_DISPATCH aes128cbc_functions[]; -extern const OSSL_DISPATCH aes256ofb_functions[]; -extern const OSSL_DISPATCH aes192ofb_functions[]; -extern const OSSL_DISPATCH aes128ofb_functions[]; -extern const OSSL_DISPATCH aes256cfb_functions[]; -extern const OSSL_DISPATCH aes192cfb_functions[]; -extern const OSSL_DISPATCH aes128cfb_functions[]; -extern const OSSL_DISPATCH aes256cfb1_functions[]; -extern const OSSL_DISPATCH aes192cfb1_functions[]; -extern const OSSL_DISPATCH aes128cfb1_functions[]; -extern const OSSL_DISPATCH aes256cfb8_functions[]; -extern const OSSL_DISPATCH aes192cfb8_functions[]; -extern const OSSL_DISPATCH aes128cfb8_functions[]; -extern const OSSL_DISPATCH aes256ctr_functions[]; -extern const OSSL_DISPATCH aes192ctr_functions[]; -extern const OSSL_DISPATCH aes128ctr_functions[]; -extern const OSSL_DISPATCH aes256xts_functions[]; -extern const OSSL_DISPATCH aes128xts_functions[]; -#ifndef OPENSSL_NO_OCB -extern const OSSL_DISPATCH aes256ocb_functions[]; -extern const OSSL_DISPATCH aes192ocb_functions[]; -extern const OSSL_DISPATCH aes128ocb_functions[]; -#endif /* OPENSSL_NO_OCB */ -extern const OSSL_DISPATCH aes256gcm_functions[]; -extern const OSSL_DISPATCH aes192gcm_functions[]; -extern const OSSL_DISPATCH aes128gcm_functions[]; -extern const OSSL_DISPATCH aes256ccm_functions[]; -extern const OSSL_DISPATCH aes192ccm_functions[]; -extern const OSSL_DISPATCH aes128ccm_functions[]; -extern const OSSL_DISPATCH aes256wrap_functions[]; -extern const OSSL_DISPATCH aes192wrap_functions[]; -extern const OSSL_DISPATCH aes128wrap_functions[]; -extern const OSSL_DISPATCH aes256wrappad_functions[]; -extern const OSSL_DISPATCH aes192wrappad_functions[]; -extern const OSSL_DISPATCH aes128wrappad_functions[]; - -#ifndef OPENSSL_NO_ARIA -extern const OSSL_DISPATCH aria256gcm_functions[]; -extern const OSSL_DISPATCH aria192gcm_functions[]; -extern const OSSL_DISPATCH aria128gcm_functions[]; -extern const OSSL_DISPATCH aria256ccm_functions[]; -extern const OSSL_DISPATCH aria192ccm_functions[]; -extern const OSSL_DISPATCH aria128ccm_functions[]; -extern const OSSL_DISPATCH aria256ecb_functions[]; -extern const OSSL_DISPATCH aria192ecb_functions[]; -extern const OSSL_DISPATCH aria128ecb_functions[]; -extern const OSSL_DISPATCH aria256cbc_functions[]; -extern const OSSL_DISPATCH aria192cbc_functions[]; -extern const OSSL_DISPATCH aria128cbc_functions[]; -extern const OSSL_DISPATCH aria256ofb_functions[]; -extern const OSSL_DISPATCH aria192ofb_functions[]; -extern const OSSL_DISPATCH aria128ofb_functions[]; -extern const OSSL_DISPATCH aria256cfb_functions[]; -extern const OSSL_DISPATCH aria192cfb_functions[]; -extern const OSSL_DISPATCH aria128cfb_functions[]; -extern const OSSL_DISPATCH aria256cfb1_functions[]; -extern const OSSL_DISPATCH aria192cfb1_functions[]; -extern const OSSL_DISPATCH aria128cfb1_functions[]; -extern const OSSL_DISPATCH aria256cfb8_functions[]; -extern const OSSL_DISPATCH aria192cfb8_functions[]; -extern const OSSL_DISPATCH aria128cfb8_functions[]; -extern const OSSL_DISPATCH aria256ctr_functions[]; -extern const OSSL_DISPATCH aria192ctr_functions[]; -extern const OSSL_DISPATCH aria128ctr_functions[]; -#endif /* OPENSSL_NO_ARIA */ -#ifndef OPENSSL_NO_CAMELLIA -extern const OSSL_DISPATCH camellia256ecb_functions[]; -extern const OSSL_DISPATCH camellia192ecb_functions[]; -extern const OSSL_DISPATCH camellia128ecb_functions[]; -extern const OSSL_DISPATCH camellia256cbc_functions[]; -extern const OSSL_DISPATCH camellia192cbc_functions[]; -extern const OSSL_DISPATCH camellia128cbc_functions[]; -extern const OSSL_DISPATCH camellia256ofb_functions[]; -extern const OSSL_DISPATCH camellia192ofb_functions[]; -extern const OSSL_DISPATCH camellia128ofb_functions[]; -extern const OSSL_DISPATCH camellia256cfb_functions[]; -extern const OSSL_DISPATCH camellia192cfb_functions[]; -extern const OSSL_DISPATCH camellia128cfb_functions[]; -extern const OSSL_DISPATCH camellia256cfb1_functions[]; -extern const OSSL_DISPATCH camellia192cfb1_functions[]; -extern const OSSL_DISPATCH camellia128cfb1_functions[]; -extern const OSSL_DISPATCH camellia256cfb8_functions[]; -extern const OSSL_DISPATCH camellia192cfb8_functions[]; -extern const OSSL_DISPATCH camellia128cfb8_functions[]; -extern const OSSL_DISPATCH camellia256ctr_functions[]; -extern const OSSL_DISPATCH camellia192ctr_functions[]; -extern const OSSL_DISPATCH camellia128ctr_functions[]; -#endif /* OPENSSL_NO_CAMELLIA */ -#ifndef OPENSSL_NO_BF -extern const OSSL_DISPATCH blowfish128ecb_functions[]; -extern const OSSL_DISPATCH blowfish128cbc_functions[]; -extern const OSSL_DISPATCH blowfish64ofb64_functions[]; -extern const OSSL_DISPATCH blowfish64cfb64_functions[]; -#endif /* OPENSSL_NO_BF */ -#ifndef OPENSSL_NO_IDEA -extern const OSSL_DISPATCH idea128ecb_functions[]; -extern const OSSL_DISPATCH idea128cbc_functions[]; -extern const OSSL_DISPATCH idea128ofb64_functions[]; -extern const OSSL_DISPATCH idea128cfb64_functions[]; -#endif /* OPENSSL_NO_IDEA */ -#ifndef OPENSSL_NO_CAST -extern const OSSL_DISPATCH cast5128ecb_functions[]; -extern const OSSL_DISPATCH cast5128cbc_functions[]; -extern const OSSL_DISPATCH cast564ofb64_functions[]; -extern const OSSL_DISPATCH cast564cfb64_functions[]; -#endif /* OPENSSL_NO_CAST */ -#ifndef OPENSSL_NO_SEED -extern const OSSL_DISPATCH seed128ecb_functions[]; -extern const OSSL_DISPATCH seed128cbc_functions[]; -extern const OSSL_DISPATCH seed128ofb128_functions[]; -extern const OSSL_DISPATCH seed128cfb128_functions[]; -#endif /* OPENSSL_NO_SEED */ -#ifndef OPENSSL_NO_SM4 -extern const OSSL_DISPATCH sm4128ecb_functions[]; -extern const OSSL_DISPATCH sm4128cbc_functions[]; -extern const OSSL_DISPATCH sm4128ctr_functions[]; -extern const OSSL_DISPATCH sm4128ofb128_functions[]; -extern const OSSL_DISPATCH sm4128cfb128_functions[]; -#endif /* OPENSSL_NO_SM4 */ -#ifndef OPENSSL_NO_RC5 -extern const OSSL_DISPATCH rc5128ecb_functions[]; -extern const OSSL_DISPATCH rc5128cbc_functions[]; -extern const OSSL_DISPATCH rc5128ofb64_functions[]; -extern const OSSL_DISPATCH rc5128cfb64_functions[]; -#endif /* OPENSSL_NO_RC5 */ -#ifndef OPENSSL_NO_RC2 -extern const OSSL_DISPATCH rc2128ecb_functions[]; -extern const OSSL_DISPATCH rc2128cbc_functions[]; -extern const OSSL_DISPATCH rc240cbc_functions[]; -extern const OSSL_DISPATCH rc264cbc_functions[]; -extern const OSSL_DISPATCH rc2128cfb128_functions[]; -extern const OSSL_DISPATCH rc2128ofb128_functions[]; -#endif /* OPENSSL_NO_RC2 */ -#ifndef OPENSSL_NO_DES -extern const OSSL_DISPATCH tdes_ede3_ecb_functions[]; -extern const OSSL_DISPATCH tdes_ede3_cbc_functions[]; -# ifndef FIPS_MODE -extern const OSSL_DISPATCH tdes_ede3_ofb_functions[]; -extern const OSSL_DISPATCH tdes_ede3_cfb_functions[]; -extern const OSSL_DISPATCH tdes_ede3_cfb8_functions[]; -extern const OSSL_DISPATCH tdes_ede3_cfb1_functions[]; - -extern const OSSL_DISPATCH tdes_ede2_ecb_functions[]; -extern const OSSL_DISPATCH tdes_ede2_cbc_functions[]; -extern const OSSL_DISPATCH tdes_ede2_ofb_functions[]; -extern const OSSL_DISPATCH tdes_ede2_cfb_functions[]; - -extern const OSSL_DISPATCH tdes_desx_cbc_functions[]; -extern const OSSL_DISPATCH tdes_wrap_cbc_functions[]; - -extern const OSSL_DISPATCH des_ecb_functions[]; -extern const OSSL_DISPATCH des_cbc_functions[]; -extern const OSSL_DISPATCH des_ofb64_functions[]; -extern const OSSL_DISPATCH des_cfb64_functions[]; -extern const OSSL_DISPATCH des_cfb1_functions[]; -extern const OSSL_DISPATCH des_cfb8_functions[]; -# endif /* FIPS_MODE */ -#endif /* OPENSSL_NO_DES */ - -#ifndef OPENSSL_NO_RC4 -extern const OSSL_DISPATCH rc440_functions[]; -extern const OSSL_DISPATCH rc4128_functions[]; -#endif /* OPENSSL_NO_RC4 */ - -/* MACs */ -extern const OSSL_DISPATCH blake2bmac_functions[]; -extern const OSSL_DISPATCH blake2smac_functions[]; -extern const OSSL_DISPATCH cmac_functions[]; -extern const OSSL_DISPATCH gmac_functions[]; -extern const OSSL_DISPATCH hmac_functions[]; -extern const OSSL_DISPATCH kmac128_functions[]; -extern const OSSL_DISPATCH kmac256_functions[]; -extern const OSSL_DISPATCH siphash_functions[]; -extern const OSSL_DISPATCH poly1305_functions[]; - -/* KDFs / PRFs */ -extern const OSSL_DISPATCH kdf_pbkdf2_functions[]; -#ifndef OPENSSL_NO_SCRYPT -extern const OSSL_DISPATCH kdf_scrypt_functions[]; -#endif -extern const OSSL_DISPATCH kdf_tls1_prf_functions[]; -extern const OSSL_DISPATCH kdf_hkdf_functions[]; -extern const OSSL_DISPATCH kdf_sshkdf_functions[]; -extern const OSSL_DISPATCH kdf_sskdf_functions[]; -extern const OSSL_DISPATCH kdf_x963_kdf_functions[]; -extern const OSSL_DISPATCH kdf_kbkdf_functions[]; -#ifndef OPENSSL_NO_CMS -extern const OSSL_DISPATCH kdf_x942_kdf_functions[]; -#endif - - -/* Key management */ -extern const OSSL_DISPATCH dh_keymgmt_functions[]; -extern const OSSL_DISPATCH dsa_keymgmt_functions[]; - -/* Key Exchange */ -extern const OSSL_DISPATCH dh_keyexch_functions[]; - -/* Signature */ -extern const OSSL_DISPATCH dsa_signature_functions[]; diff --git a/providers/default/defltprov.c b/providers/default/defltprov.c index 7e952921c8..7dd0cf5012 100644 --- a/providers/default/defltprov.c +++ b/providers/default/defltprov.c @@ -14,7 +14,7 @@ #include #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* Functions provided by the core */ static OSSL_core_gettable_params_fn *c_gettable_params = NULL; diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 8464fe135c..c61071e619 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -26,7 +26,7 @@ #include "internal/cryptlib.h" #include "internal/property.h" #include "crypto/evp.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/providercommon.h" #include "selftest.h" diff --git a/providers/implementations/ciphers/cipher_aes.c b/providers/implementations/ciphers/cipher_aes.c index 46880e0bf7..c62d2d2c29 100644 --- a/providers/implementations/ciphers/cipher_aes.c +++ b/providers/implementations/ciphers/cipher_aes.c @@ -10,7 +10,7 @@ /* Dispatch functions for AES cipher modes ecb, cbc, ofb, cfb, ctr */ #include "cipher_aes.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn aes_freectx; static OSSL_OP_cipher_dupctx_fn aes_dupctx; diff --git a/providers/implementations/ciphers/cipher_aes_ccm.c b/providers/implementations/ciphers/cipher_aes_ccm.c index 59fc7274c9..c1fb51b565 100644 --- a/providers/implementations/ciphers/cipher_aes_ccm.c +++ b/providers/implementations/ciphers/cipher_aes_ccm.c @@ -11,7 +11,7 @@ #include "prov/ciphercommon.h" #include "prov/cipher_ccm.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static void *aes_ccm_newctx(void *provctx, size_t keybits) { diff --git a/providers/implementations/ciphers/cipher_aes_gcm.c b/providers/implementations/ciphers/cipher_aes_gcm.c index 1df1c1dba9..4ebc8140ee 100644 --- a/providers/implementations/ciphers/cipher_aes_gcm.c +++ b/providers/implementations/ciphers/cipher_aes_gcm.c @@ -11,7 +11,7 @@ #include "prov/ciphercommon.h" #include "prov/cipher_gcm.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static void *aes_gcm_newctx(void *provctx, size_t keybits) { diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c index 5ab0b8fd15..c677a0be0b 100644 --- a/providers/implementations/ciphers/cipher_aes_ocb.c +++ b/providers/implementations/ciphers/cipher_aes_ocb.c @@ -10,7 +10,7 @@ #include "cipher_aes_ocb.h" #include "internal/providercommonerr.h" #include "prov/cipher_aead.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #define AES_OCB_FLAGS AEAD_FLAGS diff --git a/providers/implementations/ciphers/cipher_aes_wrp.c b/providers/implementations/ciphers/cipher_aes_wrp.c index 1bf4c1793a..5b5e6388e1 100644 --- a/providers/implementations/ciphers/cipher_aes_wrp.c +++ b/providers/implementations/ciphers/cipher_aes_wrp.c @@ -9,7 +9,7 @@ #include "cipher_aes.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* AES wrap with padding has IV length of 4, without padding 8 */ #define AES_WRAP_PAD_IVLEN 4 diff --git a/providers/implementations/ciphers/cipher_aes_xts.c b/providers/implementations/ciphers/cipher_aes_xts.c index d0b999081e..1072418779 100644 --- a/providers/implementations/ciphers/cipher_aes_xts.c +++ b/providers/implementations/ciphers/cipher_aes_xts.c @@ -8,7 +8,7 @@ */ #include "cipher_aes_xts.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" /* TODO (3.0) Figure out what flags need to be set */ diff --git a/providers/implementations/ciphers/cipher_aria.c b/providers/implementations/ciphers/cipher_aria.c index 861b28268b..da864015bd 100644 --- a/providers/implementations/ciphers/cipher_aria.c +++ b/providers/implementations/ciphers/cipher_aria.c @@ -10,7 +10,7 @@ /* Dispatch functions for ARIA cipher modes ecb, cbc, ofb, cfb, ctr */ #include "cipher_aria.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn aria_freectx; static OSSL_OP_cipher_dupctx_fn aria_dupctx; diff --git a/providers/implementations/ciphers/cipher_aria_ccm.c b/providers/implementations/ciphers/cipher_aria_ccm.c index 97e8137db8..e4cfc6cd8f 100644 --- a/providers/implementations/ciphers/cipher_aria_ccm.c +++ b/providers/implementations/ciphers/cipher_aria_ccm.c @@ -10,7 +10,7 @@ /* Dispatch functions for ARIA CCM mode */ #include "cipher_aria_ccm.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn aria_ccm_freectx; diff --git a/providers/implementations/ciphers/cipher_aria_gcm.c b/providers/implementations/ciphers/cipher_aria_gcm.c index 7c9fa3d211..1481fcc2e2 100644 --- a/providers/implementations/ciphers/cipher_aria_gcm.c +++ b/providers/implementations/ciphers/cipher_aria_gcm.c @@ -10,7 +10,7 @@ /* Dispatch functions for ARIA GCM mode */ #include "cipher_aria_gcm.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static void *aria_gcm_newctx(void *provctx, size_t keybits) { diff --git a/providers/implementations/ciphers/cipher_blowfish.c b/providers/implementations/ciphers/cipher_blowfish.c index 4730f1fd40..786cc15189 100644 --- a/providers/implementations/ciphers/cipher_blowfish.c +++ b/providers/implementations/ciphers/cipher_blowfish.c @@ -10,7 +10,7 @@ /* Dispatch functions for Blowfish cipher modes ecb, cbc, ofb, cfb */ #include "cipher_blowfish.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #define BF_FLAGS (EVP_CIPH_VARIABLE_LENGTH) diff --git a/providers/implementations/ciphers/cipher_camellia.c b/providers/implementations/ciphers/cipher_camellia.c index 68c0e91355..cf9af3db32 100644 --- a/providers/implementations/ciphers/cipher_camellia.c +++ b/providers/implementations/ciphers/cipher_camellia.c @@ -10,7 +10,7 @@ /* Dispatch functions for CAMELLIA cipher modes ecb, cbc, ofb, cfb, ctr */ #include "cipher_camellia.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn camellia_freectx; static OSSL_OP_cipher_dupctx_fn camellia_dupctx; diff --git a/providers/implementations/ciphers/cipher_cast5.c b/providers/implementations/ciphers/cipher_cast5.c index eb79aad820..d049d836d0 100644 --- a/providers/implementations/ciphers/cipher_cast5.c +++ b/providers/implementations/ciphers/cipher_cast5.c @@ -10,7 +10,7 @@ /* Dispatch functions for cast cipher modes ecb, cbc, ofb, cfb */ #include "cipher_cast.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #define CAST5_FLAGS (EVP_CIPH_VARIABLE_LENGTH) diff --git a/providers/implementations/ciphers/cipher_des.c b/providers/implementations/ciphers/cipher_des.c index 5781aa4706..b0e877ea1d 100644 --- a/providers/implementations/ciphers/cipher_des.c +++ b/providers/implementations/ciphers/cipher_des.c @@ -10,7 +10,7 @@ #include "prov/ciphercommon.h" #include "cipher_des.h" #include "crypto/rand.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" /* TODO(3.0) Figure out what flags need to be here */ diff --git a/providers/implementations/ciphers/cipher_desx.c b/providers/implementations/ciphers/cipher_desx.c index 4a232cd080..b8447d2c3f 100644 --- a/providers/implementations/ciphers/cipher_desx.c +++ b/providers/implementations/ciphers/cipher_desx.c @@ -8,7 +8,7 @@ */ #include "cipher_tdes_default.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* desx_cbc_functions */ IMPLEMENT_tdes_cipher(desx, DESX, cbc, CBC, TDES_FLAGS, 64*3, 64, 64, block); diff --git a/providers/implementations/ciphers/cipher_idea.c b/providers/implementations/ciphers/cipher_idea.c index 6bb5419b6d..5602655f76 100644 --- a/providers/implementations/ciphers/cipher_idea.c +++ b/providers/implementations/ciphers/cipher_idea.c @@ -10,7 +10,7 @@ /* Dispatch functions for Idea cipher modes ecb, cbc, ofb, cfb */ #include "cipher_idea.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn idea_freectx; static OSSL_OP_cipher_dupctx_fn idea_dupctx; diff --git a/providers/implementations/ciphers/cipher_rc2.c b/providers/implementations/ciphers/cipher_rc2.c index f7ee268276..1da17621e9 100644 --- a/providers/implementations/ciphers/cipher_rc2.c +++ b/providers/implementations/ciphers/cipher_rc2.c @@ -10,7 +10,7 @@ /* Dispatch functions for RC2 cipher modes ecb, cbc, ofb, cfb */ #include "cipher_rc2.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" #define RC2_40_MAGIC 0xa0 diff --git a/providers/implementations/ciphers/cipher_rc4.c b/providers/implementations/ciphers/cipher_rc4.c index d81b776bc2..c3da8b4397 100644 --- a/providers/implementations/ciphers/cipher_rc4.c +++ b/providers/implementations/ciphers/cipher_rc4.c @@ -10,7 +10,7 @@ /* Dispatch functions for RC4 ciphers */ #include "cipher_rc4.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* TODO (3.0) Figure out what flags are required */ #define RC4_FLAGS EVP_CIPH_FLAG_DEFAULT_ASN1 diff --git a/providers/implementations/ciphers/cipher_rc5.c b/providers/implementations/ciphers/cipher_rc5.c index 645a6b8b64..68a3cfa323 100644 --- a/providers/implementations/ciphers/cipher_rc5.c +++ b/providers/implementations/ciphers/cipher_rc5.c @@ -10,7 +10,7 @@ /* Dispatch functions for RC5 cipher modes ecb, cbc, ofb, cfb */ #include "cipher_rc5.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" static OSSL_OP_cipher_freectx_fn rc5_freectx; diff --git a/providers/implementations/ciphers/cipher_seed.c b/providers/implementations/ciphers/cipher_seed.c index 397671dd06..ee90669fda 100644 --- a/providers/implementations/ciphers/cipher_seed.c +++ b/providers/implementations/ciphers/cipher_seed.c @@ -10,7 +10,7 @@ /* Dispatch functions for Seed cipher modes ecb, cbc, ofb, cfb */ #include "cipher_seed.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn seed_freectx; static OSSL_OP_cipher_dupctx_fn seed_dupctx; diff --git a/providers/implementations/ciphers/cipher_sm4.c b/providers/implementations/ciphers/cipher_sm4.c index 2c1e587863..bf9d220923 100644 --- a/providers/implementations/ciphers/cipher_sm4.c +++ b/providers/implementations/ciphers/cipher_sm4.c @@ -10,7 +10,7 @@ /* Dispatch functions for cast cipher modes ecb, cbc, ofb, cfb */ #include "cipher_sm4.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_cipher_freectx_fn sm4_freectx; static OSSL_OP_cipher_dupctx_fn sm4_dupctx; diff --git a/providers/implementations/ciphers/cipher_tdes.c b/providers/implementations/ciphers/cipher_tdes.c index 9c032902e9..1ded6202df 100644 --- a/providers/implementations/ciphers/cipher_tdes.c +++ b/providers/implementations/ciphers/cipher_tdes.c @@ -10,7 +10,7 @@ #include "prov/ciphercommon.h" #include "cipher_tdes.h" #include "crypto/rand.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" void *tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits, diff --git a/providers/implementations/ciphers/cipher_tdes_default.c b/providers/implementations/ciphers/cipher_tdes_default.c index 73a78e8089..9aefef26b6 100644 --- a/providers/implementations/ciphers/cipher_tdes_default.c +++ b/providers/implementations/ciphers/cipher_tdes_default.c @@ -8,7 +8,7 @@ */ #include "cipher_tdes_default.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* tdes_ede3_ofb_functions */ IMPLEMENT_tdes_cipher(ede3, EDE3, ofb, OFB, TDES_FLAGS, 64*3, 8, 64, stream); diff --git a/providers/implementations/ciphers/cipher_tdes_wrap.c b/providers/implementations/ciphers/cipher_tdes_wrap.c index 1ee0044489..ecce1d8e11 100644 --- a/providers/implementations/ciphers/cipher_tdes_wrap.c +++ b/providers/implementations/ciphers/cipher_tdes_wrap.c @@ -11,7 +11,7 @@ #include "cipher_tdes_default.h" #include "crypto/evp.h" #include "crypto/rand.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" /* TODO (3.0) Figure out what flags are requred */ diff --git a/providers/implementations/digests/blake2_prov.c b/providers/implementations/digests/blake2_prov.c index 16f301b177..1fe7cb18fc 100644 --- a/providers/implementations/digests/blake2_prov.c +++ b/providers/implementations/digests/blake2_prov.c @@ -10,7 +10,7 @@ #include #include "prov/blake2.h" #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" OSSL_OP_digest_init_fn blake2s256_init; OSSL_OP_digest_init_fn blake2b512_init; diff --git a/providers/implementations/digests/md2_prov.c b/providers/implementations/digests/md2_prov.c index ab1d605218..6e12e3c172 100644 --- a/providers/implementations/digests/md2_prov.c +++ b/providers/implementations/digests/md2_prov.c @@ -10,7 +10,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* md2_functions */ IMPLEMENT_digest_functions(md2, MD2_CTX, diff --git a/providers/implementations/digests/md4_prov.c b/providers/implementations/digests/md4_prov.c index 6b311c075d..3ce356a58f 100644 --- a/providers/implementations/digests/md4_prov.c +++ b/providers/implementations/digests/md4_prov.c @@ -10,7 +10,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* md4_functions */ IMPLEMENT_digest_functions(md4, MD4_CTX, diff --git a/providers/implementations/digests/md5_prov.c b/providers/implementations/digests/md5_prov.c index 1205888ff9..7b92b6139c 100644 --- a/providers/implementations/digests/md5_prov.c +++ b/providers/implementations/digests/md5_prov.c @@ -10,7 +10,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* md5_functions */ IMPLEMENT_digest_functions(md5, MD5_CTX, diff --git a/providers/implementations/digests/md5_sha1_prov.c b/providers/implementations/digests/md5_sha1_prov.c index ff6e2ed121..09c502d839 100644 --- a/providers/implementations/digests/md5_sha1_prov.c +++ b/providers/implementations/digests/md5_sha1_prov.c @@ -14,7 +14,7 @@ #include #include "prov/md5_sha1.h" #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_digest_set_ctx_params_fn md5_sha1_set_ctx_params; static OSSL_OP_digest_settable_ctx_params_fn md5_sha1_settable_ctx_params; diff --git a/providers/implementations/digests/mdc2_prov.c b/providers/implementations/digests/mdc2_prov.c index f0ae8b3742..27770f0820 100644 --- a/providers/implementations/digests/mdc2_prov.c +++ b/providers/implementations/digests/mdc2_prov.c @@ -13,7 +13,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" static OSSL_OP_digest_set_ctx_params_fn mdc2_set_ctx_params; diff --git a/providers/implementations/digests/ripemd_prov.c b/providers/implementations/digests/ripemd_prov.c index 4f11f79e4c..023e46cf83 100644 --- a/providers/implementations/digests/ripemd_prov.c +++ b/providers/implementations/digests/ripemd_prov.c @@ -10,7 +10,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* ripemd160_functions */ IMPLEMENT_digest_functions(ripemd160, RIPEMD160_CTX, diff --git a/providers/implementations/digests/sha2_prov.c b/providers/implementations/digests/sha2_prov.c index 3c07e784cf..8055ce5ad2 100644 --- a/providers/implementations/digests/sha2_prov.c +++ b/providers/implementations/digests/sha2_prov.c @@ -15,7 +15,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "crypto/sha.h" static OSSL_OP_digest_set_ctx_params_fn sha1_set_ctx_params; diff --git a/providers/implementations/digests/sha3_prov.c b/providers/implementations/digests/sha3_prov.c index 5adc7b2976..79cc617517 100644 --- a/providers/implementations/digests/sha3_prov.c +++ b/providers/implementations/digests/sha3_prov.c @@ -15,7 +15,7 @@ #include #include "internal/sha3.h" #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/providercommonerr.h" /* diff --git a/providers/implementations/digests/sm3_prov.c b/providers/implementations/digests/sm3_prov.c index bd9d833184..88e65d1537 100644 --- a/providers/implementations/digests/sm3_prov.c +++ b/providers/implementations/digests/sm3_prov.c @@ -10,7 +10,7 @@ #include #include "internal/sm3.h" #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* sm3_functions */ IMPLEMENT_digest_functions(sm3, SM3_CTX, diff --git a/providers/implementations/digests/wp_prov.c b/providers/implementations/digests/wp_prov.c index 1dd5aa36e4..75fcc0dffc 100644 --- a/providers/implementations/digests/wp_prov.c +++ b/providers/implementations/digests/wp_prov.c @@ -10,7 +10,7 @@ #include #include #include "prov/digestcommon.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* wp_functions */ IMPLEMENT_digest_functions(wp, WHIRLPOOL_CTX, diff --git a/providers/implementations/exchange/dh_exch.c b/providers/implementations/exchange/dh_exch.c index cfbda43fb8..1b16a83245 100644 --- a/providers/implementations/exchange/dh_exch.c +++ b/providers/implementations/exchange/dh_exch.c @@ -12,7 +12,7 @@ #include #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_keyexch_newctx_fn dh_newctx; static OSSL_OP_keyexch_init_fn dh_init; diff --git a/providers/implementations/include/prov/implementations.h b/providers/implementations/include/prov/implementations.h new file mode 100644 index 0000000000..f52711bb01 --- /dev/null +++ b/providers/implementations/include/prov/implementations.h @@ -0,0 +1,242 @@ +/* + * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + * + * 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 + */ + +/* Digests */ +extern const OSSL_DISPATCH sha1_functions[]; +extern const OSSL_DISPATCH sha224_functions[]; +extern const OSSL_DISPATCH sha256_functions[]; +extern const OSSL_DISPATCH sha384_functions[]; +extern const OSSL_DISPATCH sha512_functions[]; +extern const OSSL_DISPATCH sha512_224_functions[]; +extern const OSSL_DISPATCH sha512_256_functions[]; +extern const OSSL_DISPATCH sha3_224_functions[]; +extern const OSSL_DISPATCH sha3_256_functions[]; +extern const OSSL_DISPATCH sha3_384_functions[]; +extern const OSSL_DISPATCH sha3_512_functions[]; +extern const OSSL_DISPATCH keccak_kmac_128_functions[]; +extern const OSSL_DISPATCH keccak_kmac_256_functions[]; +extern const OSSL_DISPATCH shake_128_functions[]; +extern const OSSL_DISPATCH shake_256_functions[]; +extern const OSSL_DISPATCH blake2s256_functions[]; +extern const OSSL_DISPATCH blake2b512_functions[]; +extern const OSSL_DISPATCH md5_functions[]; +extern const OSSL_DISPATCH md5_sha1_functions[]; +extern const OSSL_DISPATCH sm3_functions[]; +extern const OSSL_DISPATCH md2_functions[]; +extern const OSSL_DISPATCH md4_functions[]; +extern const OSSL_DISPATCH mdc2_functions[]; +extern const OSSL_DISPATCH wp_functions[]; +extern const OSSL_DISPATCH ripemd160_functions[]; + +/* Ciphers */ +extern const OSSL_DISPATCH aes256ecb_functions[]; +extern const OSSL_DISPATCH aes192ecb_functions[]; +extern const OSSL_DISPATCH aes128ecb_functions[]; +extern const OSSL_DISPATCH aes256cbc_functions[]; +extern const OSSL_DISPATCH aes192cbc_functions[]; +extern const OSSL_DISPATCH aes128cbc_functions[]; +extern const OSSL_DISPATCH aes256ofb_functions[]; +extern const OSSL_DISPATCH aes192ofb_functions[]; +extern const OSSL_DISPATCH aes128ofb_functions[]; +extern const OSSL_DISPATCH aes256cfb_functions[]; +extern const OSSL_DISPATCH aes192cfb_functions[]; +extern const OSSL_DISPATCH aes128cfb_functions[]; +extern const OSSL_DISPATCH aes256cfb1_functions[]; +extern const OSSL_DISPATCH aes192cfb1_functions[]; +extern const OSSL_DISPATCH aes128cfb1_functions[]; +extern const OSSL_DISPATCH aes256cfb8_functions[]; +extern const OSSL_DISPATCH aes192cfb8_functions[]; +extern const OSSL_DISPATCH aes128cfb8_functions[]; +extern const OSSL_DISPATCH aes256ctr_functions[]; +extern const OSSL_DISPATCH aes192ctr_functions[]; +extern const OSSL_DISPATCH aes128ctr_functions[]; +extern const OSSL_DISPATCH aes256xts_functions[]; +extern const OSSL_DISPATCH aes128xts_functions[]; +#ifndef OPENSSL_NO_OCB +extern const OSSL_DISPATCH aes256ocb_functions[]; +extern const OSSL_DISPATCH aes192ocb_functions[]; +extern const OSSL_DISPATCH aes128ocb_functions[]; +#endif /* OPENSSL_NO_OCB */ +extern const OSSL_DISPATCH aes256gcm_functions[]; +extern const OSSL_DISPATCH aes192gcm_functions[]; +extern const OSSL_DISPATCH aes128gcm_functions[]; +extern const OSSL_DISPATCH aes256ccm_functions[]; +extern const OSSL_DISPATCH aes192ccm_functions[]; +extern const OSSL_DISPATCH aes128ccm_functions[]; +extern const OSSL_DISPATCH aes256wrap_functions[]; +extern const OSSL_DISPATCH aes192wrap_functions[]; +extern const OSSL_DISPATCH aes128wrap_functions[]; +extern const OSSL_DISPATCH aes256wrappad_functions[]; +extern const OSSL_DISPATCH aes192wrappad_functions[]; +extern const OSSL_DISPATCH aes128wrappad_functions[]; + +#ifndef OPENSSL_NO_ARIA +extern const OSSL_DISPATCH aria256gcm_functions[]; +extern const OSSL_DISPATCH aria192gcm_functions[]; +extern const OSSL_DISPATCH aria128gcm_functions[]; +extern const OSSL_DISPATCH aria256ccm_functions[]; +extern const OSSL_DISPATCH aria192ccm_functions[]; +extern const OSSL_DISPATCH aria128ccm_functions[]; +extern const OSSL_DISPATCH aria256ecb_functions[]; +extern const OSSL_DISPATCH aria192ecb_functions[]; +extern const OSSL_DISPATCH aria128ecb_functions[]; +extern const OSSL_DISPATCH aria256cbc_functions[]; +extern const OSSL_DISPATCH aria192cbc_functions[]; +extern const OSSL_DISPATCH aria128cbc_functions[]; +extern const OSSL_DISPATCH aria256ofb_functions[]; +extern const OSSL_DISPATCH aria192ofb_functions[]; +extern const OSSL_DISPATCH aria128ofb_functions[]; +extern const OSSL_DISPATCH aria256cfb_functions[]; +extern const OSSL_DISPATCH aria192cfb_functions[]; +extern const OSSL_DISPATCH aria128cfb_functions[]; +extern const OSSL_DISPATCH aria256cfb1_functions[]; +extern const OSSL_DISPATCH aria192cfb1_functions[]; +extern const OSSL_DISPATCH aria128cfb1_functions[]; +extern const OSSL_DISPATCH aria256cfb8_functions[]; +extern const OSSL_DISPATCH aria192cfb8_functions[]; +extern const OSSL_DISPATCH aria128cfb8_functions[]; +extern const OSSL_DISPATCH aria256ctr_functions[]; +extern const OSSL_DISPATCH aria192ctr_functions[]; +extern const OSSL_DISPATCH aria128ctr_functions[]; +#endif /* OPENSSL_NO_ARIA */ +#ifndef OPENSSL_NO_CAMELLIA +extern const OSSL_DISPATCH camellia256ecb_functions[]; +extern const OSSL_DISPATCH camellia192ecb_functions[]; +extern const OSSL_DISPATCH camellia128ecb_functions[]; +extern const OSSL_DISPATCH camellia256cbc_functions[]; +extern const OSSL_DISPATCH camellia192cbc_functions[]; +extern const OSSL_DISPATCH camellia128cbc_functions[]; +extern const OSSL_DISPATCH camellia256ofb_functions[]; +extern const OSSL_DISPATCH camellia192ofb_functions[]; +extern const OSSL_DISPATCH camellia128ofb_functions[]; +extern const OSSL_DISPATCH camellia256cfb_functions[]; +extern const OSSL_DISPATCH camellia192cfb_functions[]; +extern const OSSL_DISPATCH camellia128cfb_functions[]; +extern const OSSL_DISPATCH camellia256cfb1_functions[]; +extern const OSSL_DISPATCH camellia192cfb1_functions[]; +extern const OSSL_DISPATCH camellia128cfb1_functions[]; +extern const OSSL_DISPATCH camellia256cfb8_functions[]; +extern const OSSL_DISPATCH camellia192cfb8_functions[]; +extern const OSSL_DISPATCH camellia128cfb8_functions[]; +extern const OSSL_DISPATCH camellia256ctr_functions[]; +extern const OSSL_DISPATCH camellia192ctr_functions[]; +extern const OSSL_DISPATCH camellia128ctr_functions[]; +#endif /* OPENSSL_NO_CAMELLIA */ +#ifndef OPENSSL_NO_BF +extern const OSSL_DISPATCH blowfish128ecb_functions[]; +extern const OSSL_DISPATCH blowfish128cbc_functions[]; +extern const OSSL_DISPATCH blowfish64ofb64_functions[]; +extern const OSSL_DISPATCH blowfish64cfb64_functions[]; +#endif /* OPENSSL_NO_BF */ +#ifndef OPENSSL_NO_IDEA +extern const OSSL_DISPATCH idea128ecb_functions[]; +extern const OSSL_DISPATCH idea128cbc_functions[]; +extern const OSSL_DISPATCH idea128ofb64_functions[]; +extern const OSSL_DISPATCH idea128cfb64_functions[]; +#endif /* OPENSSL_NO_IDEA */ +#ifndef OPENSSL_NO_CAST +extern const OSSL_DISPATCH cast5128ecb_functions[]; +extern const OSSL_DISPATCH cast5128cbc_functions[]; +extern const OSSL_DISPATCH cast564ofb64_functions[]; +extern const OSSL_DISPATCH cast564cfb64_functions[]; +#endif /* OPENSSL_NO_CAST */ +#ifndef OPENSSL_NO_SEED +extern const OSSL_DISPATCH seed128ecb_functions[]; +extern const OSSL_DISPATCH seed128cbc_functions[]; +extern const OSSL_DISPATCH seed128ofb128_functions[]; +extern const OSSL_DISPATCH seed128cfb128_functions[]; +#endif /* OPENSSL_NO_SEED */ +#ifndef OPENSSL_NO_SM4 +extern const OSSL_DISPATCH sm4128ecb_functions[]; +extern const OSSL_DISPATCH sm4128cbc_functions[]; +extern const OSSL_DISPATCH sm4128ctr_functions[]; +extern const OSSL_DISPATCH sm4128ofb128_functions[]; +extern const OSSL_DISPATCH sm4128cfb128_functions[]; +#endif /* OPENSSL_NO_SM4 */ +#ifndef OPENSSL_NO_RC5 +extern const OSSL_DISPATCH rc5128ecb_functions[]; +extern const OSSL_DISPATCH rc5128cbc_functions[]; +extern const OSSL_DISPATCH rc5128ofb64_functions[]; +extern const OSSL_DISPATCH rc5128cfb64_functions[]; +#endif /* OPENSSL_NO_RC5 */ +#ifndef OPENSSL_NO_RC2 +extern const OSSL_DISPATCH rc2128ecb_functions[]; +extern const OSSL_DISPATCH rc2128cbc_functions[]; +extern const OSSL_DISPATCH rc240cbc_functions[]; +extern const OSSL_DISPATCH rc264cbc_functions[]; +extern const OSSL_DISPATCH rc2128cfb128_functions[]; +extern const OSSL_DISPATCH rc2128ofb128_functions[]; +#endif /* OPENSSL_NO_RC2 */ +#ifndef OPENSSL_NO_DES +extern const OSSL_DISPATCH tdes_ede3_ecb_functions[]; +extern const OSSL_DISPATCH tdes_ede3_cbc_functions[]; +# ifndef FIPS_MODE +extern const OSSL_DISPATCH tdes_ede3_ofb_functions[]; +extern const OSSL_DISPATCH tdes_ede3_cfb_functions[]; +extern const OSSL_DISPATCH tdes_ede3_cfb8_functions[]; +extern const OSSL_DISPATCH tdes_ede3_cfb1_functions[]; + +extern const OSSL_DISPATCH tdes_ede2_ecb_functions[]; +extern const OSSL_DISPATCH tdes_ede2_cbc_functions[]; +extern const OSSL_DISPATCH tdes_ede2_ofb_functions[]; +extern const OSSL_DISPATCH tdes_ede2_cfb_functions[]; + +extern const OSSL_DISPATCH tdes_desx_cbc_functions[]; +extern const OSSL_DISPATCH tdes_wrap_cbc_functions[]; + +extern const OSSL_DISPATCH des_ecb_functions[]; +extern const OSSL_DISPATCH des_cbc_functions[]; +extern const OSSL_DISPATCH des_ofb64_functions[]; +extern const OSSL_DISPATCH des_cfb64_functions[]; +extern const OSSL_DISPATCH des_cfb1_functions[]; +extern const OSSL_DISPATCH des_cfb8_functions[]; +# endif /* FIPS_MODE */ +#endif /* OPENSSL_NO_DES */ + +#ifndef OPENSSL_NO_RC4 +extern const OSSL_DISPATCH rc440_functions[]; +extern const OSSL_DISPATCH rc4128_functions[]; +#endif /* OPENSSL_NO_RC4 */ + +/* MACs */ +extern const OSSL_DISPATCH blake2bmac_functions[]; +extern const OSSL_DISPATCH blake2smac_functions[]; +extern const OSSL_DISPATCH cmac_functions[]; +extern const OSSL_DISPATCH gmac_functions[]; +extern const OSSL_DISPATCH hmac_functions[]; +extern const OSSL_DISPATCH kmac128_functions[]; +extern const OSSL_DISPATCH kmac256_functions[]; +extern const OSSL_DISPATCH siphash_functions[]; +extern const OSSL_DISPATCH poly1305_functions[]; + +/* KDFs / PRFs */ +extern const OSSL_DISPATCH kdf_pbkdf2_functions[]; +#ifndef OPENSSL_NO_SCRYPT +extern const OSSL_DISPATCH kdf_scrypt_functions[]; +#endif +extern const OSSL_DISPATCH kdf_tls1_prf_functions[]; +extern const OSSL_DISPATCH kdf_hkdf_functions[]; +extern const OSSL_DISPATCH kdf_sshkdf_functions[]; +extern const OSSL_DISPATCH kdf_sskdf_functions[]; +extern const OSSL_DISPATCH kdf_x963_kdf_functions[]; +extern const OSSL_DISPATCH kdf_kbkdf_functions[]; +#ifndef OPENSSL_NO_CMS +extern const OSSL_DISPATCH kdf_x942_kdf_functions[]; +#endif + + +/* Key management */ +extern const OSSL_DISPATCH dh_keymgmt_functions[]; +extern const OSSL_DISPATCH dsa_keymgmt_functions[]; + +/* Key Exchange */ +extern const OSSL_DISPATCH dh_keyexch_functions[]; + +/* Signature */ +extern const OSSL_DISPATCH dsa_signature_functions[]; diff --git a/providers/implementations/kdfs/hkdf.c b/providers/implementations/kdfs/hkdf.c index 041811f0e1..333c2bafde 100644 --- a/providers/implementations/kdfs/hkdf.c +++ b/providers/implementations/kdfs/hkdf.c @@ -19,7 +19,7 @@ #include "crypto/evp.h" #include "internal/provider_ctx.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_util.h" #include "e_os.h" diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c index ffffef0b17..455ee4ba15 100644 --- a/providers/implementations/kdfs/kbkdf.c +++ b/providers/implementations/kdfs/kbkdf.c @@ -37,7 +37,7 @@ #include "internal/cryptlib.h" #include "crypto/evp.h" #include "internal/numbers.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/provider_util.h" #include "internal/providercommonerr.h" diff --git a/providers/implementations/kdfs/pbkdf2.c b/providers/implementations/kdfs/pbkdf2.c index 68aa0aa7c4..d1047c6e2c 100644 --- a/providers/implementations/kdfs/pbkdf2.c +++ b/providers/implementations/kdfs/pbkdf2.c @@ -19,7 +19,7 @@ #include "crypto/evp.h" #include "internal/provider_ctx.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_util.h" #include "pbkdf2.h" diff --git a/providers/implementations/kdfs/scrypt.c b/providers/implementations/kdfs/scrypt.c index 505963eec5..b001bb7cb2 100644 --- a/providers/implementations/kdfs/scrypt.c +++ b/providers/implementations/kdfs/scrypt.c @@ -16,10 +16,10 @@ #include #include "crypto/evp.h" #include "internal/numbers.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #ifndef OPENSSL_NO_SCRYPT diff --git a/providers/implementations/kdfs/sshkdf.c b/providers/implementations/kdfs/sshkdf.c index 7e6445dbdd..23a0caac5f 100644 --- a/providers/implementations/kdfs/sshkdf.c +++ b/providers/implementations/kdfs/sshkdf.c @@ -18,7 +18,7 @@ #include "crypto/evp.h" #include "internal/provider_ctx.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" # include "internal/provider_util.h" /* See RFC 4253, Section 7.2 */ diff --git a/providers/implementations/kdfs/sskdf.c b/providers/implementations/kdfs/sskdf.c index 1e538a9c0a..23adbc37ba 100644 --- a/providers/implementations/kdfs/sskdf.c +++ b/providers/implementations/kdfs/sskdf.c @@ -47,7 +47,7 @@ #include "crypto/evp.h" #include "internal/provider_ctx.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_util.h" typedef struct { diff --git a/providers/implementations/kdfs/tls1_prf.c b/providers/implementations/kdfs/tls1_prf.c index af49b1b044..941286b6b5 100644 --- a/providers/implementations/kdfs/tls1_prf.c +++ b/providers/implementations/kdfs/tls1_prf.c @@ -57,7 +57,7 @@ #include "crypto/evp.h" #include "internal/provider_ctx.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_util.h" #include "e_os.h" diff --git a/providers/implementations/kdfs/x942kdf.c b/providers/implementations/kdfs/x942kdf.c index 65c586fb99..efa1c76271 100644 --- a/providers/implementations/kdfs/x942kdf.c +++ b/providers/implementations/kdfs/x942kdf.c @@ -27,7 +27,7 @@ # include "crypto/evp.h" # include "internal/provider_ctx.h" # include "internal/providercommonerr.h" -# include "internal/provider_algs.h" +# include "prov/implementations.h" # include "internal/provider_util.h" # define X942KDF_MAX_INLEN (1 << 30) diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c index c13f07546b..e2999bde18 100644 --- a/providers/implementations/keymgmt/dh_kmgmt.c +++ b/providers/implementations/keymgmt/dh_kmgmt.c @@ -12,7 +12,7 @@ #include #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_keymgmt_importkey_fn dh_importkey; diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c index a53c0b212c..818a451bb9 100644 --- a/providers/implementations/keymgmt/dsa_kmgmt.c +++ b/providers/implementations/keymgmt/dsa_kmgmt.c @@ -12,7 +12,7 @@ #include #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" static OSSL_OP_keymgmt_importkey_fn dsa_importkey; diff --git a/providers/implementations/macs/blake2_mac_impl.c b/providers/implementations/macs/blake2_mac_impl.c index a191e78def..d33b76ae71 100644 --- a/providers/implementations/macs/blake2_mac_impl.c +++ b/providers/implementations/macs/blake2_mac_impl.c @@ -14,7 +14,7 @@ #include "prov/blake2.h" #include "internal/cryptlib.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* * Forward declaration of everything implemented here. This is not strictly diff --git a/providers/implementations/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c index c01b2f87ad..d5ad4f3e9a 100644 --- a/providers/implementations/macs/cmac_prov.c +++ b/providers/implementations/macs/cmac_prov.c @@ -14,7 +14,7 @@ #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/provider_util.h" diff --git a/providers/implementations/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c index 3d81af8766..8947d09688 100644 --- a/providers/implementations/macs/gmac_prov.c +++ b/providers/implementations/macs/gmac_prov.c @@ -16,7 +16,7 @@ #include #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/provider_util.h" diff --git a/providers/implementations/macs/hmac_prov.c b/providers/implementations/macs/hmac_prov.c index e9d7647ce2..7ae0d476f0 100644 --- a/providers/implementations/macs/hmac_prov.c +++ b/providers/implementations/macs/hmac_prov.c @@ -14,7 +14,7 @@ #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/provider_util.h" diff --git a/providers/implementations/macs/kmac_prov.c b/providers/implementations/macs/kmac_prov.c index 99bcbf7da9..0c2e8e3c93 100644 --- a/providers/implementations/macs/kmac_prov.c +++ b/providers/implementations/macs/kmac_prov.c @@ -55,7 +55,7 @@ #include #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" #include "internal/provider_util.h" diff --git a/providers/implementations/macs/poly1305_prov.c b/providers/implementations/macs/poly1305_prov.c index 88005716e6..9dda057d74 100644 --- a/providers/implementations/macs/poly1305_prov.c +++ b/providers/implementations/macs/poly1305_prov.c @@ -22,7 +22,7 @@ #include "../../../crypto/poly1305/poly1305_local.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* * Forward declaration of everything implemented here. This is not strictly diff --git a/providers/implementations/macs/siphash_prov.c b/providers/implementations/macs/siphash_prov.c index a9511925f0..190187d690 100644 --- a/providers/implementations/macs/siphash_prov.c +++ b/providers/implementations/macs/siphash_prov.c @@ -23,7 +23,7 @@ #include "../../../crypto/siphash/siphash_local.h" #include "internal/providercommonerr.h" -#include "internal/provider_algs.h" +#include "prov/implementations.h" /* * Forward declaration of everything implemented here. This is not strictly diff --git a/providers/implementations/signature/dsa.c b/providers/implementations/signature/dsa.c index 1d6b565d38..addef0079a 100644 --- a/providers/implementations/signature/dsa.c +++ b/providers/implementations/signature/dsa.c @@ -13,7 +13,7 @@ #include #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" #include "internal/provider_ctx.h" static OSSL_OP_signature_newctx_fn dsa_newctx; diff --git a/providers/legacy/legacyprov.c b/providers/legacy/legacyprov.c index 1e0c315629..11a050e203 100644 --- a/providers/legacy/legacyprov.c +++ b/providers/legacy/legacyprov.c @@ -13,7 +13,7 @@ #include #include #include -#include "internal/provider_algs.h" +#include "prov/implementations.h" #ifdef STATIC_LEGACY OSSL_provider_init_fn ossl_legacy_provider_init;