mirror of
https://github.com/esp8266/Arduino.git
synced 2025-10-25 18:38:07 +03:00
Add Stream loaders for BearSSL (#7675)
Fixes #7671 Allows for code to do things like read certs from LittleFS or even HTTP connections with code like: File cert = LittleFS.open("/client-crt.pem", "r"); clientCert = new X509List(cert, cert.size()); cert.close();
This commit is contained in:
committed by
GitHub
parent
cfdcff1028
commit
77bd71ec29
@@ -43,6 +43,8 @@ class PublicKey {
|
||||
PublicKey();
|
||||
PublicKey(const char *pemKey);
|
||||
PublicKey(const uint8_t *derKey, size_t derLen);
|
||||
PublicKey(Stream& stream, size_t size);
|
||||
PublicKey(Stream& stream) : PublicKey(stream, stream.available()) { };
|
||||
~PublicKey();
|
||||
|
||||
bool parse(const char *pemKey);
|
||||
@@ -69,6 +71,8 @@ class PrivateKey {
|
||||
PrivateKey();
|
||||
PrivateKey(const char *pemKey);
|
||||
PrivateKey(const uint8_t *derKey, size_t derLen);
|
||||
PrivateKey(Stream& stream, size_t size);
|
||||
PrivateKey(Stream& stream) : PrivateKey(stream, stream.available()) { };
|
||||
~PrivateKey();
|
||||
|
||||
bool parse(const char *pemKey);
|
||||
@@ -98,6 +102,8 @@ class X509List {
|
||||
X509List();
|
||||
X509List(const char *pemCert);
|
||||
X509List(const uint8_t *derCert, size_t derLen);
|
||||
X509List(Stream& stream, size_t size);
|
||||
X509List(Stream& stream) : X509List(stream, stream.available()) { };
|
||||
~X509List();
|
||||
|
||||
bool append(const char *pemCert);
|
||||
|
||||
Reference in New Issue
Block a user