ssl - 我可以在重复 SSL_write() 时将数据附加到缓冲区吗?

标签 ssl openssl nonblocking

下面的描述是关于int SSL_write(SSL *ssl, const void *buf, int num):

When an SSL_write() operation has to be repeated because of SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, it must be repeated with the same arguments.

“相同” 这个词的确切含义是什么?如果我在将数据附加到此缓冲区时保持相同的 buf 指针是否正确?

最佳答案

same表示ssl指向同一个SSL对象,num与之前的值相同,buf 指向同一个缓冲区,并且该缓冲区的前 num 个字节没有改变。您可以将超出前 num 个字节的数据添加到缓冲区而不会产生影响。

关于ssl - 我可以在重复 SSL_write() 时将数据附加到缓冲区吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38051027/

相关文章:

multithreading - "nonblocking"数据结构如何可能?

python - wxPython 非阻塞 GUI 线程和多处理?

c# - SSL 客户端/服务器相互认证

python - 无法安装任何库 [SSL : TLSV1_ALERT_PROTOCOL_VERSION]

c - 使用 C 中的 EVP api 使用 openssl 加密文件的正确方法

c++ - 为什么 OpenSSL 在 Windows 上无法正确链接

python - 如果 TCP 客户端能够暂停服务器,当 TCP 服务器读取非阻塞套接字时

java - 从 Tomcat WebApp 访问 WebService 时出现 CertPathValidatorException

node.js - 使用 Let's Encrypt SSL 证书在 ExpressJS Node 应用程序中握手失败

mongodb - 如何使用无效的 Tls 证书连接 Rust MongoDB 驱动程序?