summaryrefslogtreecommitdiff
path: root/crypto/dh/dh_check.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-02-18 15:56:53 +1000
committerShane Lontis <shane.lontis@oracle.com>2021-02-26 10:50:30 +1000
commit19dbb742cdf68d8ada6338a025491a3b46b9ebe1 (patch)
treebf4d54751be7e826ad47f690990bde107d30b839 /crypto/dh/dh_check.c
parent94553e85b68af4513a8ee89cd2a0d4e044d75139 (diff)
downloadopenssl-new-19dbb742cdf68d8ada6338a025491a3b46b9ebe1.tar.gz
Fix external symbols related to dh keys
Partial fix for #12964 This adds ossl_ names for the following symbols: dh_new_by_nid_ex, dh_new_ex, dh_generate_ffc_parameters, dh_generate_public_key, dh_get_named_group_uid_from_size, dh_gen_type_id2name, dh_gen_type_name2id, dh_cache_named_group, dh_get0_params, dh_get0_nid, dh_params_fromdata, dh_key_fromdata, dh_params_todata, dh_key_todata, dh_check_pub_key_partial, dh_check_priv_key, dh_check_pairwise, dh_get_method, dh_buf2key, dh_key2buf, dh_KDF_X9_42_asn1, dh_pkey_method, dhx_pkey_method Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14231)
Diffstat (limited to 'crypto/dh/dh_check.c')
-rw-r--r--crypto/dh/dh_check.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
index 5cbbdbf8c5..90697340f7 100644
--- a/crypto/dh/dh_check.c
+++ b/crypto/dh/dh_check.c
@@ -243,12 +243,12 @@ int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
* To only be used with ephemeral FFC public keys generated using the approved
* safe-prime groups.
*/
-int dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret)
+int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret)
{
return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret);
}
-int dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret)
+int ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret)
{
int ok = 0;
BIGNUM *two_powN = NULL, *upper;
@@ -281,7 +281,7 @@ err:
* FFC pairwise check from SP800-56A R3.
* Section 5.6.2.1.4 Owner Assurance of Pair-wise Consistency
*/
-int dh_check_pairwise(const DH *dh)
+int ossl_dh_check_pairwise(const DH *dh)
{
int ret = 0;
BN_CTX *ctx = NULL;
@@ -301,7 +301,7 @@ int dh_check_pairwise(const DH *dh)
goto err;
/* recalculate the public key = (g ^ priv) mod p */
- if (!dh_generate_public_key(ctx, dh, dh->priv_key, pub_key))
+ if (!ossl_dh_generate_public_key(ctx, dh, dh->priv_key, pub_key))
goto err;
/* check it matches the existing pubic_key */
ret = BN_cmp(pub_key, dh->pub_key) == 0;