使用RabbitMq,我试图从https://github.com/alanxz/rabbitmq-c
测试C示例我已经创建了一个监听器和一个消费者,并设法使用普通的旧的非加密传输协议传递信息。升级到ssl时遇到的问题如下:
=INFO REPORT==== 26-Mar-2014::11:37:01 ===
accepted TCP connection on 10.0.1.121:5671 from 10.0.1.121:37553
=INFO REPORT==== 26-Mar-2014::11:37:01 ===
starting TCP connection <0.2446.0> from 10.0.1.121:37553
=INFO REPORT==== 26-Mar-2014::11:37:01 ===
upgraded TCP connection <0.2446.0> to SSL
=WARNING REPORT==== 26-Mar-2014::11:37:01 ===
exception on TCP connection <0.2446.0> from 10.0.1.121:37553
connection_closed_abruptly
=INFO REPORT==== 26-Mar-2014::11:37:01 ===
closing TCP connection <0.2446.0> from 10.0.1.121:37553
我设法获得与php和ruby一样的证书,所以知道它不是服务器/证书问题。
我正在使用gdb进行调试,而且无法找到更多。
我还可以做些什么来进一步调试?
Gdb输出:
Breakpoint 1, main (argc=-1073743875, argv=0xbffff839)
at examples/amqps_listen.c:53
warning: Source file is more recent than executable.
53 {
63 if (argc < 5) {
69 hostname = argv[1];
70 port = atoi(argv[2]);
69 hostname = argv[1];
70 port = atoi(argv[2]);
71 exchange = argv[3];
72 bindingkey = argv[4];
70 port = atoi(argv[2]);
72 bindingkey = argv[4];
74 conn = amqp_new_connection();
76 socket = amqp_ssl_socket_new(conn);
79 if (!socket) {
76 socket = amqp_ssl_socket_new(conn);
$1 = <optimized out>
79 if (!socket) {
83 if (argc > 5) {
84 status = amqp_ssl_socket_set_cacert(socket, argv[5]);
$2 = <optimized out>
85 if (status) {
90 if (argc > 7) {
91 status = amqp_ssl_socket_set_key(socket, argv[7], argv[6]);
92 if (status) {
97 status = amqp_socket_open(socket, hostname, port);
$3 = <optimized out>
$4 = 0xbffff839 "10.0.1.121"
$5 = 5671
$6 = <optimized out>
98 if (status) {
$7 = 1
$8 = 1
99 die("opening SSL/TLS connection ");
$9 = 1
[Inferior 1 (process 10137) exited with code 01]
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
warning: Error removing breakpoint 0
**链接 *
https://gist.github.com/minotaur62/9783764 https://gist.github.com/minotaur62/9783948 https://gist.github.com/minotaur62/9783596