Hello,
I just patched libcurl to correctly report newer versions of OpenSSL 0.9.8,
starting from openssl-0.9.8za.
With my patch, curl --version reports:
curl 7.37.1 (i386-pc-win32) libcurl/7.37.1 OpenSSL/0.9.8zb zlib/1.2.1
libssh2/1.4.3
Without the patch, curl --version reports
curl 7.37.1 (i386-pc-win32) libcurl/7.37.1 OpenSSL/0.9.8{ zlib/1.2.1
libssh2/1.4.3
I know this is a cosmetic, very small change, but please take a look and
consider including it to the main source. Thank you for such a great library.--- lib/vtls/openssl.c-old Wed Jun 11 16:58:27 2014
+++ lib/vtls/openssl.c Tue Aug 12 17:51:24 2014
@@ -2813,8 +2813,10 @@
#if(SSLEAY_VERSION_NUMBER >= 0x905000)
{
- char sub[2];
+ char sub[3];
unsigned long ssleay_value;
+ int minor;
+ sub[2]='\0';
sub[1]='\0';
ssleay_value=SSLeay();
if(ssleay_value < 0x906000) {
@@ -2823,7 +2825,13 @@
}
else {
if(ssleay_value&0xff0) {
- sub[0]=(char)(((ssleay_value>>4)&0xff) + 'a' -1);
+ minor = (ssleay_value >> 4) & 0xff;
+ if (minor > 26) { /* handle extended version introduced for 0.9.8za */
+ sub[1] = (char) ((minor - 1) % 26 + 'a' + 1);
+ sub[0] = 'z';
+ } else {
+ sub[0]=(char)(((ssleay_value>>4)&0xff) + 'a' -1);
+ }
}
else
sub[0]='\0';
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html