diff options
95 files changed, 918 insertions, 896 deletions
diff --git a/providers/decoders.inc b/providers/decoders.inc index d8c6da72e1..4f5699418b 100644 --- a/providers/decoders.inc +++ b/providers/decoders.inc @@ -12,31 +12,31 @@ #endif #ifndef OPENSSL_NO_DH - DECODER("DH", "yes", "der", der_to_dh_decoder_functions), - DECODER("DHX", "yes", "der", der_to_dhx_decoder_functions), + DECODER("DH", "yes", "der", ossl_der_to_dh_decoder_functions), + DECODER("DHX", "yes", "der", ossl_der_to_dhx_decoder_functions), #endif #ifndef OPENSSL_NO_DSA - DECODER("DSA", "yes", "der", der_to_dsa_decoder_functions), - DECODER("DSA", "yes", "mblob", msblob_to_dsa_decoder_functions), + DECODER("DSA", "yes", "der", ossl_der_to_dsa_decoder_functions), + DECODER("DSA", "yes", "mblob", ossl_msblob_to_dsa_decoder_functions), # ifndef OPENSSL_NO_RC4 - DECODER("DSA", "yes", "pvk", pvk_to_dsa_decoder_functions), + DECODER("DSA", "yes", "pvk", ossl_pvk_to_dsa_decoder_functions), # endif #endif #ifndef OPENSSL_NO_EC - DECODER("EC", "yes", "der", der_to_ec_decoder_functions), - DECODER("ED25519", "yes", "der", der_to_ed25519_decoder_functions), - DECODER("ED448", "yes", "der", der_to_ed448_decoder_functions), - DECODER("X25519", "yes", "der", der_to_x25519_decoder_functions), - DECODER("X448", "yes", "der", der_to_x448_decoder_functions), + DECODER("EC", "yes", "der", ossl_der_to_ec_decoder_functions), + DECODER("ED25519", "yes", "der", ossl_der_to_ed25519_decoder_functions), + DECODER("ED448", "yes", "der", ossl_der_to_ed448_decoder_functions), + DECODER("X25519", "yes", "der", ossl_der_to_x25519_decoder_functions), + DECODER("X448", "yes", "der", ossl_der_to_x448_decoder_functions), #endif - DECODER("RSA", "yes", "der", der_to_rsa_decoder_functions), - DECODER("RSA-PSS", "yes", "der", der_to_rsapss_decoder_functions), + DECODER("RSA", "yes", "der", ossl_der_to_rsa_decoder_functions), + DECODER("RSA-PSS", "yes", "der", ossl_der_to_rsapss_decoder_functions), #ifndef OPENSSL_NO_DSA - DECODER("RSA", "yes", "mblob", msblob_to_rsa_decoder_functions), + DECODER("RSA", "yes", "mblob", ossl_msblob_to_rsa_decoder_functions), # ifndef OPENSSL_NO_RC4 - DECODER("RSA", "yes", "pvk", pvk_to_rsa_decoder_functions), + DECODER("RSA", "yes", "pvk", ossl_pvk_to_rsa_decoder_functions), # endif #endif - DECODER("DER", "yes", "pem", pem_to_der_decoder_functions), + DECODER("DER", "yes", "pem", ossl_pem_to_der_decoder_functions), diff --git a/providers/defltprov.c b/providers/defltprov.c index dee48fb255..542e120c8f 100644 --- a/providers/defltprov.c +++ b/providers/defltprov.c @@ -98,32 +98,34 @@ static int deflt_get_params(void *provctx, OSSL_PARAM params[]) */ static const OSSL_ALGORITHM deflt_digests[] = { /* Our primary name:NIST name[:our older names] */ - { "SHA1:SHA-1:SSL3-SHA1", "provider=default", sha1_functions }, - { "SHA2-224:SHA-224:SHA224", "provider=default", sha224_functions }, - { "SHA2-256:SHA-256:SHA256", "provider=default", sha256_functions }, - { "SHA2-384:SHA-384:SHA384", "provider=default", sha384_functions }, - { "SHA2-512:SHA-512:SHA512", "provider=default", sha512_functions }, + { "SHA1:SHA-1:SSL3-SHA1", "provider=default", ossl_sha1_functions }, + { "SHA2-224:SHA-224:SHA224", "provider=default", ossl_sha224_functions }, + { "SHA2-256:SHA-256:SHA256", "provider=default", ossl_sha256_functions }, + { "SHA2-384:SHA-384:SHA384", "provider=default", ossl_sha384_functions }, + { "SHA2-512:SHA-512:SHA512", "provider=default", ossl_sha512_functions }, { "SHA2-512/224:SHA-512/224:SHA512-224", "provider=default", - sha512_224_functions }, + ossl_sha512_224_functions }, { "SHA2-512/256:SHA-512/256:SHA512-256", "provider=default", - sha512_256_functions }, + ossl_sha512_256_functions }, /* We agree with NIST here, so one name only */ - { "SHA3-224", "provider=default", sha3_224_functions }, - { "SHA3-256", "provider=default", sha3_256_functions }, - { "SHA3-384", "provider=default", sha3_384_functions }, - { "SHA3-512", "provider=default", sha3_512_functions }, + { "SHA3-224", "provider=default", ossl_sha3_224_functions }, + { "SHA3-256", "provider=default", ossl_sha3_256_functions }, + { "SHA3-384", "provider=default", ossl_sha3_384_functions }, + { "SHA3-512", "provider=default", ossl_sha3_512_functions }, /* * KECCAK-KMAC-128 and KECCAK-KMAC-256 as hashes are mostly useful for * the KMAC-128 and KMAC-256. */ - { "KECCAK-KMAC-128:KECCAK-KMAC128", "provider=default", keccak_kmac_128_functions }, - { "KECCAK-KMAC-256:KECCAK-KMAC256", "provider=default", keccak_kmac_256_functions }, + { "KECCAK-KMAC-128:KECCAK-KMAC128", "provider=default", + ossl_keccak_kmac_128_functions }, + { "KECCAK-KMAC-256:KECCAK-KMAC256", "provider=default", + ossl_keccak_kmac_256_functions }, /* Our primary name:NIST name */ - { "SHAKE-128:SHAKE128", "provider=default", shake_128_functions }, - { "SHAKE-256:SHAKE256", "provider=default", shake_256_functions }, + { "SHAKE-128:SHAKE128", "provider=default", ossl_shake_128_functions }, + { "SHAKE-256:SHAKE256", "provider=default", ossl_shake_256_functions }, #ifndef OPENSSL_NO_BLAKE2 /* @@ -133,159 +135,159 @@ static const OSSL_ALGORITHM deflt_digests[] = { * If we assume that "2b" and "2s" are versions, that pattern * fits with ours. We also add our historical names. */ - { "BLAKE2S-256:BLAKE2s256", "provider=default", blake2s256_functions }, - { "BLAKE2B-512:BLAKE2b512", "provider=default", blake2b512_functions }, + { "BLAKE2S-256:BLAKE2s256", "provider=default", ossl_blake2s256_functions }, + { "BLAKE2B-512:BLAKE2b512", "provider=default", ossl_blake2b512_functions }, #endif /* OPENSSL_NO_BLAKE2 */ #ifndef OPENSSL_NO_SM3 - { "SM3", "provider=default", sm3_functions }, + { "SM3", "provider=default", ossl_sm3_functions }, #endif /* OPENSSL_NO_SM3 */ #ifndef OPENSSL_NO_MD5 - { "MD5:SSL3-MD5", "provider=default", md5_functions }, - { "MD5-SHA1", "provider=default", md5_sha1_functions }, + { "MD5:SSL3-MD5", "provider=default", ossl_md5_functions }, + { "MD5-SHA1", "provider=default", ossl_md5_sha1_functions }, #endif /* OPENSSL_NO_MD5 */ { NULL, NULL, NULL } }; static const OSSL_ALGORITHM_CAPABLE deflt_ciphers[] = { - ALG("NULL", null_functions), - ALG("AES-256-ECB", aes256ecb_functions), - ALG("AES-192-ECB", aes192ecb_functions), - ALG("AES-128-ECB", aes128ecb_functions), - ALG("AES-256-CBC:AES256", aes256cbc_functions), - ALG("AES-192-CBC:AES192", aes192cbc_functions), - ALG("AES-128-CBC:AES128", aes128cbc_functions), - ALG("AES-128-CBC-CTS", aes128cbc_cts_functions), - ALG("AES-192-CBC-CTS", aes192cbc_cts_functions), - ALG("AES-256-CBC-CTS", aes256cbc_cts_functions), - ALG("AES-256-OFB", aes256ofb_functions), - ALG("AES-192-OFB", aes192ofb_functions), - ALG("AES-128-OFB", aes128ofb_functions), - ALG("AES-256-CFB", aes256cfb_functions), - ALG("AES-192-CFB", aes192cfb_functions), - ALG("AES-128-CFB", aes128cfb_functions), - ALG("AES-256-CFB1", aes256cfb1_functions), - ALG("AES-192-CFB1", aes192cfb1_functions), - ALG("AES-128-CFB1", aes128cfb1_functions), - ALG("AES-256-CFB8", aes256cfb8_functions), - ALG("AES-192-CFB8", aes192cfb8_functions), - ALG("AES-128-CFB8", aes128cfb8_functions), - ALG("AES-256-CTR", aes256ctr_functions), - ALG("AES-192-CTR", aes192ctr_functions), - ALG("AES-128-CTR", aes128ctr_functions), - ALG("AES-256-XTS", aes256xts_functions), - ALG("AES-128-XTS", aes128xts_functions), + ALG("NULL", ossl_null_functions), + ALG("AES-256-ECB", ossl_aes256ecb_functions), + ALG("AES-192-ECB", ossl_aes192ecb_functions), + ALG("AES-128-ECB", ossl_aes128ecb_functions), + ALG("AES-256-CBC:AES256", ossl_aes256cbc_functions), + ALG("AES-192-CBC:AES192", ossl_aes192cbc_functions), + ALG("AES-128-CBC:AES128", ossl_aes128cbc_functions), + ALG("AES-128-CBC-CTS", ossl_aes128cbc_cts_functions), + ALG("AES-192-CBC-CTS", ossl_aes192cbc_cts_functions), + ALG("AES-256-CBC-CTS", ossl_aes256cbc_cts_functions), + ALG("AES-256-OFB", ossl_aes256ofb_functions), + ALG("AES-192-OFB", ossl_aes192ofb_functions), + ALG("AES-128-OFB", ossl_aes128ofb_functions), + ALG("AES-256-CFB", ossl_aes256cfb_functions), + ALG("AES-192-CFB", ossl_aes192cfb_functions), + ALG("AES-128-CFB", ossl_aes128cfb_functions), + ALG("AES-256-CFB1", ossl_aes256cfb1_functions), + ALG("AES-192-CFB1", ossl_aes192cfb1_functions), + ALG("AES-128-CFB1", ossl_aes128cfb1_functions), + ALG("AES-256-CFB8", ossl_aes256cfb8_functions), + ALG("AES-192-CFB8", ossl_aes192cfb8_functions), + ALG("AES-128-CFB8", ossl_aes128cfb8_functions), + ALG("AES-256-CTR", ossl_aes256ctr_functions), + ALG("AES-192-CTR", ossl_aes192ctr_functions), + ALG("AES-128-CTR", ossl_aes128ctr_functions), + ALG("AES-256-XTS", ossl_aes256xts_functions), + ALG("AES-128-XTS", ossl_aes128xts_functions), #ifndef OPENSSL_NO_OCB - ALG("AES-256-OCB", aes256ocb_functions), - ALG("AES-192-OCB", aes192ocb_functions), - ALG("AES-128-OCB", aes128ocb_functions), + ALG("AES-256-OCB", ossl_aes256ocb_functions), + ALG("AES-192-OCB", ossl_aes192ocb_functions), + ALG("AES-128-OCB", ossl_aes128ocb_functions), #endif /* OPENSSL_NO_OCB */ #ifndef OPENSSL_NO_SIV - ALG("AES-128-SIV", aes128siv_functions), - ALG("AES-192-SIV", aes192siv_functions), - ALG("AES-256-SIV", aes256siv_functions), + ALG("AES-128-SIV", ossl_aes128siv_functions), + ALG("AES-192-SIV", ossl_aes192siv_functions), + ALG("AES-256-SIV", ossl_aes256siv_functions), #endif /* OPENSSL_NO_SIV */ - ALG("AES-256-GCM:id-aes256-GCM", aes256gcm_functions), - ALG("AES-192-GCM:id-aes192-GCM", aes192gcm_functions), - ALG("AES-128-GCM:id-aes128-GCM", aes128gcm_functions), - ALG("AES-256-CCM:id-aes256-CCM", aes256ccm_functions), - ALG("AES-192-CCM:id-aes192-CCM", aes192ccm_functions), - ALG("AES-128-CCM:id-aes128-CCM", aes128ccm_functions), - ALG("AES-256-WRAP:id-aes256-wrap:AES256-WRAP", aes256wrap_functions), - ALG("AES-192-WRAP:id-aes192-wrap:AES192-WRAP", aes192wrap_functions), - ALG("AES-128-WRAP:id-aes128-wrap:AES128-WRAP", aes128wrap_functions), + ALG("AES-256-GCM:id-aes256-GCM", ossl_aes256gcm_functions), + ALG("AES-192-GCM:id-aes192-GCM", ossl_aes192gcm_functions), + ALG("AES-128-GCM:id-aes128-GCM", ossl_aes128gcm_functions), + ALG("AES-256-CCM:id-aes256-CCM", ossl_aes256ccm_functions), + ALG("AES-192-CCM:id-aes192-CCM", ossl_aes192ccm_functions), + ALG("AES-128-CCM:id-aes128-CCM", ossl_aes128ccm_functions), + ALG("AES-256-WRAP:id-aes256-wrap:AES256-WRAP", ossl_aes256wrap_functions), + ALG("AES-192-WRAP:id-aes192-wrap:AES192-WRAP", ossl_aes192wrap_functions), + ALG("AES-128-WRAP:id-aes128-wrap:AES128-WRAP", ossl_aes128wrap_functions), ALG("AES-256-WRAP-PAD:id-aes256-wrap-pad:AES256-WRAP-PAD", - aes256wrappad_functions), + ossl_aes256wrappad_functions), ALG("AES-192-WRAP-PAD:id-aes192-wrap-pad:AES192-WRAP-PAD", - aes192wrappad_functions), + ossl_aes192wrappad_functions), ALG("AES-128-WRAP-PAD:id-aes128-wrap-pad:AES128-WRAP-PAD", - aes128wrappad_functions), - ALGC("AES-128-CBC-HMAC-SHA1", aes128cbc_hmac_sha1_functions, + ossl_aes128wrappad_functions), + ALGC("AES- |