Patch: Elm ME+ 2.5 PLalpha51 -> Elm ME+ 2.5 PLalpha52 [5/7] (5/5)
From
Kari Hurtta@21:1/5 to
All on Mon Jun 8 19:48:59 2020
[continued from previous message]
! if (tls_xx_pCtx[v]) {
! if (! SSL_CTX_load_verify_locations(tls_xx_pCtx[v],CAfile,CApath)) {
! DPRINT(Debug,2,(&Debug,
! "Failed to set CAfile=%s / CApath=%s for %s\n",
! CAfile ? CAfile : "<none>",
! CApath ? CApath : "<none>",
! TLS_VERSION[v]));
!
! failed = 1;
! }
}
}
!
if (failed)
lib_error(CATGETS(elm_msg_cat, TlsSet,
TlsFailedVerTrustedCertLoc,
***************
*** 1820,1826 ****
ss_TLSVerifyName
};
! union stream_types create_TLS_stream(int tls)
{
union stream_types ret;
struct shared_type_1 * S = safe_malloc(sizeof (struct shared_type_1)); --- 2264,2271 ----
ss_TLSVerifyName
};
! union stream_types create_TLS_stream(tls)
! enum tls_version tls;
{
union stream_types ret;
struct shared_type_1 * S = safe_malloc(sizeof (struct shared_type_1)); ***************
*** 1839,1871 ****
S->noread = 1;
S->state = tls_not_connected;
zero_Read_Buffer( &(S->read_buffer));
zero_Write_Buffer( &(S->write_buffer));
! if (tls) {
! if (!tls_pCtx) {
DPRINT(Debug,4,(&Debug,
! "tls: create_TLS_stream: tls not available\n"));
goto failure;
}
! S->pSSL = SSL_new(tls_pCtx);
! } else {
! if (!ssl_pCtx) {
! DPRINT(Debug,4,(&Debug,
! "tls: create_TLS_stream: ssl not available\n"));
goto failure;
}
! S->pSSL = SSL_new(ssl_pCtx);
! }
!
! if (!S->pSSL) {
DPRINT(Debug,3,(&Debug,
! "tls: create_TLS_stream: SSL_new failed (%s)\n",
! tls ? "TLS" : "SSL"));
!
goto failure;
}
DPRI