openssl debug 记录

创建日期: 2023-08-01 16:56 | 作者: 风波 | 浏览次数: 11 | 分类: OS

切换 openssl 版本后函数 ASN1_STRING_get0_data 不存在

成功的版本: - Ubuntu 20.04.6 LTS openssl-1.1.1f - CentOS 9 openssl-3.0.7

失败的版本: - CentOS 7 openssl-1.0.2k

官网文档 https://www.openssl.org/docs/man3.0/man3/ASN1_STRING_get0_data.html

ASN1_STRING_get0_data() returns an internal pointer to the data of x. Since this is an internal pointer it should not be freed or modified in any way.

ASN1_STRING_data() is similar to ASN1_STRING_get0_data() except the returned value is not constant. This function is deprecated: applications should use ASN1_STRING_get0_data() instead.

所以在低版本的 openssl 中,可以使用 ASN1_STRING_data() 进行替换。

查看 openssl-1.0.2k 的文档中对 ASN1_STRING_data() 函数的描述。

ASN1_STRING_data() returns an internal pointer to the data of x. Since this is an internal pointer it should not be freed or modified in any way.

看起来效果是一样的。

11 浏览
9 爬虫
0 评论