mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-17 06:42:21 +03:00
Add SSL Session capability to speed reconnections (#5160)
SSL Sessions enable most of the SSL handshake to be skipped when both client and server agree to use them. Add a BearSSLSession class and an optional setting to the SSL client to enable this. Note that SSL sessions are unrelated to HTTP sessions. They are ephemeral and only relate to the SSL parameters, not anything at the HTTP protocol level.
This commit is contained in:
committed by
GitHub
parent
8e11836378
commit
6314093fe5
@@ -119,4 +119,21 @@ class BearSSLX509List {
|
||||
br_x509_trust_anchor *_ta;
|
||||
};
|
||||
|
||||
// Opaque object which wraps the BearSSL SSL session to make repeated connections
|
||||
// significantly faster. Completely optional.
|
||||
namespace BearSSL {
|
||||
class WiFiClientSecure;
|
||||
};
|
||||
|
||||
class BearSSLSession {
|
||||
friend class BearSSL::WiFiClientSecure;
|
||||
|
||||
public:
|
||||
BearSSLSession() { memset(&_session, 0, sizeof(_session)); }
|
||||
private:
|
||||
br_ssl_session_parameters *getSession() { return &_session; }
|
||||
// The actual BearSSL ession information
|
||||
br_ssl_session_parameters _session;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user