forked from espressif/arduino-esp32
WiFiClientSecure::lastError() method (#945)
* Added a lastError method to WiFiClientSecure so that a connection error from mbedTLS can be retrieved if connection fails (and then presented to a user). * Changed to dos CRLF * Made buffer size a const\nMore cleanup to match source
This commit is contained in:
@ -29,7 +29,8 @@ class WiFiClientSecure : public WiFiClient
|
||||
{
|
||||
protected:
|
||||
sslclient_context *sslclient;
|
||||
|
||||
|
||||
int _lastError = 0;
|
||||
const char *_CA_cert;
|
||||
const char *_cert;
|
||||
const char *_private_key;
|
||||
@ -55,7 +56,7 @@ public:
|
||||
void flush() {}
|
||||
void stop();
|
||||
uint8_t connected();
|
||||
|
||||
int lastError(char *buf, const size_t size);
|
||||
void setCACert(const char *rootCA);
|
||||
void setCertificate(const char *client_ca);
|
||||
void setPrivateKey (const char *private_key);
|
||||
|
Reference in New Issue
Block a user