Compiling with OpenSSL ssl_conn errors
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开发者_JS百科 old version of OpenSSL, but I am not sure. Does someone knows what could be causing this and how to solve it?
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.
精彩评论