How to disable Server Key Exchange from the code?

admin

Administrator
Staff member
I run an HTTP2 server example (libevent-server.c) from <a href="https://nghttp2.org/" rel="nofollow">nghttp2</a> on Ubuntu 15.04. I would like to sniff the HTTP2 packet between the client-server using Wireshark.

I don't use any web browser as the client, so the tips on how to read HTTP2 message in Wireshark explained <a href="https://ismisepaul.wordpress.com/" rel="nofollow">here</a> is not applicable to my project. I use libcurl.

Since the HTTP2 packet is the application layer inside TLS, Wireshark must know how to decrypt it; hence, I followed the guide from <a href="http://packetpushers.net/using-wireshark-to-decode-ssltls-packets/" rel="nofollow">here</a> to supply Wireshark with the key. However the guide warns that, "If the server sends a ServerKeyExchange message, you will not be able to decrypt the data." Unfortunately, my Wireshark shows that the Server Key Exchange was sent by the server.

The following is a snippet of libevent-server.c code:

Code:
 SSL_load_error_strings();
 SSL_library_init();
 OpenSSL_add_all_algorithms();
 OPENSSL_config(NULL);

I have recompiled the code after changing
Code:
OPENSSL_config(NULL)
to
Code:
OPENSSL_no_config()
but the Server Key Exchange was still sent.

How can I disable the Server Key Exchange?