summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2018-02-22 16:41:04 +0000
committerjsing <>2018-02-22 16:41:04 +0000
commitf893e5308029c2b4c7a91260a11cea3204ee39ee (patch)
tree84f14b068fd8bb19ffd9c7098650922a54e0b7dd
parent0bf6ecbe2d20b398c509a2a122cd7821dca2f0b9 (diff)
downloadopenbsd-f893e5308029c2b4c7a91260a11cea3204ee39ee.tar.gz
openbsd-f893e5308029c2b4c7a91260a11cea3204ee39ee.tar.bz2
openbsd-f893e5308029c2b4c7a91260a11cea3204ee39ee.zip
Provide DH_get0_engine().
-rw-r--r--src/lib/libcrypto/Symbols.list1
-rw-r--r--src/lib/libcrypto/dh/dh.h3
-rw-r--r--src/lib/libcrypto/dh/dh_lib.c8
3 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index 854baed64a..2b674655ae 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -773,6 +773,7 @@ DH_free
773DH_generate_key 773DH_generate_key
774DH_generate_parameters 774DH_generate_parameters
775DH_generate_parameters_ex 775DH_generate_parameters_ex
776DH_get0_engine
776DH_get0_key 777DH_get0_key
777DH_get0_pqg 778DH_get0_pqg
778DH_get_default_method 779DH_get_default_method
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h
index a5e686b21a..082b50254d 100644
--- a/src/lib/libcrypto/dh/dh.h
+++ b/src/lib/libcrypto/dh/dh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.h,v 1.24 2018/02/20 18:01:42 tb Exp $ */ 1/* $OpenBSD: dh.h,v 1.25 2018/02/22 16:41:04 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -189,6 +189,7 @@ int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
189int DH_set_ex_data(DH *d, int idx, void *arg); 189int DH_set_ex_data(DH *d, int idx, void *arg);
190void *DH_get_ex_data(DH *d, int idx); 190void *DH_get_ex_data(DH *d, int idx);
191 191
192ENGINE *DH_get0_engine(DH *d);
192void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, 193void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
193 const BIGNUM **g); 194 const BIGNUM **g);
194int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); 195int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c
index 638b3a18fc..e02ce7455a 100644
--- a/src/lib/libcrypto/dh/dh_lib.c
+++ b/src/lib/libcrypto/dh/dh_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_lib.c,v 1.29 2018/02/20 21:11:15 tb Exp $ */ 1/* $OpenBSD: dh_lib.c,v 1.30 2018/02/22 16:41:04 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -247,6 +247,12 @@ DH_bits(const DH *dh)
247 return BN_num_bits(dh->p); 247 return BN_num_bits(dh->p);
248} 248}
249 249
250ENGINE *
251DH_get0_engine(DH *dh)
252{
253 return dh->engine;
254}
255
250void 256void
251DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) 257DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
252{ 258{