diff options
Diffstat (limited to 'examples/amqps_consumer.c')
-rw-r--r-- | examples/amqps_consumer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/amqps_consumer.c b/examples/amqps_consumer.c index cb47dff..86c9d9f 100644 --- a/examples/amqps_consumer.c +++ b/examples/amqps_consumer.c @@ -148,12 +148,19 @@ int main(int argc, char const * const *argv) { } if (argc > 4) { - status = amqp_ssl_socket_set_key(socket, argv[5], argv[5]); + status = amqp_ssl_socket_set_key(socket, argv[4]); if (status) { die("setting client key/cert"); } } + if (argc > 5) { + status = amqp_ssl_socket_set_cert(socket, argv[5]); + if (status) { + die("setting client key"); + } + } + status = amqp_socket_open(socket, hostname, port); if (status) { die("opening SSL/TLS connection"); |