diff options
author | Christian Betz <cbetz@sicom.com> | 2016-09-13 17:02:22 -0400 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2018-01-10 20:37:11 -0800 |
commit | 0da8d1fd403794058a0184abd3eaffd46156f62f (patch) | |
tree | 0b4ffc621c180bdefc6359c99aa5fcd70363336b | |
parent | 8ab25ab6772857336f1e11ae64dacd091ce371c2 (diff) | |
download | rabbitmq-c-0da8d1fd403794058a0184abd3eaffd46156f62f.tar.gz |
ssl: add support for SSL SNI
-rw-r--r-- | librabbitmq/amqp_openssl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c index 234a698..2a43e81 100644 --- a/librabbitmq/amqp_openssl.c +++ b/librabbitmq/amqp_openssl.c @@ -204,6 +204,13 @@ static int amqp_ssl_socket_open(void *base, const char *host, int port, BIO_set_fd(bio, self->sockfd, BIO_NOCLOSE); SSL_set_bio(self->ssl, bio, bio); + status = SSL_set_tlsext_host_name(self->ssl, host); + if (!status) { + self->internal_error = SSL_get_error(self->ssl, status); + status = AMQP_STATUS_SSL_ERROR; + goto error_out2; + } + start_connect: status = SSL_connect(self->ssl); if (status != 1) { |