Skip to content

Minor patch to move _cipher* init to _clear() for consistency #5178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ void WiFiClientSecure::_clear() {
_recvapp_len = 0;
_oom_err = false;
_deleteChainKeyTA = false;
_cipher_list = NULL;
_cipher_cnt = 0;
}

void WiFiClientSecure::_clearAuthenticationSettings() {
Expand All @@ -85,8 +87,6 @@ void WiFiClientSecure::_clearAuthenticationSettings() {


WiFiClientSecure::WiFiClientSecure() : WiFiClient() {
_cipher_list = NULL;
_cipher_cnt = 0;
_clear();
_clearAuthenticationSettings();
_certStore = nullptr; // Don't want to remove cert store on a clear, should be long lived
Expand Down Expand Up @@ -116,8 +116,6 @@ 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;
Expand All @@ -135,8 +133,6 @@ 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;
Expand Down