I am using two sample examples given by gnutls:
- "Simple client example with X.509 certificate support" without any change
"Echo server with X.509 authentication". I have generated the private key "key.pem" using certtool and self-signed certificate "cert.pem" and use it within the example.
The server works correctly... the output is the following:
Server ready. Listening to port '5556'
But if I run the client example, it return the following error:
Handshake failed GnuTLS error: The TLS connection was non-properly terminated
and the server returns:
connection from 127.0.0.1, port 58587 Handshake has failed (The request is invalid.)
What is the problem? Do I need to change the client example? If not, how can I check the TLS handshake process and the data sent between the client and server?