[PATCH] AnyEvent::Handle: avoid use of Net::SSLeay::ST_OK() in _dotls()
Marc Lehmann
schmorp at schmorp.de
Mon Sep 3 17:04:23 CEST 2018
On Sat, Sep 01, 2018 at 02:26:52AM +0100, Chris Novakovic <chris at chrisn.me.uk> wrote:
> ST_OK() is mapped to the SSL_ST_OK constant in OpenSSL, but this
> constant was removed in OpenSSL 1.1.0 [1], and will therefore be
> undefined (and trigger a crash) if OpenSSL 1.1.0 or above is being used.
This is a known bug in the Net::SSLeay module - the constant hasn't been
removed, it is now an enum (and actually has been renamed TLS_ST_OK, but
the perl name would be the name after stripping off SSL_/TLS_ as with
other constants).
This has happened to a lot of constants in openssl 1.1, and unfortunately,
Net::SSLeay has never been updated for this version, so it misses a lot of
constants because it tests for most of them with #ifdef.
The best recourse at the moment is to compile it against openssl 1.0,
until a version is available that has been properly ported to openssl 1.1.
> This was reported by Michael Loeffler on rt.cpan.org [5], which I know
> isn't used by AnyEvent, but I thought I'd CC him so he's aware of the
> fix and can close that ticket himself if this patch is accepted.
The right fix is not to make AnyEvent incompatible with the vast majority
of Net::SSLeay versions that are actually in production, but to either
compile Net::SSLeay with an openssl version it supports (1.0) or port it
to 1.1.
Frankly, I am surprised that it still hasn't been fixed, but it seems to
be very badly maintained, and maybe tgivign the maintainers another nudge
to show that there is actual interest in getting it to work with 1.1 might
be a good idea?
In any case, there is little that cna be done in AnyEvent, and nothing
that should be done in AnyEvent. Porting Net::SSLeay properly to openssl
1.1 is the right approach, and will certainly help a lot of other code
that uses it and suffers form similar problems.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list