summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Laurie <ben@links.org>2015-10-03 16:43:21 +0100
committerBen Laurie <ben@links.org>2015-10-24 16:42:51 +0100
commit2f1a5d1694c4b59ea94115ed4e9577c5bb826c26 (patch)
treedcb1482044f7b4836ba9ce637e43af1e8be810f5
parent070c23325af4526c9a8532a60d63522c58d5554b (diff)
Fix undeclared variable warnings.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
-rw-r--r--crypto/bn/Makefile4
-rw-r--r--crypto/bn/bn_dh.c1
-rw-r--r--crypto/dh/Makefile4
-rw-r--r--crypto/dh/dh_rfc5114.c4
-rw-r--r--crypto/engine/Makefile15
-rw-r--r--crypto/evp/Makefile1
-rw-r--r--crypto/include/internal/bn_dh.h8
-rw-r--r--test/Makefile6
8 files changed, 24 insertions, 19 deletions
diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile
index 5d05e1b093..2ca62a8da7 100644
--- a/crypto/bn/Makefile
+++ b/crypto/bn/Makefile
@@ -224,8 +224,8 @@ bn_dh.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
bn_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
bn_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
bn_dh.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-bn_dh.o: ../../include/openssl/symhacks.h ../include/internal/bn_int.h bn_dh.c
-bn_dh.o: bn_lcl.h
+bn_dh.o: ../../include/openssl/symhacks.h ../include/internal/bn_dh.h
+bn_dh.o: ../include/internal/bn_int.h bn_dh.c bn_lcl.h
bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
diff --git a/crypto/bn/bn_dh.c b/crypto/bn/bn_dh.c
index 5572a2de2b..ad4a16eabe 100644
--- a/crypto/bn/bn_dh.c
+++ b/crypto/bn/bn_dh.c
@@ -61,6 +61,7 @@
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
+#include "internal/bn_dh.h"
/* DH parameters from RFC5114 */
# if BN_BITS2 == 64
diff --git a/crypto/dh/Makefile b/crypto/dh/Makefile
index 655bca0d45..6beeceff57 100644
--- a/crypto/dh/Makefile
+++ b/crypto/dh/Makefile
@@ -189,5 +189,5 @@ dh_rfc5114.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dh_rfc5114.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
dh_rfc5114.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
dh_rfc5114.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-dh_rfc5114.o: ../../include/openssl/symhacks.h ../include/internal/cryptlib.h
-dh_rfc5114.o: dh_rfc5114.c
+dh_rfc5114.o: ../../include/openssl/symhacks.h ../include/internal/bn_dh.h
+dh_rfc5114.o: ../include/internal/cryptlib.h dh_rfc5114.c
diff --git a/crypto/dh/dh_rfc5114.c b/crypto/dh/dh_rfc5114.c
index 8819ac087b..da998f574f 100644
--- a/crypto/dh/dh_rfc5114.c
+++ b/crypto/dh/dh_rfc5114.c
@@ -60,6 +60,7 @@
#include "internal/cryptlib.h"
#include <openssl/dh.h>
#include <openssl/bn.h>
+#include "internal/bn_dh.h"
/*
* Macro to make a DH structure from BIGNUM data. NB: although just copying
@@ -68,9 +69,6 @@
*/
#define make_dh(x) \
-\
-extern const BIGNUM _bignum_dh##x##_p, _bignum_dh##x##_g, _bignum_dh##x##_q; \
-\
DH *DH_get_##x(void) \
{ \
DH *dh = DH_new(); \
diff --git a/crypto/engine/Makefile b/crypto/engine/Makefile
index 532faddb99..dae2926746 100644
--- a/crypto/engine/Makefile
+++ b/crypto/engine/Makefile
@@ -100,19 +100,20 @@ eng_cnf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
eng_cnf.o: ../include/internal/cryptlib.h eng_cnf.c eng_int.h
eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
+eng_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
-eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
-eng_cryptodev.o: ../../include/openssl/obj_mac.h
+eng_cryptodev.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+eng_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
eng_cryptodev.o: ../../include/openssl/objects.h
eng_cryptodev.o: ../../include/openssl/opensslconf.h
eng_cryptodev.o: ../../include/openssl/opensslv.h
eng_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
-eng_cryptodev.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-eng_cryptodev.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-eng_cryptodev.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
-eng_cryptodev.o: eng_cryptodev.c
+eng_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
+eng_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
+eng_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
+eng_cryptodev.o: ../../include/openssl/x509_vfy.h eng_cryptodev.c
eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h
eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
diff --git a/crypto/evp/Makefile b/crypto/evp/Makefile
index 1a65b46893..a175d0bde1 100644
--- a/crypto/evp/Makefile
+++ b/crypto/evp/Makefile
@@ -290,7 +290,6 @@ e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
e_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
e_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
e_null.o: ../include/internal/cryptlib.h e_null.c
-e_old.o: e_old.c
e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
diff --git a/crypto/include/internal/bn_dh.h b/crypto/include/internal/bn_dh.h
new file mode 100644
index 0000000000..3810514eef
--- /dev/null
+++ b/crypto/include/internal/bn_dh.h
@@ -0,0 +1,8 @@
+#define declare_dh_bn(x) \
+ const extern BIGNUM _bignum_dh##x##_p; \
+ const extern BIGNUM _bignum_dh##x##_g; \
+ const extern BIGNUM _bignum_dh##x##_q;
+
+declare_dh_bn(1024_160)
+declare_dh_bn(2048_224)
+declare_dh_bn(2048_256)
diff --git a/test/Makefile b/test/Makefile
index 6f32758074..e9386335f5 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -416,8 +416,7 @@ clienthellotest.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
clienthellotest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
clienthellotest.o: clienthellotest.c
constant_time_test.o: ../e_os.h ../include/internal/constant_time_locl.h
-constant_time_test.o: ../include/openssl/e_os2.h
-constant_time_test.o: ../include/openssl/opensslconf.h constant_time_test.c
+constant_time_test.o: constant_time_test.c
destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h
destest.o: ../include/openssl/opensslconf.h destest.c
dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
@@ -682,8 +681,7 @@ ssltest.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
ssltest.o: ../include/openssl/x509v3.h ../ssl/packet_locl.h
ssltest.o: ../ssl/record/record.h ../ssl/ssl_locl.h ssltest.c
-testutil.o: ../e_os.h ../include/openssl/e_os2.h
-testutil.o: ../include/openssl/opensslconf.h testutil.c testutil.h
+testutil.o: ../e_os.h testutil.c testutil.h
v3nametest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
v3nametest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
v3nametest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h