typedef void(* MyQttTlsFailureHandler)(MyQttConn *conn, const char *error_message, axlPointer user_data)

Handler called when a failure is found during TLS handshake.

The function receives the connection where the failure * found an error message and a pointer configured by the user at myqtt_tls_set_failure_handler.

connThe connection where the failure was found.
error_messageThe error message describing the problem found.
user_dataOptional user defined pointer.

To get particular SSL info, you can use the following code inside the handler:

1 // error variables
2 char log_buffer [512];
3 unsigned long err;
5 // show errors found
6 while ((err = ERR_get_error()) != 0) {
7  ERR_error_string_n (err, log_buffer, sizeof (log_buffer));
8  printf ("tls stack: %s (find reason(code) at openssl/ssl.h)", log_buffer);
9 }