summaryrefslogtreecommitdiffstats
path: root/src/include/openssl/dh.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/openssl/dh.h')
-rw-r--r--src/include/openssl/dh.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/openssl/dh.h b/src/include/openssl/dh.h
index 60a030d..17574d5 100644
--- a/src/include/openssl/dh.h
+++ b/src/include/openssl/dh.h
@@ -137,6 +137,10 @@ OPENSSL_EXPORT int DH_compute_key(uint8_t *out, const BIGNUM *peers_key,
/* DH_size returns the number of bytes in the DH group's prime. */
OPENSSL_EXPORT int DH_size(const DH *dh);
+/* DH_num_bits returns the minimum number of bits needed to represent the
+ * absolute value of the DH group's prime. */
+OPENSSL_EXPORT unsigned DH_num_bits(const DH *dh);
+
#define DH_CHECK_P_NOT_PRIME 0x01
#define DH_CHECK_P_NOT_SAFE_PRIME 0x02
#define DH_CHECK_UNABLE_TO_CHECK_GENERATOR 0x04
@@ -249,7 +253,7 @@ struct dh_st {
BIGNUM *counter;
int flags;
- int references;
+ CRYPTO_refcount_t references;
CRYPTO_EX_DATA ex_data;
};