diff options
author | Richard Levitte <levitte@openssl.org> | 2019-05-07 12:40:25 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-08-15 22:12:25 +0200 |
commit | 55a0a117e7d911752bc7e3e00a67f7a5ad168159 (patch) | |
tree | c24df0ee56ed31816eefdd3b808f128627457651 /providers/common | |
parent | Prepare EVP_MAC infrastructure for moving all MACs to providers (diff) | |
download | openssl-55a0a117e7d911752bc7e3e00a67f7a5ad168159.tar.xz openssl-55a0a117e7d911752bc7e3e00a67f7a5ad168159.zip |
Move BLAKE2 MACs to the providers
This also moves the remaining parts of BLAKE2 digests to the default
provider, and removes the legacy EVP implementation.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8877)
Diffstat (limited to 'providers/common')
-rw-r--r-- | providers/common/include/internal/provider_algs.h | 4 | ||||
-rw-r--r-- | providers/common/include/internal/providercommonerr.h | 4 | ||||
-rw-r--r-- | providers/common/provider_err.c | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/providers/common/include/internal/provider_algs.h b/providers/common/include/internal/provider_algs.h index 741b07b750..c35230758e 100644 --- a/providers/common/include/internal/provider_algs.h +++ b/providers/common/include/internal/provider_algs.h @@ -66,6 +66,10 @@ extern const OSSL_DISPATCH aria192gcm_functions[]; extern const OSSL_DISPATCH aria128gcm_functions[]; #endif /* OPENSSL_NO_ARIA */ +/* MACs */ +extern const OSSL_DISPATCH blake2bmac_functions[]; +extern const OSSL_DISPATCH blake2smac_functions[]; + /* Key management */ extern const OSSL_DISPATCH dh_keymgmt_functions[]; diff --git a/providers/common/include/internal/providercommonerr.h b/providers/common/include/internal/providercommonerr.h index c52dbd30f8..ad961b09a6 100644 --- a/providers/common/include/internal/providercommonerr.h +++ b/providers/common/include/internal/providercommonerr.h @@ -50,9 +50,13 @@ int ERR_load_PROV_strings(void); # define PROV_R_FAILED_TO_GET_PARAMETER 103 # define PROV_R_FAILED_TO_SET_PARAMETER 104 # define PROV_R_INVALID_AAD 108 +# define PROV_R_INVALID_CUSTOM_LENGTH 111 # define PROV_R_INVALID_IVLEN 109 # define PROV_R_INVALID_KEYLEN 105 +# define PROV_R_INVALID_SALT_LENGTH 112 # define PROV_R_INVALID_TAG 110 +# define PROV_R_NOT_XOF_OR_INVALID_LENGTH 113 +# define PROV_R_NO_KEY_SET 114 # define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106 # define PROV_R_WRONG_FINAL_BLOCK_LENGTH 107 diff --git a/providers/common/provider_err.c b/providers/common/provider_err.c index 7f07625a59..f1039cd930 100644 --- a/providers/common/provider_err.c +++ b/providers/common/provider_err.c @@ -24,9 +24,16 @@ static const ERR_STRING_DATA PROV_str_reasons[] = { {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_SET_PARAMETER), "failed to set parameter"}, {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_AAD), "invalid aad"}, + {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CUSTOM_LENGTH), {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_IVLEN), "invalid ivlen"}, {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KEYLEN), "invalid keylen"}, + {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SALT_LENGTH), + "invalid salt length"}, {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_TAG), "invalid tag"}, + "invalid custom length"}, + {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_XOF_OR_INVALID_LENGTH), + "not xof or invalid length"}, + {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_KEY_SET), "no key set"}, {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_OUTPUT_BUFFER_TOO_SMALL), "output buffer too small"}, {ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_FINAL_BLOCK_LENGTH), |