gpt4 book ai didi

c++ - 如何正确处理 OpenSSL 错误 (BIO)

转载 作者:行者123 更新时间:2023-11-28 04:49:01 26 4
gpt4 key购买 nike

示例代码:

BIO* bio = BIO_new_file(file_name, "rb");
if (!bio)
{
unsigned long err = ERR_peek_last_error()
// err == 0

因此 BIO 为 NULL,错误代码也为 0。哪种是 openssl 错误处理的正确方法?

最佳答案

在我们的案例中,OpenSSL 似乎是使用“no-stdio”选项构建的。这导致了这样的行为

关于c++ - 如何正确处理 OpenSSL 错误 (BIO),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48594167/

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