aboutsummaryrefslogtreecommitdiffstats
path: root/include/openssl
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2019-04-11 20:27:59 +1000
committerShane Lontis <shane.lontis@oracle.com>2019-06-04 12:09:50 +1000
commitd5e5e2ffafc7dbc861f7d285508cf129c5e8f5ac (patch)
tree3920b0febd6d2716940fb022b57894fe2ebf565d /include/openssl
parentbf5b04ea25d6ac7d31e388b4e87d3eb5cd1e1e2b (diff)
downloadopenssl-d5e5e2ffafc7dbc861f7d285508cf129c5e8f5ac.tar.gz
Move digests to providers
Move digest code into the relevant providers (fips, default, legacy). The headers are temporarily moved to be internal, and will be moved into providers after all external references are resolved. The deprecated digest code can not be removed until EVP_PKEY (signing) is supported by providers. EVP_MD data can also not yet be cleaned up for the same reasons. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8763)
Diffstat (limited to 'include/openssl')
-rw-r--r--include/openssl/core_names.h7
-rw-r--r--include/openssl/core_numbers.h10
-rw-r--r--include/openssl/evp.h5
3 files changed, 18 insertions, 4 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index 35a23d7421..52a3f8b30b 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -40,6 +40,13 @@ extern "C" {
#define OSSL_CIPHER_PARAM_PADDING "padding"
#define OSSL_CIPHER_PARAM_MODE "mode"
+/* digest parameters */
+#define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
+#define OSSL_DIGEST_PARAM_CMD "cmd"
+#define OSSL_DIGEST_PARAM_MSG "msg"
+#define OSSL_DIGEST_PARAM_PAD_TYPE "pad_type"
+#define OSSL_DIGEST_PARAM_MICALG "micalg"
+
# ifdef __cplusplus
}
# endif
diff --git a/include/openssl/core_numbers.h b/include/openssl/core_numbers.h
index 8d026f4a17..03a918d508 100644
--- a/include/openssl/core_numbers.h
+++ b/include/openssl/core_numbers.h
@@ -91,7 +91,8 @@ OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *,provider_query_operation,
# define OSSL_FUNC_DIGEST_DUPCTX 7
# define OSSL_FUNC_DIGEST_SIZE 8
# define OSSL_FUNC_DIGEST_BLOCK_SIZE 9
-
+# define OSSL_FUNC_DIGEST_SET_PARAMS 10
+# define OSSL_FUNC_DIGEST_GET_PARAMS 11
OSSL_CORE_MAKE_FUNC(void *, OP_digest_newctx, (void *provctx))
OSSL_CORE_MAKE_FUNC(int, OP_digest_init, (void *dctx))
@@ -107,9 +108,13 @@ OSSL_CORE_MAKE_FUNC(int, OP_digest_digest,
OSSL_CORE_MAKE_FUNC(void, OP_digest_cleanctx, (void *dctx))
OSSL_CORE_MAKE_FUNC(void, OP_digest_freectx, (void *dctx))
OSSL_CORE_MAKE_FUNC(void *, OP_digest_dupctx, (void *dctx))
+
OSSL_CORE_MAKE_FUNC(size_t, OP_digest_size, (void))
OSSL_CORE_MAKE_FUNC(size_t, OP_digest_block_size, (void))
-
+OSSL_CORE_MAKE_FUNC(int, OP_digest_set_params,
+ (void *vctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_get_params,
+ (void *vctx, const OSSL_PARAM params[]))
/* Symmetric Ciphers */
@@ -163,7 +168,6 @@ OSSL_CORE_MAKE_FUNC(int, OP_cipher_ctx_get_params, (void *cctx,
OSSL_CORE_MAKE_FUNC(int, OP_cipher_ctx_set_params, (void *cctx,
const OSSL_PARAM params[]))
-
# ifdef __cplusplus
}
# endif
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 593753cb27..a2af3fc9e2 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -17,6 +17,7 @@
# include <openssl/symhacks.h>
# include <openssl/bio.h>
# include <openssl/evperr.h>
+# include <openssl/params.h>
# define EVP_MAX_MD_SIZE 64/* longest known is SHA512 */
# define EVP_MAX_KEY_LENGTH 64
@@ -539,7 +540,9 @@ void BIO_set_md(BIO *, const EVP_MD *md);
# define EVP_delete_digest_alias(alias) \
OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS);
-int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
+int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
+int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
+DEPRECATEDIN_3(int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2))
EVP_MD_CTX *EVP_MD_CTX_new(void);
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);