[Libwebsockets] LCCSCF_ALLOW_SELFSIGNED not applied after redirect

Andy Green andy at warmcat.com
Thu Dec 23 07:09:58 CET 2021



On 12/22/21 20:18, Roman Nikiforov wrote:
> On 12/22/21 12:08 PM, Andy Green wrote:
>>
>> Does this help?
>>
>> diff --git a/lib/roles/http/client/client-http.c 
>> b/lib/roles/http/client/client-http.c
>> index 465b4f0fd7..4eebbe7211 100644
>> --- a/lib/roles/http/client/client-http.c
>> +++ b/lib/roles/http/client/client-http.c
>> @@ -1650,6 +1650,8 @@ lws_client_reset(struct lws **pwsi, int ssl, 
>> const char *address, int port,
>>
>>         wsi->flags = (wsi->flags & (~LCCSCF_USE_SSL)) |
>>                                         (ssl ? LCCSCF_USE_SSL : 0);
>> +       if (ssl)
>> +               wsi->tls.use_ssl = wsi->flags;
>>
>>         if (!cisin[CIS_ALPN] || !cisin[CIS_ALPN][0])
>>  #if defined(LWS_ROLE_H2)
> 
> unfortunately no. I also put additional log outputs in lws where 

How about this

diff --git a/lib/core-net/close.c b/lib/core-net/close.c
index 4388aaf4c9..9b13325c9e 100644
--- a/lib/core-net/close.c
+++ b/lib/core-net/close.c
@@ -963,7 +963,7 @@ __lws_close_free_wsi_final(struct lws *wsi)
                 //_lws_header_table_reset(wsi->http.ah);

  #if defined(LWS_WITH_TLS)
-               wsi->tls.use_ssl = wsi->flags & LCCSCF_USE_SSL;
+               wsi->tls.use_ssl = wsi->flags;
  #endif

  #if defined(LWS_WITH_TLS_JIT_TRUST)

-Andy


More information about the Libwebsockets mailing list