mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Clear cipher list on server creation, fix crash (#5171)
The cipher list values were not initialized to NULL appropriately for the BearSSL::WiFiClientSecure() constructor called by the Server object. This caused a crash as a random value was free'd when conecting to the SSL server object.
This commit is contained in:
parent
d0171574d8
commit
7c91eee26d
@ -116,6 +116,8 @@ WiFiClientSecure::~WiFiClientSecure() {
|
||||
WiFiClientSecure::WiFiClientSecure(ClientContext* client,
|
||||
const BearSSLX509List *chain, const BearSSLPrivateKey *sk,
|
||||
int iobuf_in_size, int iobuf_out_size, const BearSSLX509List *client_CA_ta) {
|
||||
_cipher_list = NULL;
|
||||
_cipher_cnt = 0;
|
||||
_clear();
|
||||
_clearAuthenticationSettings();
|
||||
_iobuf_in_size = iobuf_in_size;
|
||||
@ -133,6 +135,8 @@ WiFiClientSecure::WiFiClientSecure(ClientContext *client,
|
||||
const BearSSLX509List *chain,
|
||||
unsigned cert_issuer_key_type, const BearSSLPrivateKey *sk,
|
||||
int iobuf_in_size, int iobuf_out_size, const BearSSLX509List *client_CA_ta) {
|
||||
_cipher_list = NULL;
|
||||
_cipher_cnt = 0;
|
||||
_clear();
|
||||
_clearAuthenticationSettings();
|
||||
_iobuf_in_size = iobuf_in_size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user