_libre_ED25519_keypair
_libre_ED25519_sign
_libre_ED25519_verify
+_libre_d2i_DHparams_bio
+_libre_i2d_DHparams_bio
+_libre_d2i_DHparams_fp
+_libre_i2d_DHparams_fp
+_libre_DHparams_dup
+_libre_DH_OpenSSL
+_libre_DH_set_default_method
+_libre_DH_get_default_method
+_libre_DH_set_method
+_libre_DH_new_method
+_libre_DH_new
+_libre_DH_free
+_libre_DH_up_ref
+_libre_DH_size
+_libre_DH_bits
+_libre_DH_get_ex_new_index
+_libre_DH_set_ex_data
+_libre_DH_get_ex_data
+_libre_DH_security_bits
+_libre_DH_get0_engine
+_libre_DH_get0_pqg
+_libre_DH_set0_pqg
+_libre_DH_get0_key
+_libre_DH_set0_key
+_libre_DH_get0_p
+_libre_DH_get0_q
+_libre_DH_get0_g
+_libre_DH_get0_priv_key
+_libre_DH_get0_pub_key
+_libre_DH_clear_flags
+_libre_DH_test_flags
+_libre_DH_set_flags
+_libre_DH_get_length
+_libre_DH_set_length
+_libre_DH_generate_parameters
+_libre_DH_generate_parameters_ex
+_libre_DH_check
+_libre_DH_check_pub_key
+_libre_DH_generate_key
+_libre_DH_compute_key
+_libre_d2i_DHparams
+_libre_i2d_DHparams
+_libre_DHparams_print_fp
+_libre_DHparams_print
+_libre_ERR_load_DH_strings
-/* $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.
*/
{
return do_dh_print(bp, x, 4, NULL, 0);
}
+LCRYPTO_ALIAS(DHparams_print);
int
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)
-/* $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.
*/
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);
-/* $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.
*
BN_CTX_free(ctx);
return ok;
}
+LCRYPTO_ALIAS(DH_check);
int
DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key)
return ok;
}
+LCRYPTO_ALIAS(DH_check_pub_key);
-/* $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.
*
}
#endif
}
+LCRYPTO_ALIAS(ERR_load_DH_strings);
-/* $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.
*
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:
DH_free(ret);
return NULL;
}
+LCRYPTO_ALIAS(DH_generate_parameters);
-/* $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.
*
{
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",
{
return &dh_ossl;
}
+LCRYPTO_ALIAS(DH_OpenSSL);
static int
generate_key(DH *dh)
-/* $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.
*
{
default_DH_method = meth;
}
+LCRYPTO_ALIAS(DH_set_default_method);
const DH_METHOD *
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)
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)
}
return ret;
}
+LCRYPTO_ALIAS(DH_new_method);
void
DH_free(DH *r)
BN_free(r->priv_key);
free(r);
}
+LCRYPTO_ALIAS(DH_free);
int
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,
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)
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)
if (g != NULL)
*g = dh->g;
}
+LCRYPTO_ALIAS(DH_get0_pqg);
int
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)
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)
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)
dh->length = length;
return 1;
}
+LCRYPTO_ALIAS(DH_set_length);
--- /dev/null
+/* $OpenBSD: dh.h,v 1.1 2023/07/08 15:29:04 beck Exp $ */
+/*
+ * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBCRYPTO_DH_H
+#define _LIBCRYPTO_DH_H
+
+#ifndef _MSC_VER
+#include_next <openssl/dh.h>
+#else
+#include "../include/openssl/dh.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(d2i_DHparams_bio);
+LCRYPTO_USED(i2d_DHparams_bio);
+LCRYPTO_USED(d2i_DHparams_fp);
+LCRYPTO_USED(i2d_DHparams_fp);
+LCRYPTO_USED(DHparams_dup);
+LCRYPTO_USED(DH_OpenSSL);
+LCRYPTO_USED(DH_set_default_method);
+LCRYPTO_USED(DH_get_default_method);
+LCRYPTO_USED(DH_set_method);
+LCRYPTO_USED(DH_new_method);
+LCRYPTO_USED(DH_new);
+LCRYPTO_USED(DH_free);
+LCRYPTO_USED(DH_up_ref);
+LCRYPTO_USED(DH_size);
+LCRYPTO_USED(DH_bits);
+LCRYPTO_USED(DH_get_ex_new_index);
+LCRYPTO_USED(DH_set_ex_data);
+LCRYPTO_USED(DH_get_ex_data);
+LCRYPTO_USED(DH_security_bits);
+LCRYPTO_USED(DH_get0_engine);
+LCRYPTO_USED(DH_get0_pqg);
+LCRYPTO_USED(DH_set0_pqg);
+LCRYPTO_USED(DH_get0_key);
+LCRYPTO_USED(DH_set0_key);
+LCRYPTO_USED(DH_get0_p);
+LCRYPTO_USED(DH_get0_q);
+LCRYPTO_USED(DH_get0_g);
+LCRYPTO_USED(DH_get0_priv_key);
+LCRYPTO_USED(DH_get0_pub_key);
+LCRYPTO_USED(DH_clear_flags);
+LCRYPTO_USED(DH_test_flags);
+LCRYPTO_USED(DH_set_flags);
+LCRYPTO_USED(DH_get_length);
+LCRYPTO_USED(DH_set_length);
+LCRYPTO_USED(DH_generate_parameters);
+LCRYPTO_USED(DH_generate_parameters_ex);
+LCRYPTO_USED(DH_check);
+LCRYPTO_USED(DH_check_pub_key);
+LCRYPTO_USED(DH_generate_key);
+LCRYPTO_USED(DH_compute_key);
+LCRYPTO_USED(d2i_DHparams);
+LCRYPTO_USED(i2d_DHparams);
+LCRYPTO_USED(DHparams_print_fp);
+LCRYPTO_USED(DHparams_print);
+LCRYPTO_USED(ERR_load_DH_strings);
+
+#endif /* _LIBCRYPTO_DH_H */