gpt4 book ai didi

windows - 在 RabbitMQ 中为 web stomp 配置 SSL?

转载 作者:太空宇宙 更新时间:2023-11-03 14:58:34 27 4
gpt4 key购买 nike

我正在使用 RabbitMQ 和 Web-stomp 在服务器和网页之间进行消息传递。它在 HTTP 连接上工作正常,但在 HTTPS 连接上失败。我在他们的文档中搜索并发现我需要在 rabbitmq.config 文件中设置以下配置

[
{rabbitmq_web_stomp,
[{ssl_config, [{port, 15671},
{backlog, 1024},
{certfile, "path/to/certs/client/cert.pem"},
{keyfile, "path/to/certs/client/key.pem"},
{cacertfile, "path/to/certs/testca/cacert.pem"},
{password, "changeme"}]}]}
].

所以我尝试使用 OpenSSL 来创建证书。我在 Internet 上搜索了关于在打开的 SSL 中创建证书文件和 key 文件的信息,并在下面找到了命令。

在pem中创建csr和key文件

openssl.exe req -new -newkey rsa:2048 -nodes -out localhost.csr.pem -keyout localhost.key.pem -subj "/CN=localhost"

创建crt文件

openssl x509 -req -days 365 -in localhost.csr.pem -signkey localhost.key.pem -out localhost.crt.pem

我不知道它是否正确,而且我也不知道如何在开放式 SSL 中创建 cacert 文件以及如何配置文件以与 web stomp 一起使用。请帮助我摆脱困境!

谢谢,

最佳答案

您可以尝试使用此工具来创建证书:https://github.com/michaelklishin/tls-gen由于在以后的 Erlang 版本中实现了一些 SSL 功能,因此最好使用 Erlang 17.1

关于windows - 在 RabbitMQ 中为 web stomp 配置 SSL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25961978/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com