mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-02 18:47:58 +08:00
fix(nopoll): Fix some bug in nopoll library
internal: 908086ce
This commit is contained in:
3
third_party/nopoll/nopoll_conn.c
vendored
3
third_party/nopoll/nopoll_conn.c
vendored
@ -704,7 +704,7 @@ noPollConn * __nopoll_conn_new_common (noPollCtx * ctx,
|
||||
if (enable_tls) {
|
||||
/* found TLS connection request, enable it */
|
||||
conn->ssl_ctx = __nopoll_conn_get_ssl_context (ctx, conn, options, nopoll_true);
|
||||
|
||||
SSL_CTX_set_default_read_buffer_len(conn->ssl_ctx, 4096);
|
||||
/* check for client side SSL configuration */
|
||||
if (! __nopoll_conn_set_ssl_client_options (ctx, conn, options)) {
|
||||
nopoll_log (ctx, NOPOLL_LEVEL_CRITICAL, "Unable to configure additional SSL options, unable to continue",
|
||||
@ -804,7 +804,6 @@ noPollConn * __nopoll_conn_new_common (noPollCtx * ctx,
|
||||
|
||||
return conn;
|
||||
}
|
||||
X509_free (server_cert);
|
||||
|
||||
/* call to check post ssl checks after SSL finalization */
|
||||
if (conn->ctx && conn->ctx->post_ssl_check) {
|
||||
|
12
third_party/nopoll/nopoll_conn_opts.c
vendored
12
third_party/nopoll/nopoll_conn_opts.c
vendored
@ -122,21 +122,9 @@ nopoll_bool nopoll_conn_opts_set_ssl_certs (noPollConnOpts * opts,
|
||||
|
||||
/* store certificate settings */
|
||||
opts->certificate = nopoll_strdup (certificate);
|
||||
if (opts->certificate)
|
||||
// if (access (opts->certificate, R_OK) != 0)
|
||||
// return nopoll_false;
|
||||
opts->private_key = nopoll_strdup (private_key);
|
||||
if (opts->private_key)
|
||||
// if (access (opts->private_key, R_OK) != 0)
|
||||
// return nopoll_false;
|
||||
opts->chain_certificate = nopoll_strdup (chain_certificate);
|
||||
if (opts->chain_certificate)
|
||||
// if (access (opts->chain_certificate, R_OK) != 0)
|
||||
// return nopoll_false;
|
||||
opts->ca_certificate = nopoll_strdup (ca_certificate);
|
||||
if (opts->ca_certificate)
|
||||
// if (access (opts->ca_certificate, R_OK) != 0)
|
||||
// return nopoll_false;
|
||||
|
||||
return nopoll_true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user