Fix undeclared variable warnings.
authorBen Laurie <ben@links.org>
Sat, 3 Oct 2015 15:43:21 +0000 (16:43 +0100)
committerBen Laurie <ben@links.org>
Sat, 24 Oct 2015 15:42:51 +0000 (16:42 +0100)
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
crypto/bn/Makefile
crypto/bn/bn_dh.c
crypto/dh/Makefile
crypto/dh/dh_rfc5114.c
crypto/engine/Makefile
crypto/evp/Makefile
crypto/include/internal/bn_dh.h [new file with mode: 0644]
test/Makefile

index 5d05e1b..2ca62a8 100644 (file)
@@ -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
index 5572a2d..ad4a16e 100644 (file)
@@ -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
index 655bca0..6beecef 100644 (file)
@@ -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
index 8819ac0..da998f5 100644 (file)
@@ -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(); \
index 532fadd..dae2926 100644 (file)
@@ -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
index 1a65b46..a175d0b 100644 (file)
@@ -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 (file)
index 0000000..3810514
--- /dev/null
@@ -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)
index 6f32758..e938633 100644 (file)
@@ -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