Fix nginx for build with any version of openssl.

Maxim Dounin mdounin at mdounin.ru
Tue Jan 11 04:55:42 MSK 2011


Hello!

On Tue, Jan 11, 2011 at 04:10:01AM +0300, Kirill A. Korinskiy wrote:

> On Tue, Jan 11, 2011 at 03:10, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 
> > Hello!
> >
> > On Mon, Jan 10, 2011 at 11:45:26PM +0300, Kirill A. Korinskiy wrote:
> >
> > > Fix nginx for build with any version of openssl.
> > >
> > > Format of openssl version is MNNFFPPS: major minor fix patch status
> > > The status nibble has one of the values 0 for development, 1 to e for
> > betas
> > > 1 to 14, and f for release.  The patch level is exactly that.
> >
> > Missing part in your patch comment is when the interface change in
> > question ("const" qualifier in SSL_get_current_cipher()'s return
> > type and other places) was introduced.
> >
> > It was introduced here:
> >
> > http://cvs.openssl.org/chngview?cn=17503
> > 2008-Oct-12 14:32:38 (UTC)
> >
> > at that time version in openssl's HEAD was 0x00909000L, and it was
> > bumped to 0x10000000L here:
> >
> > http://cvs.openssl.org/chngview?cn=17927
> > 2009-Mar-28 17:12:50 (UTC)
> >
> > There were no version bump for the interface change in question,
> > so you really can't make nginx buildable with *any* version with
> > this aproach.  Though checking for 0x10000000L is indeed ok, it
> > will make nginx buildable with openssl 1.0.0-beta[12345] without
> > breaking anything.
> >
> 
> But any way I see one way: start use version of 0x009080a0L (it's a first
> release after interface change). Yes this is do broken build with version
> after revison 17503 and before 0.9.8f.

The interface change in question was never merged into 0.9.8 
branch.  And I assume it won't be ever merged as this is a 
library interface change, not a bugfix.

> Update patches attached.

This patch is just wrong.

Maxim Dounin

p.s. The aproach which will work for all versions is explicit 
typecast to discard const qualifier.  I don't think it's better 
aproach though.



More information about the nginx-devel mailing list