Subject: | Linking against OpenSSL 1.1.1 fails due to obsolete RSA_generate_key_ex in openssl |
Compiling Net-SSLeay against the latest perl-5.28 with openssl-1.1 using gcc-7.3.0 fails with a relocation error due to a missing symbol for RSA_generate_key_ex. This function does not seem to exist anymore. The new equivalent is named RSA_generate_key_ex.
In SSLeay.xs there is a function that uses this RSA_generate_key_ex but the preprocessor directive only uses it on ANDROID.
Is it possible to you to change the code to be compliant?
Or:
Which preprocessor directive would you use (maybe version check for openssl > =1.1.x)?
How would this look like?
Maybe see below line 5747 in SSLeay.xs:
#if defined(ANDROID) || OPENSSL_VERSION_NUMBER >= 0x1010000L
RSA *
RSA_generate_key(bits,ee,perl_cb=&PL_sv_undef,perl_data=&PL_sv_undef)
int bits
unsigned long ee
SV* perl_cb
SV* perl_data
PREINIT:
simple_cb_data_t* c
...
Is the OPENSSL_VERSION_NUMBER_CHECK correct? I am not that good with those hex stuff.
Maybe I could then provide a working pull request...