aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2014-08-19 06:17:59 +0000
committerVincent Richard <[email protected]>2014-08-19 06:17:59 +0000
commit674c3697f932cb5a2db6d3effc32baba0cb967ff (patch)
tree16b29a46c5535f605e98e170802fd19ac8cc251c
parentBuild intermediate library for test runner and utils to speed up build. (diff)
downloadvmime-674c3697f932cb5a2db6d3effc32baba0cb967ff.tar.gz
vmime-674c3697f932cb5a2db6d3effc32baba0cb967ff.zip
Fixed hostname matching for OpenSSL (thanks to ElmüSoft).
-rw-r--r--src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp b/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp
index 70ff50c0..d8d68526 100644
--- a/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp
+++ b/src/vmime/security/cert/openssl/X509Certificate_OpenSSL.cpp
@@ -416,10 +416,10 @@ bool X509Certificate_OpenSSL::verifyHostName
CONF_VALUE* cnf = sk_CONF_VALUE_value(val, j);
if ((strcasecmp(cnf->name, "DNS") == 0 &&
- strcasecmp(cnf->value, hostname.c_str()) == 0)
- ||
- (strncasecmp(cnf->name, "IP", 2) == 0 &&
- strcasecmp(cnf->value, hostname.c_str()) == 0))
+ cnMatch(cnf->value, hostname.c_str()))
+ ||
+ (strncasecmp(cnf->name, "IP", 2) == 0 &&
+ cnMatch(cnf->value, hostname.c_str())))
{
return true;
}