使用 OpenSSL ssl_conn 错误进行编译
我正在尝试编译一个使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.