mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-06 05:38:02 +08:00
fix(nopoll): Fix some bug in nopoll library
internal: 908086ce
This commit is contained in:
3
VERSION
3
VERSION
@ -17,4 +17,5 @@ gitlab:
|
|||||||
driver: 7bee5263
|
driver: 7bee5263
|
||||||
mbedtls: 1ac9f1f4
|
mbedtls: 1ac9f1f4
|
||||||
ssl: eefb383a
|
ssl: eefb383a
|
||||||
openssl: 1669353f
|
openssl: 1669353f
|
||||||
|
nopoll: 31f0ea07
|
@ -39,7 +39,7 @@
|
|||||||
#ifndef __NOPOLL_PRIVATE_H__
|
#ifndef __NOPOLL_PRIVATE_H__
|
||||||
#define __NOPOLL_PRIVATE_H__
|
#define __NOPOLL_PRIVATE_H__
|
||||||
|
|
||||||
#include "ssl/ssl_compat-1.0.h"
|
#include "openssl/ssl.h"
|
||||||
#include <nopoll_handlers.h>
|
#include <nopoll_handlers.h>
|
||||||
|
|
||||||
typedef struct _noPollCertificate {
|
typedef struct _noPollCertificate {
|
||||||
|
BIN
lib/libnopoll.a
BIN
lib/libnopoll.a
Binary file not shown.
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) {
|
if (enable_tls) {
|
||||||
/* found TLS connection request, enable it */
|
/* found TLS connection request, enable it */
|
||||||
conn->ssl_ctx = __nopoll_conn_get_ssl_context (ctx, conn, options, nopoll_true);
|
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 */
|
/* check for client side SSL configuration */
|
||||||
if (! __nopoll_conn_set_ssl_client_options (ctx, conn, options)) {
|
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",
|
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;
|
return conn;
|
||||||
}
|
}
|
||||||
X509_free (server_cert);
|
|
||||||
|
|
||||||
/* call to check post ssl checks after SSL finalization */
|
/* call to check post ssl checks after SSL finalization */
|
||||||
if (conn->ctx && conn->ctx->post_ssl_check) {
|
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 */
|
/* store certificate settings */
|
||||||
opts->certificate = nopoll_strdup (certificate);
|
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);
|
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);
|
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);
|
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;
|
return nopoll_true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user