igrr / axtls-8266

axTLS port for ESP8266

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LWIP and axTLS connection

slaff opened this issue · comments

commented

I would like to use your axTLS library. In the old Espressif IoT example this function was used to create the ssl client object:

EXP_FUNC SSL *STDCALL ICACHE_FLASH_ATTR SSLClient_new(SSL_CTX *ssl_ctx, struct tcp_pcb *SslClient_pcb, const
        uint8_t *session_id, uint8_t sess_id_size)
{   
    SSL *ssl = ssl_new_context(ssl_ctx, SslClient_pcb);
    ssl->version = SSL_PROTOCOL_VERSION_MAX;
    if (session_id && ssl_ctx->num_sessions) {
        if (sess_id_size > SSL_SESSION_ID_SIZE) {
            ssl_free(ssl);
            return NULL;
        }
        os_memcpy(ssl->session_id, session_id, sess_id_size);
        ssl->sess_id_size = sess_id_size;
        SET_SSL_FLAG(SSL_SESSION_RESUME);
    }
    SET_SSL_FLAG(SSL_IS_CLIENT);
    do_client_connect(ssl);
    return ssl;
}

Shall I use that one or there is a better way to do it with raw LWIP with axTLS?

commented

#5 should provide information also to the question in this issue.