通过SSL绑定客户端本地IP

发布于 2024-08-13 17:27:22 字数 392 浏览 3 评论 0原文

I'm looking to add SSL support to a client application written in C/C++ that I'm developing (it is multi-platform, designed to work on Linux and Windows). OpenSSL documentation is pretty poor, but I found a good working tutorial here. To my knowledge, however, there is no way to bind the socket to a local IP address using the BIO handle. There is a rather old ticket on the OpenSSL bug tracker that addresses this, but I think that no solution has been found (one comment suggests using BIO_get_accept_socket, but that will obviously not work for my client application). Any suggestions, solutions, or alternative libraries that offer this kind of functionality?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吐个泡泡 2024-08-20 17:27:22

您可以自己创建、绑定和连接套接字,然后使用 SSL_set_fd 将套接字传递给 OpenSSL,然后使用 SSL_connect 设置会话。

You can just create, bind and connect the socket yourself, then use SSL_set_fd to pass the socket to OpenSSL, followed by SSL_connect to set up the session.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文