summaryrefslogtreecommitdiff
path: root/lib/libcrypto/dh
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2023-07-08 15:29:05 +0000
committerBob Beck <beck@cvs.openbsd.org>2023-07-08 15:29:05 +0000
commit8bc6f8c69eaa80c0b464b98b21821de1c0da1e11 (patch)
tree934ee517812989eb627f4e737cb62493e80a5e72 /lib/libcrypto/dh
parentc7cf9e86d957bfc02b6d0ea5910fb59ba50e3fbf (diff)
Hide symbols in dh
ok tb@
Diffstat (limited to 'lib/libcrypto/dh')
-rw-r--r--lib/libcrypto/dh/dh_ameth.c4
-rw-r--r--lib/libcrypto/dh/dh_asn1.c9
-rw-r--r--lib/libcrypto/dh/dh_check.c4
-rw-r--r--lib/libcrypto/dh/dh_err.c3
-rw-r--r--lib/libcrypto/dh/dh_gen.c4
-rw-r--r--lib/libcrypto/dh/dh_key.c5
-rw-r--r--lib/libcrypto/dh/dh_lib.c30
7 files changed, 52 insertions, 7 deletions
diff --git a/lib/libcrypto/dh/dh_ameth.c b/lib/libcrypto/dh/dh_ameth.c
index 61d3d143972..cc594cfd38e 100644
--- a/lib/libcrypto/dh/dh_ameth.c
+++ b/lib/libcrypto/dh/dh_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_ameth.c,v 1.29 2023/07/07 06:59:18 tb Exp $ */
+/* $OpenBSD: dh_ameth.c,v 1.30 2023/07/08 15:29:03 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -448,6 +448,7 @@ DHparams_print(BIO *bp, const DH *x)
{
return do_dh_print(bp, x, 4, NULL, 0);
}
+LCRYPTO_ALIAS(DHparams_print);
int
DHparams_print_fp(FILE *fp, const DH *x)
@@ -466,6 +467,7 @@ DHparams_print_fp(FILE *fp, const DH *x)
return ret;
}
+LCRYPTO_ALIAS(DHparams_print_fp);
static int
dh_pkey_public_check(const EVP_PKEY *pkey)
diff --git a/lib/libcrypto/dh/dh_asn1.c b/lib/libcrypto/dh/dh_asn1.c
index 10184f0b2d9..2e0b054d345 100644
--- a/lib/libcrypto/dh/dh_asn1.c
+++ b/lib/libcrypto/dh/dh_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_asn1.c,v 1.11 2022/01/07 09:27:13 tb Exp $ */
+/* $OpenBSD: dh_asn1.c,v 1.12 2023/07/08 15:29:03 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -131,39 +131,46 @@ d2i_DHparams(DH **a, const unsigned char **in, long len)
return (DH *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
&DHparams_it);
}
+LCRYPTO_ALIAS(d2i_DHparams);
int
i2d_DHparams(const DH *a, unsigned char **out)
{
return ASN1_item_i2d((ASN1_VALUE *)a, out, &DHparams_it);
}
+LCRYPTO_ALIAS(i2d_DHparams);
DH *
d2i_DHparams_bio(BIO *bp, DH **a)
{
return ASN1_item_d2i_bio(&DHparams_it, bp, a);
}
+LCRYPTO_ALIAS(d2i_DHparams_bio);
int
i2d_DHparams_bio(BIO *bp, DH *a)
{
return ASN1_item_i2d_bio(&DHparams_it, bp, a);
}
+LCRYPTO_ALIAS(i2d_DHparams_bio);
DH *
d2i_DHparams_fp(FILE *fp, DH **a)
{
return ASN1_item_d2i_fp(&DHparams_it, fp, a);
}
+LCRYPTO_ALIAS(d2i_DHparams_fp);
int
i2d_DHparams_fp(FILE *fp, DH *a)
{
return ASN1_item_i2d_fp(&DHparams_it, fp, a);
}
+LCRYPTO_ALIAS(i2d_DHparams_fp);
DH *
DHparams_dup(DH *dh)
{
return ASN1_item_dup(&DHparams_it, dh);
}
+LCRYPTO_ALIAS(DHparams_dup);
diff --git a/lib/libcrypto/dh/dh_check.c b/lib/libcrypto/dh/dh_check.c
index 9bbbd55b301..f3d89f620af 100644
--- a/lib/libcrypto/dh/dh_check.c
+++ b/lib/libcrypto/dh/dh_check.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_check.c,v 1.26 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: dh_check.c,v 1.27 2023/07/08 15:29:03 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -227,6 +227,7 @@ DH_check(const DH *dh, int *flags)
BN_CTX_free(ctx);
return ok;
}
+LCRYPTO_ALIAS(DH_check);
int
DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key)
@@ -299,3 +300,4 @@ DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *flags)
return ok;
}
+LCRYPTO_ALIAS(DH_check_pub_key);
diff --git a/lib/libcrypto/dh/dh_err.c b/lib/libcrypto/dh/dh_err.c
index db66d68e3bb..f5dda2898d9 100644
--- a/lib/libcrypto/dh/dh_err.c
+++ b/lib/libcrypto/dh/dh_err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_err.c,v 1.18 2022/07/12 14:42:49 kn Exp $ */
+/* $OpenBSD: dh_err.c,v 1.19 2023/07/08 15:29:03 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
@@ -111,3 +111,4 @@ void ERR_load_DH_strings(void)
}
#endif
}
+LCRYPTO_ALIAS(ERR_load_DH_strings);
diff --git a/lib/libcrypto/dh/dh_gen.c b/lib/libcrypto/dh/dh_gen.c
index d51d10d2abd..3ffa5d80f17 100644
--- a/lib/libcrypto/dh/dh_gen.c
+++ b/lib/libcrypto/dh/dh_gen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_gen.c,v 1.20 2023/04/13 15:18:29 tb Exp $ */
+/* $OpenBSD: dh_gen.c,v 1.21 2023/07/08 15:29:03 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -75,6 +75,7 @@ DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb)
return ret->meth->generate_params(ret, prime_len, generator, cb);
return dh_builtin_genparams(ret, prime_len, generator, cb);
}
+LCRYPTO_ALIAS(DH_generate_parameters_ex);
/*
* We generate DH parameters as follows:
@@ -193,3 +194,4 @@ DH_generate_parameters(int prime_len, int generator,
DH_free(ret);
return NULL;
}
+LCRYPTO_ALIAS(DH_generate_parameters);
diff --git a/lib/libcrypto/dh/dh_key.c b/lib/libcrypto/dh/dh_key.c
index 89ae5f0fdc4..a4bd6894836 100644
--- a/lib/libcrypto/dh/dh_key.c
+++ b/lib/libcrypto/dh/dh_key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_key.c,v 1.38 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: dh_key.c,v 1.39 2023/07/08 15:29:03 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -77,12 +77,14 @@ DH_generate_key(DH *dh)
{
return dh->meth->generate_key(dh);
}
+LCRYPTO_ALIAS(DH_generate_key);
int
DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
{
return dh->meth->compute_key(key, pub_key, dh);
}
+LCRYPTO_ALIAS(DH_compute_key);
static DH_METHOD dh_ossl = {
.name = "OpenSSL DH Method",
@@ -98,6 +100,7 @@ DH_OpenSSL(void)
{
return &dh_ossl;
}
+LCRYPTO_ALIAS(DH_OpenSSL);
static int
generate_key(DH *dh)
diff --git a/lib/libcrypto/dh/dh_lib.c b/lib/libcrypto/dh/dh_lib.c
index e5cb46485de..987f0b1f7ab 100644
--- a/lib/libcrypto/dh/dh_lib.c
+++ b/lib/libcrypto/dh/dh_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_lib.c,v 1.38 2023/03/07 09:27:10 jsing Exp $ */
+/* $OpenBSD: dh_lib.c,v 1.39 2023/07/08 15:29:03 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -78,6 +78,7 @@ DH_set_default_method(const DH_METHOD *meth)
{
default_DH_method = meth;
}
+LCRYPTO_ALIAS(DH_set_default_method);
const DH_METHOD *
DH_get_default_method(void)
@@ -86,6 +87,7 @@ DH_get_default_method(void)
default_DH_method = DH_OpenSSL();
return default_DH_method;
}
+LCRYPTO_ALIAS(DH_get_default_method);
int
DH_set_method(DH *dh, const DH_METHOD *meth)
@@ -108,12 +110,14 @@ DH_set_method(DH *dh, const DH_METHOD *meth)
meth->init(dh);
return 1;
}
+LCRYPTO_ALIAS(DH_set_method);
DH *
DH_new(void)
{
return DH_new_method(NULL);
}
+LCRYPTO_ALIAS(DH_new);
DH *
DH_new_method(ENGINE *engine)
@@ -174,6 +178,7 @@ DH_new_method(ENGINE *engine)
}
return ret;
}
+LCRYPTO_ALIAS(DH_new_method);
void
DH_free(DH *r)
@@ -204,6 +209,7 @@ DH_free(DH *r)
BN_free(r->priv_key);
free(r);
}
+LCRYPTO_ALIAS(DH_free);
int
DH_up_ref(DH *r)
@@ -212,6 +218,7 @@ DH_up_ref(DH *r)
return i > 1 ? 1 : 0;
}
+LCRYPTO_ALIAS(DH_up_ref);
int
DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
@@ -220,30 +227,35 @@ DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, argl, argp, new_func,
dup_func, free_func);
}
+LCRYPTO_ALIAS(DH_get_ex_new_index);
int
DH_set_ex_data(DH *d, int idx, void *arg)
{
return CRYPTO_set_ex_data(&d->ex_data, idx, arg);
}
+LCRYPTO_ALIAS(DH_set_ex_data);
void *
DH_get_ex_data(DH *d, int idx)
{
return CRYPTO_get_ex_data(&d->ex_data, idx);
}
+LCRYPTO_ALIAS(DH_get_ex_data);
int
DH_size(const DH *dh)
{
return BN_num_bytes(dh->p);
}
+LCRYPTO_ALIAS(DH_size);
int
DH_bits(const DH *dh)
{
return BN_num_bits(dh->p);
}
+LCRYPTO_ALIAS(DH_bits);
int
DH_security_bits(const DH *dh)
@@ -257,12 +269,14 @@ DH_security_bits(const DH *dh)
return BN_security_bits(BN_num_bits(dh->p), N);
}
+LCRYPTO_ALIAS(DH_security_bits);
ENGINE *
DH_get0_engine(DH *dh)
{
return dh->engine;
}
+LCRYPTO_ALIAS(DH_get0_engine);
void
DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
@@ -274,6 +288,7 @@ DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
if (g != NULL)
*g = dh->g;
}
+LCRYPTO_ALIAS(DH_get0_pqg);
int
DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
@@ -297,6 +312,7 @@ DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
return 1;
}
+LCRYPTO_ALIAS(DH_set0_pqg);
void
DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
@@ -306,6 +322,7 @@ DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
if (priv_key != NULL)
*priv_key = dh->priv_key;
}
+LCRYPTO_ALIAS(DH_get0_key);
int
DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
@@ -321,60 +338,70 @@ DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
return 1;
}
+LCRYPTO_ALIAS(DH_set0_key);
const BIGNUM *
DH_get0_p(const DH *dh)
{
return dh->p;
}
+LCRYPTO_ALIAS(DH_get0_p);
const BIGNUM *
DH_get0_q(const DH *dh)
{
return dh->q;
}
+LCRYPTO_ALIAS(DH_get0_q);
const BIGNUM *
DH_get0_g(const DH *dh)
{
return dh->g;
}
+LCRYPTO_ALIAS(DH_get0_g);
const BIGNUM *
DH_get0_priv_key(const DH *dh)
{
return dh->priv_key;
}
+LCRYPTO_ALIAS(DH_get0_priv_key);
const BIGNUM *
DH_get0_pub_key(const DH *dh)
{
return dh->pub_key;
}
+LCRYPTO_ALIAS(DH_get0_pub_key);
void
DH_clear_flags(DH *dh, int flags)
{
dh->flags &= ~flags;
}
+LCRYPTO_ALIAS(DH_clear_flags);
int
DH_test_flags(const DH *dh, int flags)
{
return dh->flags & flags;
}
+LCRYPTO_ALIAS(DH_test_flags);
void
DH_set_flags(DH *dh, int flags)
{
dh->flags |= flags;
}
+LCRYPTO_ALIAS(DH_set_flags);
long
DH_get_length(const DH *dh)
{
return dh->length;
}
+LCRYPTO_ALIAS(DH_get_length);
int
DH_set_length(DH *dh, long length)
@@ -385,3 +412,4 @@ DH_set_length(DH *dh, long length)
dh->length = length;
return 1;
}
+LCRYPTO_ALIAS(DH_set_length);