Subject: Bugfix for compiling mod_ssl-2.4.10-1.3.9 against openssl-0.9.6g.

From: raymond <[email-masked]>
Date: Fri, 15 Nov 2002 02:28:59 +0000

I had trouble thismorning compiling mod_ssl-2.4.10-1.3.9 against 
openssl-0.9.6g.  The problem was well documented in the following two posts 
on your archives.  

http://www.mail-archive.com/[email-masked]/msg15050.html
http://www.mail-archive.com/[email-masked]/msg09673.html

I didn't find the answer there, but I did find the answer in the latest rev's 
source code and wanted to share it somewhere publically accessable.

Here is a snip of compiler barf for google to index:

-DSSL_COMPAT -I/export/developers/rmb/open_ssl/src/openssl-0.9.6/include 
-DMOD_SSL_VERSION=\"2.4.10\" ssl_util_ssl.c && mv ssl_util_ssl.o 
ssl_util_ssl.lo
ssl_util_ssl.c:145: conflicting types for `d2i_PrivateKey_bio'
/export/developers/rmb/open_ssl/src/openssl-0.9.6/include/openssl/x509.h:779: 
previous declaration of `d2i_PrivateKey_bio'

This fix lies in modifying pkg.modssl/ssl_util_ssl.c like so:

/* OLD BROKEN CODE
**static EVP_PKEY *d2i_PrivateKey_bio(BIO *bio, EVP_PKEY *key)
**{
**     return ((EVP_PKEY *)ASN1_d2i_bio(
**             (char *(*)())EVP_PKEY_new,
**             (char *(*)())d2i_PrivateKey,
**             (bio), (unsigned char **)(key)));
**}
*/
/*NEW CHEERY BRIGHT CODE*/
#if SSL_LIBRARY_VERSION <= 0x00904100
static EVP_PKEY *d2i_PrivateKey_bio(BIO *bio, EVP_PKEY **key)
{
     return ((EVP_PKEY *)ASN1_d2i_bio(
             (char *(*)())EVP_PKEY_new,
             (char *(*)())d2i_PrivateKey,
             (bio), (unsigned char **)(key)));
}
#endif

Cheers,

-Ray Ferguson.
-- 
ONLY the STRONG SURVIVE...all those DOWNWIND PASSOUT !!!!
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]