Reputation: 1949
I'm using the openssl
library. In the apps/s_client.c
file, I am trying to access the con
variable, which is declared like this:
SSL *con=NULL;
con=SSL_new(ctx);
However, whenever I try to access any of the members of con
, for example,
con->version
, I get this error:
s_client.c: In function ‘s_client_main’:
s_client.c:1667: error: dereferencing pointer to incomplete type
What header file should I include?
Upvotes: 2
Views: 4172
Reputation: 1763
All headers are already included, you just need to remove OPENSSL_NO_SSL_INTERN before ssl.h inclusion.
apps/s_client.c:
...
#undef OPENSSL_NO_SSL_INTERN
#include <openssl/ssl.h>
Upvotes: 2