我试图在perl的Net :: STOMP :: Client包的帮助下连接到TIBCO JMS主题代理。
我在创建新的Net :: STOMP :: Client对象时使用SSL方法并传递属性'uri'和amp; 'sockopts'主题Uri&用于身份验证的SSL证书文件。
当我尝试运行此脚本时,它会抛出错误说: -
无法SSL连接到mmx-nprd1-06:7222:IO :: Socket :: INET6配置失败
代码如下: -
}
有人可以帮我解决这个问题,因为我无法弄清楚这里出了什么问题。
答案 0 :(得分:0)
我在使用uri键时遇到了一些问题,请尝试以下方法:
$stomp = Net::STOMP::Client->new(host => "mmx-nprd1-06", port => 7222,
sockopts => {
# path of the directory containing trusted certificates
SSL_ca_path => "$Bin/JmsCertificate/",
# client certificate to present
SSL_cert_file => "$Bin/JmsCertificate/aix_jms_cert.pem",
# # client private key
SSL_key_file => "$Bin/JmsCertificate/aix_jms_key.pem",
# passphrase of the client private key
SSL_passwd_cb => sub { return("password") }, # Leave this out if your key doesn't require a passphrase
},
);
$stomp->connect(login => "aix_jms", passcode => "some_password");