summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_lib.c
diff options
context:
space:
mode:
authortb <>2018-02-20 17:59:31 +0000
committertb <>2018-02-20 17:59:31 +0000
commitd30e5e15f9a3c998b56789b616020f1019eefbfb (patch)
treea5c11f63c8d4a75df6399e07bcf260c097db4998 /src/lib/libcrypto/dh/dh_lib.c
parent93b4c9ceb476b480a4ee81b5b43b72ba3b1810c3 (diff)
downloadopenbsd-d30e5e15f9a3c998b56789b616020f1019eefbfb.tar.gz
openbsd-d30e5e15f9a3c998b56789b616020f1019eefbfb.tar.bz2
openbsd-d30e5e15f9a3c998b56789b616020f1019eefbfb.zip
Provide DH_bits()
ok jsing
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/dh/dh_lib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c
index e5e8b9146b..ade6ace487 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.26 2018/02/20 17:38:15 tb Exp $ */ 1/* $OpenBSD: dh_lib.c,v 1.27 2018/02/20 17:59:31 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 *
@@ -240,6 +240,12 @@ DH_size(const DH *dh)
240 return BN_num_bytes(dh->p); 240 return BN_num_bytes(dh->p);
241} 241}
242 242
243int
244DH_bits(const DH *dh)
245{
246 return BN_num_bits(dh->p);
247}
248
243void 249void
244DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) 250DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
245{ 251{