Add SSL client certificate support (#572)

* Add client certificate support

allows WiFiClientSecureBearSSL users to use client certificate and private key for the WebSocker.
also added SSL functions for socket.io
This commit is contained in:
itay7564
2020-10-26 18:01:31 +02:00
committed by GitHub
parent 5caff59f7f
commit 80bf087cd0
5 changed files with 88 additions and 12 deletions

View File

@ -90,6 +90,10 @@ void setup() {
delay(100);
}
//When using BearSSL, client certificate and private key can be set:
//webSocket.setSSLClientCertKey(clientCert, clientPrivateKey);
//clientCert and clientPrivateKey can be of types (const char *, const char *) , or of types (BearSSL::X509List, BearSSL::PrivateKey)
webSocket.beginSslWithCA("echo.websocket.org", 443, "/", ENDPOINT_CA_CERT);
webSocket.onEvent(webSocketEvent);
}