EVP_get_cipherbyname总是返回null

5

在 macOS 上调用 EVP_get_cipherbyname 时遇到了问题:

const char *cipher_str = "aes-256-cbc";
const evp_cipher_st *cipher1 = EVP_aes_256_cbc();
const evp_cipher_st *cipher2 = EVP_get_cipherbyname(cipher_str);

在上述代码中,cipher1 将始终被设置为有效的 evp_cipher_st * 对象,而 cipher2 将始终为 null。我没有找到一个单独的 cipher_str 实例会生成非空的 cipher2
我是否做错了什么?是否还有其他调用应该进行来使其正常工作?

有什么理由在两种不同的语言中滥用标签吗? - too honest for this site
1个回答

7

2
以防万一有像我一样的人来到这里:自OpenSSL 1.1.0起,这不再需要。 - Nickolay Olshevsky

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接