I'm trying to run the SSL example "amqps\_listenq" in [rabbitmq-c library](https://github.com/alanxz/rabbitmq-c) (ssl-plumbing branch) using the command line 

```
$./amqps_listenq [ServerIP]  5671 hello ./cacert.pem ./key.pem ./cert.pem

```

i got the following error

```
opening SSL/TLS connection

```

when i try to debug the code it fails in the following block in main

```
status = amqp_socket_open(socket, hostname, port);
if (status) {
    die("opening SSL/TLS connection");
}

```

when i debug into "amqp\_socket\_open" method i found that it fails in the following block in amqp\_openssl.c

```
if (self->verify) {
    int status = amqp_ssl_socket_verify(self, host);
    if (status) {
        return -1;
    }
}

```

I traced the error inside amqp\_ssl\_socket\_verify and found that i fails in the following block

```
#ifdef _MSC_VER
#define strcasecmp _stricmp
#endif
    if (strcasecmp(host, (char *)utf8_value)) {
        goto error; //<-- it fails here
    }
#ifdef _MSC_VER
#undef strcasecmp
#endif
exit:
    OPENSSL_free(utf8_value);
    return status;
error:
    status = -1;
    goto exit;

```

status was equal to -1
any idea where is the problem??

Note that i can easily connect to RabbitMq with SSL on the same server using java even i didn't set certificates using the following code

```
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("[ServerIP]");
factory.setPort(5671);
factory.useSslProtocol();
factory.setUsername("guest");
factory.setPassword("guest");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();

channel.queueDeclare("hello_ssl", false, false, false, null);
System.out.println(" [*] Waiting for messages. To exit press CTRL+C");

QueueingConsumer consumer = new QueueingConsumer(channel);
channel.basicConsume(QUEUE_NAME, true, consumer);

while (true){
  QueueingConsumer.Delivery delivery = consumer.nextDelivery();
  String message = new String(delivery.getBody());
  System.out.println(" [" + i + "] Received '" + message + "'");
}

```