使用 OpenSSL ssl_conn 错误进行编译

发布于 2024-09-12 09:12:06 字数 482 浏览 5 评论 0原文

我正在尝试编译一个使用 OpenSSL include 的小 .c 文件,起初我在编译时遇到问题,但我通过安装 libssl-dev 解决了它,并解决了包含错误。

但现在当我尝试编译时,我得到:

‘ssl_conn’ has no member named ‘encrypted’
‘ssl_conn’ has no member named ‘write_seq’
‘ssl_conn’ has no member named ‘read_seq’

错误行的代码是:

ssl_conn* sslCon;
sslCon->encrypted = 0;
sslCon->write_seq = 0;
sslCon->read_seq = 0;

一位朋友告诉我这可能是因为 .c 文件是针对旧版本的 OpenSSL 进行编码的,但我不确定。有人知道可能导致此问题的原因以及如何解决吗?

I am trying to compile a small .c file which uses OpenSSL includes, at first I had problems compiling but I solved it installing libssl-dev and that solved the include errors.

But now when I try to compile I get:

‘ssl_conn’ has no member named ‘encrypted’
‘ssl_conn’ has no member named ‘write_seq’
‘ssl_conn’ has no member named ‘read_seq’

The code for the lines of the error is:

ssl_conn* sslCon;
sslCon->encrypted = 0;
sslCon->write_seq = 0;
sslCon->read_seq = 0;

A friend told me it could be because the .c file was coded for an old version of OpenSSL, but I am not sure. Does someone knows what could be causing this and how to solve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶底世界 2024-09-19 09:12:06

ssl_conn 不是 OpenSSL API 的一部分,也从来不是。我只在一些利用 OpenSSL 的示例代码中找到了对它的引用,并且它本身定义了它。假设您没有尝试使用该漏洞利用代码,我的猜测是网上流传着一个示例,您可以从中获取要尝试编译的代码。因此,请检查 ssl_conn 的定义并确保它包含缺少的字段。

ssl_conn is not part of the OpenSSL API and never was. I only found reference to it in some sample code exploiting OpenSSL, and it was defining it itself. Assuming you aren't trying to use that exploit code, my guess is there's an example floating around online from which you got the code you are trying to compile. So check your definition of ssl_conn and ensure it has the fields that are missing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文