Subject: | Code portability |
Code does not compile with cl and openssl-1.1.0e:
SSLeay.xs(858) : error C2275: 'STRLEN' : illegal use of this type as an expression
Patch in attachement.
Subject: | SSLeay.xs.diff |
diff -Naur Net-SSLeay-1.81.old/SSLeay.xs Net-SSLeay-1.81.new/SSLeay.xs
--- Net-SSLeay-1.81.old/SSLeay.xs 2017-03-04 05:25:15.000000000 +0100
+++ Net-SSLeay-1.81.new/SSLeay.xs 2017-04-12 12:57:08.743941000 +0200
@@ -854,10 +854,12 @@
*cipher = sk_SSL_CIPHER_value(peer_ciphers, SvIV(pref_cipher));
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
- /* Use any new master secret set by the callback function in secret */
- STRLEN newsecretlen;
- char* newsecretdata = SvPV(secretsv, newsecretlen);
- memcpy(secret, newsecretdata, newsecretlen);
+ {
+ /* Use any new master secret set by the callback function in secret */
+ STRLEN newsecretlen;
+ char* newsecretdata = SvPV(secretsv, newsecretlen);
+ memcpy(secret, newsecretdata, newsecretlen);
+ }
#endif
}