diff options
author | Egor Ignatov <egori@altlinux.org> | 2022-01-25 18:19:43 +0300 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2022-01-26 23:39:54 -0500 |
commit | 3aca5b0cfec7634eb25253f4c503b000111dfccb (patch) | |
tree | 6c0e8e260d67e9e7216f3b439d305f3d0cf4bd2b | |
parent | 2c6f753a60e93a8ecb1a15733e75d023d7729ac7 (diff) | |
download | rabbitmq-c-3aca5b0cfec7634eb25253f4c503b000111dfccb.tar.gz |
tools: enable ssl in connection_info if --ssl used with --server
-rw-r--r-- | tools/common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/common.c b/tools/common.c index b4b5de4..39a20a7 100644 --- a/tools/common.c +++ b/tools/common.c @@ -213,14 +213,18 @@ static void init_connection_info(struct amqp_connection_info *ci) { } #endif } + } #if WITH_SSL - if (amqp_ssl && !ci->ssl) { + if (amqp_ssl && !ci->ssl) { + if (amqp_url) { die("the --ssl option specifies an SSL connection" " but the --url option does not"); + } else { + ci->ssl = 1; } -#endif } +#endif if (amqp_port >= 0) { if (amqp_url) { |