mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
remove (std::nothrow) where nullptr case is not handled
remove legacy new management
This commit is contained in:
@ -145,7 +145,7 @@ void setup() {
|
||||
return; // Can't connect to anything w/o certs!
|
||||
}
|
||||
|
||||
BearSSL::WiFiClientSecure *bear = new (std::nothrow) BearSSL::WiFiClientSecure();
|
||||
BearSSL::WiFiClientSecure *bear = new BearSSL::WiFiClientSecure();
|
||||
// Integrate the cert store with this connection
|
||||
bear->setCertStore(&certStore);
|
||||
Serial.printf("Attempting to fetch https://github.com/...\n");
|
||||
@ -164,7 +164,7 @@ void loop() {
|
||||
site.replace(String("\n"), emptyString);
|
||||
Serial.printf("https://%s/\n", site.c_str());
|
||||
|
||||
BearSSL::WiFiClientSecure *bear = new (std::nothrow) BearSSL::WiFiClientSecure();
|
||||
BearSSL::WiFiClientSecure *bear = new BearSSL::WiFiClientSecure();
|
||||
// Integrate the cert store with this connection
|
||||
bear->setCertStore(&certStore);
|
||||
fetchURL(bear, site.c_str(), 443, "/");
|
||||
|
@ -161,8 +161,8 @@ void setup() {
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
// Attach the server private cert/key combo
|
||||
BearSSL::X509List *serverCertList = new (std::nothrow) BearSSL::X509List(server_cert);
|
||||
BearSSL::PrivateKey *serverPrivKey = new (std::nothrow) BearSSL::PrivateKey(server_private_key);
|
||||
BearSSL::X509List *serverCertList = new BearSSL::X509List(server_cert);
|
||||
BearSSL::PrivateKey *serverPrivKey = new BearSSL::PrivateKey(server_private_key);
|
||||
#ifndef USE_EC
|
||||
server.setRSACert(serverCertList, serverPrivKey);
|
||||
#else
|
||||
|
@ -202,12 +202,12 @@ void setup() {
|
||||
setClock(); // Required for X.509 validation
|
||||
|
||||
// Attach the server private cert/key combo
|
||||
BearSSL::X509List *serverCertList = new (std::nothrow) BearSSL::X509List(server_cert);
|
||||
BearSSL::PrivateKey *serverPrivKey = new (std::nothrow) BearSSL::PrivateKey(server_private_key);
|
||||
BearSSL::X509List *serverCertList = new BearSSL::X509List(server_cert);
|
||||
BearSSL::PrivateKey *serverPrivKey = new BearSSL::PrivateKey(server_private_key);
|
||||
server.setRSACert(serverCertList, serverPrivKey);
|
||||
|
||||
// Require a certificate validated by the trusted CA
|
||||
BearSSL::X509List *serverTrustedCA = new (std::nothrow) BearSSL::X509List(ca_cert);
|
||||
BearSSL::X509List *serverTrustedCA = new BearSSL::X509List(ca_cert);
|
||||
server.setClientTrustAnchor(serverTrustedCA);
|
||||
|
||||
// Actually start accepting connections
|
||||
|
@ -85,7 +85,7 @@ void setup() {
|
||||
Serial.swap();
|
||||
// Hardware serial is now on RX:GPIO13 TX:GPIO15
|
||||
// use SoftwareSerial on regular RX(3)/TX(1) for logging
|
||||
logger = new (std::nothrow) SoftwareSerial(3, 1);
|
||||
logger = new SoftwareSerial(3, 1);
|
||||
logger->begin(BAUD_LOGGER);
|
||||
logger->enableIntTx(false);
|
||||
logger->println("\n\nUsing SoftwareSerial for logging");
|
||||
|
Reference in New Issue
Block a user