./config shared no-deprecated

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

./config shared no-deprecated

Michael Bell
Hi,

I tried the following with 0.9.8:

./config shared no-deprecated
make depend
make

The result is the following:

gcc -I../crypto -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mcpu=pentium -DL_ENDIAN
-DTERMIO -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM   -c -o
d1_srvr.o d1_srvr.c
d1_srvr.c: In function `dtls1_send_server_hello':
d1_srvr.c:708: warning: comparison between signed and unsigned
d1_srvr.c: In function `dtls1_send_server_key_exchange':
d1_srvr.c:850: warning: implicit declaration of function `DH_free'
d1_srvr.c:855: warning: implicit declaration of function `DHparams_dup'
d1_srvr.c:855: warning: assignment makes pointer from integer without a cast
d1_srvr.c:862: error: dereferencing pointer to incomplete type
d1_srvr.c:863: error: dereferencing pointer to incomplete type
d1_srvr.c:866: warning: implicit declaration of function `DH_generate_key'
d1_srvr.c:875: error: dereferencing pointer to incomplete type
d1_srvr.c:875: error: dereferencing pointer to incomplete type
d1_srvr.c:876: error: dereferencing pointer to incomplete type
d1_srvr.c:876: error: dereferencing pointer to incomplete type
d1_srvr.c:877: error: dereferencing pointer to incomplete type
d1_srvr.c:878: error: dereferencing pointer to incomplete type
d1_srvr.c:884: error: dereferencing pointer to incomplete type
d1_srvr.c:885: error: dereferencing pointer to incomplete type
d1_srvr.c:886: error: dereferencing pointer to incomplete type
make[1]: *** [d1_srvr.o] Fehler 1
make[1]: Leaving directory `/home/michael/openssl/openssl-0.9.8/ssl'
make: *** [build_ssl] Fehler 1

I checked ssl/d1_srvr.c and ssl/d1_clnt.c. Both files have trouble with
type DH. I included openssl/dh.h in both files after md5.h. After this
the compilation works for ssl/ and breaks in apps. req.c was missing
bn.h, rsa.h and dsa.h. s_server.c was missing rsa.h and dh.h.

Finally apps/prime.c breaks because it uses a deprected API function. I
simply used the new function and removed one NULL. Next trouble comes
from (test|crypto/dsa)/dsatest.c where bn.h was missing.

It looks for me like I made a major mistake or the header file inclusion
was to lazy like the CHANGES file warns.

The following works for me:

tar -xzf openssl-0.9.8.tar.gz
cd openssl-0.9.8
patch -p1 < ../no_deprecated.diff
./config shared no-deprecated
make depend
make
make test
make install

I hope the patch helps to understand my problem.

Michael
--
_______________________________________________________________

Michael Bell                    Humboldt-Universitaet zu Berlin

Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 2704       Unter den Linden 6
[hidden email]   D-10099 Berlin
_______________________________________________________________

diff -ru openssl-0.9.8/apps/prime.c openssl-0.9.8-patched/apps/prime.c
--- openssl-0.9.8/apps/prime.c 2005-05-01 15:49:56.000000000 +0200
+++ openssl-0.9.8-patched/apps/prime.c 2005-07-12 15:53:24.000000000 +0200
@@ -52,7 +52,6 @@
 #include "apps.h"
 #include <openssl/bn.h>
 
-
 #undef PROG
 #define PROG prime_main
 
@@ -115,7 +114,7 @@
 
     BN_print(bio_out,bn);
     BIO_printf(bio_out," is %sprime\n",
-       BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
+       BN_is_prime_ex(bn,checks,NULL,NULL) ? "" : "not ");
 
     BN_free(bn);
     BIO_free_all(bio_out);
diff -ru openssl-0.9.8/apps/req.c openssl-0.9.8-patched/apps/req.c
--- openssl-0.9.8/apps/req.c 2005-05-17 02:08:26.000000000 +0200
+++ openssl-0.9.8-patched/apps/req.c 2005-07-12 15:42:27.000000000 +0200
@@ -79,6 +79,9 @@
 #include <openssl/x509v3.h>
 #include <openssl/objects.h>
 #include <openssl/pem.h>
+#include <openssl/bn.h>
+#include <openssl/dsa.h>
+#include <openssl/rsa.h>
 
 #define SECTION "req"
 
diff -ru openssl-0.9.8/apps/s_server.c openssl-0.9.8-patched/apps/s_server.c
--- openssl-0.9.8/apps/s_server.c 2005-05-31 00:37:41.000000000 +0200
+++ openssl-0.9.8-patched/apps/s_server.c 2005-07-12 15:43:49.000000000 +0200
@@ -153,6 +153,8 @@
 #include <openssl/x509.h>
 #include <openssl/ssl.h>
 #include <openssl/rand.h>
+#include <openssl/dh.h>
+#include <openssl/rsa.h>
 #include "s_apps.h"
 #include "timeouts.h"
 
diff -ru openssl-0.9.8/crypto/dsa/dsatest.c openssl-0.9.8-patched/crypto/dsa/dsatest.c
--- openssl-0.9.8/crypto/dsa/dsatest.c 2005-05-16 03:43:31.000000000 +0200
+++ openssl-0.9.8-patched/crypto/dsa/dsatest.c 2005-07-12 15:55:31.000000000 +0200
@@ -74,6 +74,7 @@
 #include <openssl/rand.h>
 #include <openssl/bio.h>
 #include <openssl/err.h>
+#include <openssl/bn.h>
 
 #ifdef OPENSSL_NO_DSA
 int main(int argc, char *argv[])
diff -ru openssl-0.9.8/ssl/d1_clnt.c openssl-0.9.8-patched/ssl/d1_clnt.c
--- openssl-0.9.8/ssl/d1_clnt.c 2005-05-23 02:32:55.000000000 +0200
+++ openssl-0.9.8-patched/ssl/d1_clnt.c 2005-07-12 15:39:11.000000000 +0200
@@ -121,6 +121,7 @@
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/md5.h>
+#include <openssl/dh.h>
 
 static SSL_METHOD *dtls1_get_client_method(int ver);
 static int dtls1_get_hello_verify(SSL *s);
diff -ru openssl-0.9.8/ssl/d1_srvr.c openssl-0.9.8-patched/ssl/d1_srvr.c
--- openssl-0.9.8/ssl/d1_srvr.c 2005-06-02 19:26:17.000000000 +0200
+++ openssl-0.9.8-patched/ssl/d1_srvr.c 2005-07-12 15:38:36.000000000 +0200
@@ -121,6 +121,7 @@
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/md5.h>
+#include <openssl/dh.h>
 
 static SSL_METHOD *dtls1_get_server_method(int ver);
 static int dtls1_send_hello_verify_request(SSL *s);

smime.p7s (11K) Download Attachment