cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-454858 ] ssluse.c uses strcasecmp

From: <noreply_at_sourceforge.net>
Date: Thu, 23 Aug 2001 21:53:23 -0700

Bugs item #454858, was opened at 2001-08-23 21:53
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=454858&group_id=976

Category: https
Group: portability problem
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: ssluse.c uses strcasecmp

Initial Comment:
Hi,

The Win32 SSL build fails using Makefile.vc6, because
of an unresolved external symbol in lib\ssluse.c.
Digging a bit deeper, it seems as if the function
strequal() has been designed to be platform
independent, and use a case-insensitive comparison.

The version of curl I am looking at is: curl 7.8.1
(win32) libcurl 7.8.1 (OpenSSL 0.9.6b).

I've included a patch inline that replaces the call to
strcasecmp with a call to strequal.

Hope this helps.

Regards,
Tim Costello

--- lib/ssluse.c.orig Tue Aug 14 18:36:30 2001
+++ lib/ssluse.c Fri Aug 24 14:41:48 2001
@@ -407,7 +407,7 @@
       return CURLE_SSL_PEER_CERTIFICATE;
     }
 
- if (strcasecmp(peer_CN, conn->hostname) != 0) {
+ if (!strequal(peer_CN, conn->hostname)) {
       if (data->ssl.verifyhost > 1) {
         failf(data, "SSL: certificate subject name '%
s' does not match target host name '%s'",
             peer_CN, conn->hostname);

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=454858&group_id=976
Received on 2001-08-24