use Curl_strcasestr() when checking wildcard cert names
This commit is contained in:
parent
61bded1d82
commit
be72eaa327
@ -45,6 +45,7 @@
|
|||||||
#include "inet_pton.h"
|
#include "inet_pton.h"
|
||||||
#include "ssluse.h"
|
#include "ssluse.h"
|
||||||
#include "connect.h" /* Curl_ourerrno() proto */
|
#include "connect.h" /* Curl_ourerrno() proto */
|
||||||
|
#include "strequal.h"
|
||||||
|
|
||||||
#ifdef USE_SSLEAY
|
#ifdef USE_SSLEAY
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
@ -754,8 +755,8 @@ cert_hostcheck(const char *certname, const char *hostname)
|
|||||||
if(!strchr(certdomain+1, '.'))
|
if(!strchr(certdomain+1, '.'))
|
||||||
return 0; /* the certificate must have at least another dot in its name */
|
return 0; /* the certificate must have at least another dot in its name */
|
||||||
|
|
||||||
/* find 'certdomain' within 'hostname' */
|
/* find 'certdomain' within 'hostname', case insensitive */
|
||||||
tmp = strstr(hostname, certdomain);
|
tmp = Curl_strcasestr(hostname, certdomain);
|
||||||
if(tmp) {
|
if(tmp) {
|
||||||
/* ok the certname's domain matches the hostname, let's check that it's a
|
/* ok the certname's domain matches the hostname, let's check that it's a
|
||||||
tail-match */
|
tail-match */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user