summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_dh.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-05-02 18:30:00 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-05-03 12:53:08 +0100
commitb6eb9827a6866981c08cc9613ca8b4a648894fb1 (patch)
treec5a6351461d8be964bc1f31fa2e34c4ebb7cfafd /crypto/bn/bn_dh.c
parent31ff45aa975acb43f1da20e714eadf4649655714 (diff)
Add OSSL_NELEM macro.
Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/bn/bn_dh.c')
-rw-r--r--crypto/bn/bn_dh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/bn/bn_dh.c b/crypto/bn/bn_dh.c
index 1c007bb901..cfd8c067a8 100644
--- a/crypto/bn/bn_dh.c
+++ b/crypto/bn/bn_dh.c
@@ -57,6 +57,7 @@
*/
#include "bn_lcl.h"
+#include "e_os.h"
#ifndef OPENSSL_NO_DH
/* DH parameters from RFC5114 */
@@ -247,8 +248,8 @@ static const BN_ULONG dh2048_256_q[] = {
/* Macro to make a BIGNUM from static data */
# define make_dh_bn(x) const BIGNUM _bignum_##x = { (BN_ULONG *) x, \
- sizeof(x)/sizeof(BN_ULONG),\
- sizeof(x)/sizeof(BN_ULONG),\
+ OSSL_NELEM(x),\
+ OSSL_NELEM(x),\
0, BN_FLG_STATIC_DATA };