diff options
author | Kouhei Sutou <kou@clear-code.com> | 2014-08-25 15:55:12 +0900 |
---|---|---|
committer | Kouhei Sutou <kou@clear-code.com> | 2014-08-25 15:55:12 +0900 |
commit | 5790ec76336955c8dd3ff4e94d36389c562a351b (patch) | |
tree | 793de323aa9456ecfb7161f7160e2bdaa7d61a39 | |
parent | 977e125977db1f0a729abfd42b511a82688a53c4 (diff) | |
download | rabbitmq-c-github-ask-5790ec76336955c8dd3ff4e94d36389c562a351b.tar.gz |
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
-rw-r--r-- | librabbitmq/amqp_openssl.c | 4 |
1 files 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; |