From 5790ec76336955c8dd3ff4e94d36389c562a351b Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Mon, 25 Aug 2014 15:55:12 +0900 Subject: ssl: Fix a bug that host name verification failure isn't reported There is an unexpected local variable shadowing in amqp_ssl_socket_open(). So the following code is meaningless unexpectedly. status = AMQP_STATUS_SSL_HOSTNAME_VERIFY_FAILED --- librabbitmq/amqp_openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c index ab8a94e..43018c9 100644 --- a/librabbitmq/amqp_openssl.c +++ b/librabbitmq/amqp_openssl.c @@ -271,8 +271,8 @@ amqp_ssl_socket_open(void *base, const char *host, int port, struct timeval *tim goto error_out3; } if (self->verify) { - int status = amqp_ssl_socket_verify_hostname(self, host); - if (status) { + int verify_status = amqp_ssl_socket_verify_hostname(self, host); + if (verify_status) { self->internal_error = 0; status = AMQP_STATUS_SSL_HOSTNAME_VERIFY_FAILED; goto error_out3; -- cgit v1.2.1