请教下Openssl怎么使用异步
https请求,使用的openssl,网上的例子基本都是同步的,想使用异步,查了下官方资料,貌似本身不提供异步,其异步更多的依赖于socket本身。比如SSL_accept(如果我没理解错的话)
如果是这样的话,有没有什么好的框架,自己裸写感觉成本有点高。试了下WSAEventSelect貌似不行,只要有连接进来,只要对新连接返回的socket调用WSAEventSelect就会导致SSL的accept失败。
NOTES
The behaviour of SSL_accept() depends on the underlying BIO.
If the underlying BIO is blocking, SSL_accept() will only return once the handshake has been finished or an error occurred.
If the underlying BIO is non-blocking, SSL_accept() will also return when the underlying BIO could not satisfy the needs of SSL_accept() to continue the handshake, indicating the problem by the return value -1. In this case a call to SSL_get_error() with the return value of SSL_accept() will yield SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSL_accept(). The action depends on the underlying BIO. When using a non-blocking socket, nothing is to be done, but select() can be used to check for the required condition. When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of the BIO before being able to continue.
如果是这样的话,有没有什么好的框架,自己裸写感觉成本有点高。试了下WSAEventSelect貌似不行,只要有连接进来,只要对新连接返回的socket调用WSAEventSelect就会导致SSL的accept失败。
...全文
相关推荐
openssl-example-master, OpenSSL异步连接源码
在“openssl-example-master”这个压缩包中,包含了使用 OpenSSL 库进行异步连接的示例代码,这对于理解如何在实际应用中处理并发连接和提高性能非常有帮助。
async_tls_test:使用 openssl 或boringssl 的异步 TLS 测试用例
异步 TLS 测试异步 TLS 的简单示例概述非阻塞 TLS 的非常简单的例子用boringssl和openssl编译需要测试和反馈可能泄漏编译 clang++ -std=c++11 openssl_
openssl asyncclient
本项目"openssl asyncclient"是关于如何在MFC环境下使用OpenSSL库来实现一个异步客户端的示例,这对于开发者来说具有很高的学习和参考价值。
Rust 的 OpenSSL 绑定
该项目为Rust语言对OpenSSL的绑定库,主要记录了各版本的功能演进与改进。重点包括支持OpenSSL 3.x.x、增强异步加密能力、优化SslStream API,并修复内存泄漏问题。同时逐步弃
OpenSSL硬件卸载增强架构介绍.pptx
为了实现OpenSSL异步框架的增强,开发者需要进行相应的配置和优化。这包括在Nginx中集成QAT驱动,以及调整OpenSSL的异步处理机制,使其更好地与硬件加速器协同工作。


网络编程
