summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dh/dh_lib.c')
-rw-r--r--src/lib/libcrypto/dh/dh_lib.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c
index a66ed1f5bf..58f01b6e6a 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.33 2021/11/23 09:53:45 tb Exp $ */ 1/* $OpenBSD: dh_lib.c,v 1.34 2022/01/05 20:30:16 tb 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 *
@@ -307,6 +307,36 @@ DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
307 return 1; 307 return 1;
308} 308}
309 309
310const BIGNUM *
311DH_get0_p(const DH *dh)
312{
313 return dh->p;
314}
315
316const BIGNUM *
317DH_get0_q(const DH *dh)
318{
319 return dh->q;
320}
321
322const BIGNUM *
323DH_get0_g(const DH *dh)
324{
325 return dh->g;
326}
327
328const BIGNUM *
329DH_get0_priv_key(const DH *dh)
330{
331 return dh->priv_key;
332}
333
334const BIGNUM *
335DH_get0_pub_key(const DH *dh)
336{
337 return dh->pub_key;
338}
339
310void 340void
311DH_clear_flags(DH *dh, int flags) 341DH_clear_flags(DH *dh, int flags)
312{ 342{