macro redefined: OPENSSL_free

macro redefined: OPENSSL_free

am 02.11.2004 09:18:29 von Hans Werner Strube

When compiling modssl (at least 2.8.17 to 2.8.22, have overlooked this
earlier), there are many warnings:
"./ssl_util_ssl.h", line 90: warning: macro redefined: OPENSSL_free
My openssl version is 0.9.6m (the latest 0.9.6 release), defining
in opensslv.h and crypto.h, respectively:
#define OPENSSL_VERSION_NUMBER 0x009060dfL
#define OPENSSL_free(addr) CRYPTO_free(addr)

Thus, since 0x009060df < 0x00906100, modssl uses free() instead of
CRYPTO_free(). Is this really intended?
Otherwise the SSL_LIBRARY_VERSION test in ssl_util_ssl.h, line 89, should
use a smaller number than 0x00906100. AfaIk the macro OPENSSL_free was
already introduced on the transition from 0.9.5 to 0.9.6.
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

Re: macro redefined: OPENSSL_free

am 07.11.2004 11:49:29 von rse

On Tue, Nov 02, 2004, Hans Werner Strube wrote:

> When compiling modssl (at least 2.8.17 to 2.8.22, have overlooked this
> earlier), there are many warnings:
> "./ssl_util_ssl.h", line 90: warning: macro redefined: OPENSSL_free
> My openssl version is 0.9.6m (the latest 0.9.6 release), defining
> in opensslv.h and crypto.h, respectively:
> #define OPENSSL_VERSION_NUMBER 0x009060dfL
> #define OPENSSL_free(addr) CRYPTO_free(addr)
>
> Thus, since 0x009060df < 0x00906100, modssl uses free() instead of
> CRYPTO_free(). Is this really intended?
> Otherwise the SSL_LIBRARY_VERSION test in ssl_util_ssl.h, line 89, should
> use a smaller number than 0x00906100. AfaIk the macro OPENSSL_free was
> already introduced on the transition from 0.9.5 to 0.9.6.

Hmmm... yes, the problem was that between 0.9.5 and 0.9.6 the encoding
of OPENSSL_VERSION_NUMBER changed and it seems I adjusted the definition
in ssl_util_ssl.h without recognizing this. I'll use the following now:

-#if SSL_LIBRARY_VERSION < 0x00906100
+#if SSL_LIBRARY_VERSION < 0x00906000

Thanks for the hint.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com

____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org