我正在尝试调试此错误,但有一段时间无法做到这一点。我尝试使用 memmove 作为替代方案,但这也会导致分段错误。此问题中代码的链接发布在 - http://pastebin.com/hiwV5G04
有人可以帮我理解我做错了什么吗?
//------------------------------------------------------------------------
// Somewhere in the main function, This is the piece of code I am executing
//------------------------------------------------------------------------
SslDecryptSession *ssl_session = malloc(sizeof(struct _SslDecryptSession ));
ssl_session->client_random.data = NULL; //Make the stuff point somewhere. Else can use malloc also here. Not sure if this is a problem
ssl_session->server_random.data= NULL;
const u_char *payload; /* Packet payload */
//Case for client random
printf("Client Random ");
for (cs_id = 11; cs_id < 43; cs_id++){
printf("%hhX", payload[cs_id] );
}
printf("\n");
cs_id=11; …Run Code Online (Sandbox Code Playgroud) 在 OpenSSL 的 SSL/TLS 客户端实现中,SSL定义了一个结构。例如这里通常是前几行(来自链接)。
SSL_CTX* ctx = NULL;
BIO *web = NULL, *out = NULL;
SSL *ssl = NULL;
init_openssl_library();
Run Code Online (Sandbox Code Playgroud)
我一直无法在 OpenSSL 库的头文件中找到它的结构。我怎样才能学习内容SSL * ssl?