diff options
author | Michael Steinert <mike.steinert@gmail.com> | 2012-08-30 16:08:23 -0600 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-04-09 15:53:03 -0700 |
commit | 09eccb1c0832713f377235c941716007085b47fc (patch) | |
tree | bd2124d29547fb740e5b7d6e51870f1a57d43788 /examples/amqps_consumer.c | |
parent | 15a80404bec02e6fbf47108f306f6b3020bc078d (diff) | |
download | rabbitmq-c-github-ask-09eccb1c0832713f377235c941716007085b47fc.tar.gz |
Add API to load SSL keys from a buffer
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
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"); |