diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-04-07 11:27:18 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-04-12 16:55:29 +1000 |
commit | 884314cab786a980189206b2cab5f62878a97669 (patch) | |
tree | d9b618c36ea0ab2a5401cbf592f1c1282f6d6de5 /include/internal | |
parent | d36114d7cd363d505940326f5a2512d9661a67ea (diff) |
Add OSSL_PARAM_dup() and OSSL_PARAM_merge().
These functions are prerequisites for implementing EVP_PKEY_todata().
OSSL_PARAM_dup() is required to make a deep copy of the exported
params (since the provider export() uses a OSSL_PARAM_BLD which throws away the
data after the call), and then use OSSL_PARAM_merge() to add some additional params
that can be passed to the EVP_PKEY_todata().
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14785)
Diffstat (limited to 'include/internal')
-rw-r--r-- | include/internal/param_build_set.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/internal/param_build_set.h b/include/internal/param_build_set.h index 88782b0aa7..126211b7f2 100644 --- a/include/internal/param_build_set.h +++ b/include/internal/param_build_set.h @@ -13,6 +13,17 @@ # include <openssl/safestack.h> # include <openssl/param_build.h> +# include "internal/cryptlib.h" + +typedef union { + OSSL_UNION_ALIGN; +} OSSL_PARAM_ALIGNED_BLOCK; + +# define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK) + +size_t ossl_param_bytes_to_blocks(size_t bytes); +void ossl_param_set_secure_block(OSSL_PARAM *last, void *secure_buffer, + size_t secure_buffer_sz); int ossl_param_build_set_int(OSSL_PARAM_BLD *bld, OSSL_PARAM *p, const char *key, int num); |