Hello,

> Is there any way to see --exactly-- what's going on? To log exactly
> what's going on during the connection/handshake procedure?
Try to add connection callback function, for example:

static void tls_connection_info_cb(const SSL * ssl, int type, int val)
{
    if (type & SSL_CB_LOOP) {
        printf("tls_state: %s: %s",
                type & SSL_ST_CONNECT ? "connect" :
                type & SSL_ST_ACCEPT ? "accept" :
                "undefined", SSL_state_string_long(ssl));
    }
    if (type & SSL_CB_ALERT) {
        printf("tls_alert: %s:%s: %s",
                type & SSL_CB_READ ? "read" : "write",
                SSL_alert_type_string_long(val), 
SSL_alert_desc_string_long(val));
    }
}

end than set callback with:

SSL_CTX_set_info_callback(ctx, tls_connection_info_cb);

This example connection callback is not mine but is very useful.

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to