From dfbc7a436cad6c7e6d7ea00f4a56a59ba9a4d69d Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 22 Feb 2018 16:41:04 +0000 Subject: [PATCH] Provide DH_get0_engine(). --- lib/libcrypto/Symbols.list | 1 + lib/libcrypto/dh/dh.h | 3 ++- lib/libcrypto/dh/dh_lib.c | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 854baed64a7..2b674655ae2 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -773,6 +773,7 @@ DH_free DH_generate_key DH_generate_parameters DH_generate_parameters_ex +DH_get0_engine DH_get0_key DH_get0_pqg DH_get_default_method diff --git a/lib/libcrypto/dh/dh.h b/lib/libcrypto/dh/dh.h index a5e686b21ae..082b50254d6 100644 --- a/lib/libcrypto/dh/dh.h +++ b/lib/libcrypto/dh/dh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.24 2018/02/20 18:01:42 tb Exp $ */ +/* $OpenBSD: dh.h,v 1.25 2018/02/22 16:41:04 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -189,6 +189,7 @@ int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, int DH_set_ex_data(DH *d, int idx, void *arg); void *DH_get_ex_data(DH *d, int idx); +ENGINE *DH_get0_engine(DH *d); void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); diff --git a/lib/libcrypto/dh/dh_lib.c b/lib/libcrypto/dh/dh_lib.c index 638b3a18fc4..e02ce7455a2 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.29 2018/02/20 21:11:15 tb Exp $ */ +/* $OpenBSD: dh_lib.c,v 1.30 2018/02/22 16:41:04 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -247,6 +247,12 @@ DH_bits(const DH *dh) return BN_num_bits(dh->p); } +ENGINE * +DH_get0_engine(DH *dh) +{ + return dh->engine; +} + void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { -- 2.20.1