fix(nopoll): Fix some bug in nopoll library

internal: 908086ce
This commit is contained in:
Espressif Systems
2018-03-26 10:32:16 +08:00
parent 8ca60951d1
commit 0186f47021
5 changed files with 4 additions and 16 deletions

View File

@ -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) {

View File

@ -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;
}