diff options
author | Pauli <paul.dale@oracle.com> | 2020-03-24 05:58:57 +0100 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-03-28 03:27:20 +0100 |
commit | 110bff618b5bd3c700f2f0a290612ca642672ce6 (patch) | |
tree | 48a183a9f54b95c847f1e0222b82eaafec53da1a /crypto/dh | |
parent | s_server: Properly indicate ALPN protocol mismatch (diff) | |
download | openssl-110bff618b5bd3c700f2f0a290612ca642672ce6.tar.xz openssl-110bff618b5bd3c700f2f0a290612ca642672ce6.zip |
Param builder: make the OSSL_PARAM_BLD APIs public.
The catalyst for this is the difficult of passing BNs through the other
OSSL_PARAM APIs.
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/11390)
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_ameth.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index d0eaceccb4..505211054f 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -24,7 +24,7 @@ #include "crypto/evp.h" #include <openssl/cms.h> #include <openssl/core_names.h> -#include "internal/param_build.h" +#include "openssl/param_build.h" #include "internal/ffc.h" /* @@ -512,34 +512,34 @@ static int dh_pkey_export_to(const EVP_PKEY *from, void *to_keydata, if (p == NULL || g == NULL) return 0; - ossl_param_bld_init(&tmpl); - if (!ossl_param_bld_push_BN(&tmpl, OSSL_PKEY_PARAM_FFC_P, p) - || !ossl_param_bld_push_BN(&tmpl, OSSL_PKEY_PARAM_FFC_G, g)) + OSSL_PARAM_BLD_init(&tmpl); + if (!OSSL_PARAM_BLD_push_BN(&tmpl, OSSL_PKEY_PARAM_FFC_P, p) + || !OSSL_PARAM_BLD_push_BN(&tmpl, OSSL_PKEY_PARAM_FFC_G, g)) return 0; if (q != NULL) { - if (!ossl_param_bld_push_BN(&tmpl, OSSL_PKEY_PARAM_FFC_Q, q)) + if (!OSSL_PARAM_BLD_push_BN(&tmpl, OSSL_PKEY_PARAM_FFC_Q, q)) return 0; } selection |= OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS; if (pub_key != NULL) { - if (!ossl_param_bld_push_BN(&tmpl, OSSL_PKEY_PARAM_PUB_KEY, pub_key)) + if (!OSSL_PARAM_BLD_push_BN(&tmpl, OSSL_PKEY_PARAM_PUB_KEY, pub_key)) return 0; selection |= OSSL_KEYMGMT_SELECT_PUBLIC_KEY; } if (priv_key != NULL) { - if (!ossl_param_bld_push_BN(&tmpl, OSSL_PKEY_PARAM_PRIV_KEY, + if (!OSSL_PARAM_BLD_push_BN(&tmpl, OSSL_PKEY_PARAM_PRIV_KEY, priv_key)) return 0; selection |= OSSL_KEYMGMT_SELECT_PRIVATE_KEY; } - if ((params = ossl_param_bld_to_param(&tmpl)) == NULL) + if ((params = OSSL_PARAM_BLD_to_param(&tmpl)) == NULL) return 0; /* We export, the provider imports */ rv = evp_keymgmt_import(to_keymgmt, to_keydata, selection, params); - ossl_param_bld_free(params); + OSSL_PARAM_BLD_free(params); return rv; } |