OPENSSL_VERSION_NUMBER (Was: Cyrus SASL 2.1.10 Released)

Peter 'Luna' Runestig peter+cyrus at
Tue Dec 10 03:21:27 EST 2002

Ken Murchison wrote:
> OK.  I now have two conflicting reports regarding testing for
> OPENSSL_VERSION_NUMBER with OpenSSL 0.9.7 (both quoted below).  Could
> somebody who has 0.9.7 installed please try to figure out what the deal
> is?  I tend to believe that I was originally correct in including the
> check,

Back to my original question then: why? Why treat OpenSSL version 0.9.7 
and above different than the previous versions? Is there any change in 
the MD5 code between those versions (I don't think so, not anything that 
affects this issue anyway)?

Anyway, here's what happens to me, if 'MD5_H' isn't defined:

$ ./configure --with-openssl=/usr/local
[tweak the Makefiles to make Kerberos somewhat compile (RH 7.2)]
[snip a lot of other output]
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. 
-I/usr/kerberos/include -I/usr/kerberos/include/kerberosIV -I../include 
-I../lib -I../sasldb  -I/usr/local/include -I/usr/local/include  -Wall 
-W -Wall -g -O2 -c otp.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kerberos/include 
-I/usr/kerberos/include/kerberosIV -I../include -I../lib -I../sasldb 
-I/usr/local/include -I/usr/local/include -Wall -W -Wall -g -O2 -c otp.c 
  -fPIC -DPIC -o otp.lo
In file included from ../include/saslplug.h:11,
                  from otp.c:60:
../include/md5.h:30: conflicting types for `MD5_CTX'
/usr/local/include/openssl/md5.h:103: previous declaration of `MD5_CTX'
make[2]: *** [otp.lo] Error 1

Yes, the name 'MD5_CTX' is used in both OpenSSL and SASL "native" MD5, 
so that clash was sure to come.

> and I'm confused as to why it doesn't work for Peter using the
> same release as Hack.

So am I! But I have another remark further down here:

> Ken
> Hack Kampbjorn wrote:
>> More problems: with cyrus-sasl version 2.1.9 plugins/otp.c only defined
>> MD5_H for OpenSSL versions < 0.9.7 but in version 2.1.10 the check is
>> removed. OpenBSD 3.2 ships with OpenSSL 0.9.7-beta3 30 Jul 2000
>> (0x00907003L) and fails with this error:
>> /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I.
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/plugins
>> -I..
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/include
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/lib
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/sasldb
>>   -I/usr/local/include -I/usr/include/kerberosIV
>> -I/usr/include/kerberosV -I/usr/include  -Wall -W -Wall -O2
>> -I/usr/include/kerberosV -c
>> /usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/plugins/otp.c
>> rm -f .libs/otp.lo
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/plugins
>> -I..
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/include
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/lib
>> -I/usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/sasldb
>> -I/usr/local/include -I/usr/include/kerberosIV -I/usr/include/kerberosV
>> -I/usr/include -Wall -W -Wall -O2 -I/usr/include/kerberosV -c
>> /usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/plugins/otp.c
>>   -fPIC -DPIC -o .libs/otp.lo
>> /usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/plugins/otp.c:59:
>> invalid preprocessing directive name
What kind of an error is that? Is the macro 'MD5_H' used elswhere in 
OpenBSD? Unfortunately, I don't have a OBSD 3.2 around to test on...

>> /usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/cyrus-sasl-2.1.10/plugins/otp.c:61:
>> invalid preprocessing directive name
>> *** Error code 1
>> Stop in
>> /usr/ports/security/cyrus-sasl2/w-cyrus-sasl-2.1.10/build-i386/plugins.
>> Adding the version check back fixes this problem.
>> --- plugins/otp.c.orig  Tue Dec 10 01:33:54 2002
>> +++ plugins/otp.c       Tue Dec 10 01:39:44 2002
>> @@ -56,7 +56,9 @@
>>   #include <openssl/evp.h>
>>   #include <sasl.h>
>> +#if OPENSSL_VERSION_NUMBER < 0x00907000L
>>   #define MD5_H  /* suppress internal MD5 */
>> +#endif
>>   #include <saslplug.h>
>>   #include "plugin_common.h"
> Peter 'Luna' Runestig wrote:
>> Hi all!
>> What's the deal with this part in plugins/otp.c (2.1.8):
>> #if OPENSSL_VERSION_NUMBER < 0x00907000L
>> #define MD5_H  /* suppress internal MD5 */
>> #endif
>> As it stands, the code doesn't compile with openssl-0.9.7-beta3 (if I
>> remove the version check, it does). Do you expect MD5 support to be
>> dropped in future versions of openssl, or what?

- Peter
Peter 'Luna' Runestig (fd. Altberg), Sweden <peter at>
PGP Key ID: 0xD07BBE13
Fingerprint: 7B5C 1F48 2997 C061 DE4B  42EA CB99 A35C D07B BE13
AOL Instant Messenger Screen name: PRunestig

More information about the Info-cyrus mailing list