summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_openssl.c
diff options
context:
space:
mode:
authorMichael Steinert <mike.steinert@gmail.com>2014-03-04 10:10:15 -0700
committerMichael Steinert <mike.steinert@gmail.com>2014-03-04 10:10:15 -0700
commita5669298f9c87fed00235aefea02d8b84b455570 (patch)
treefa1b124d1c8c890ccdbbaa799f9a88e9459beba3 /librabbitmq/amqp_openssl.c
parentb852f846c46a3bb9451f99844edfbea41f3289f1 (diff)
downloadrabbitmq-c-a5669298f9c87fed00235aefea02d8b84b455570.tar.gz
[openssl] Support wildcard hostname verification
Most of this code comes from version Curl 7.35.
Diffstat (limited to 'librabbitmq/amqp_openssl.c')
-rw-r--r--librabbitmq/amqp_openssl.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c
index 32595ae..ab8a94e 100644
--- a/librabbitmq/amqp_openssl.c
+++ b/librabbitmq/amqp_openssl.c
@@ -31,6 +31,7 @@
#include "amqp_ssl_socket.h"
#include "amqp_socket.h"
+#include "amqp_hostcheck.h"
#include "amqp_private.h"
#include "threads.h"
@@ -214,15 +215,9 @@ amqp_ssl_socket_verify_hostname(void *base, const char *host)
goto error;
}
}
-#ifdef _MSC_VER
-#define strcasecmp _stricmp
-#endif
- if (strcasecmp(host, (char *)utf8_value)) {
+ if (!amqp_hostcheck((char *)utf8_value, host)) {
goto error;
}
-#ifdef _MSC_VER
-#undef strcasecmp
-#endif
exit:
OPENSSL_free(utf8_value);
return status;