#4 fix build with openssl-0.9.8

open
nobody
None
5
2006-01-18
2006-01-18
Sergey Skvortsov
No

In openssl-0.9.8 header <openssl/evp.h> does not
contains include of <openssl/md5.h>.

--- ssldecode.c.orig Sat Aug 17 05:33:17 2002
+++ ssldecode.c Wed Jan 18 15:06:26 2006
@@ -50,6 +50,7 @@
#ifdef OPENSSL
#include <openssl/ssl.h>
#include <openssl/hmac.h>
+#include <openssl/md5.h>
#include <openssl/evp.h>
#include <openssl/x509v3.h>
#endif

Discussion

  • Logged In: NO

    Missing OpenSSL init too, see bug:
    http://sourceforge.net/tracker/index.php?func=detail&aid=1284378&group_id=68993&atid=523055

    Index: ssl/ssldecode.c

    RCS file: /cvsroot/ssldump/ssldump/ssl/ssldecode.c,v
    retrieving revision 1.2
    diff -u -r1.2 ssldecode.c
    --- ssl/ssldecode.c 21 Dec 2006 19:23:11 -0000 1.2
    +++ ssl/ssldecode.c 22 Jan 2007 20:48:31 -0000
    @@ -52,6 +52,7 @@
    #include <openssl/hmac.h>
    #include <openssl/evp.h>
    #include <openssl/x509v3.h>
    +#include <openssl/md5.h>
    #endif
    #include "ssldecode.h"
    #include "ssl_rec.h"
    @@ -131,7 +132,8 @@
    ssl_decode_ctx *d=0;
    int r,_status;

    - SSLeay_add_all_algorithms();
    + SSL_library_init();
    + OpenSSL_add_all_algorithms();
    if(!(d=(ssl_decode_ctx *)malloc(sizeof(ssl_decode_ctx))))
    ABORT(R_NO_MEMORY);
    if(!(d->ssl_ctx=SSL_CTX_new(SSLv23_server_method())))