Recent openssl is required for OPENSSL_free [Re: Please test snapshots for 3.0 release] (fwd)

Pekka Savola pekkas at netcore.fi
Thu Nov 1 01:06:16 EST 2001


On Wed, 31 Oct 2001, Damien Miller wrote:
> On Tue, 30 Oct 2001, Lutz Jaenicke wrote:
> 
> > Hmm, while thinking about it: the correct macro substution should therefore
> > be "Free()" instead of "free()", as we must make sure that the correct
> > memory handling function (CRYPTO_free()) is being called:
> 
> That is (as the OpenSSL developers discovered) a namespace collision 
> waiting to happen. Can people try this patch?

I put this on latest CVS, rebuilt the new RPM with
contrib/redhat/openssh.spec and installed it on my RHL62 system w/ OpenSSL
0.9.5a; seems to work fine.


> Index: defines.h
> ===================================================================
> RCS file: /var/cvs/openssh/defines.h,v
> retrieving revision 1.74
> diff -u -r1.74 defines.h
> --- defines.h	2001/10/30 02:50:40	1.74
> +++ defines.h	2001/10/30 23:35:22
> @@ -45,6 +45,7 @@
>  #include <unistd.h> /* For STDIN_FILENO, etc */
>  #include <termios.h> /* Struct winsize */
>  #include <fcntl.h> /* For O_NONBLOCK */
> +#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
>  
>  /* *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively */
>  #ifdef HAVE_STRINGS_H
> @@ -448,6 +449,11 @@
>  
>  #ifndef GETPGRP_VOID
>  # define getpgrp() getpgrp(0)
> +#endif
> +
> +/* OPENSSL_free() is only available in OpenSSL 0.9.6 onwards */
> +#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x0090600f)
> +# define OPENSSL_free(x) Free(x)
>  #endif
>  
>  /*
> 
> 
> 

-- 
Pekka Savola                 "Tell me of difficulties surmounted,
Netcore Oy                   not those you stumble over and fall"
Systems. Networks. Security.  -- Robert Jordan: A Crown of Swords




More information about the openssh-unix-dev mailing list