mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-23 19:21:59 +03:00
Move BearSSLHelpers into BearSSL namespace (#5315)
BearSSLX509List, BearSSLSession, BearSSLPublicKey, and BearSSLPrivateKey were all in the global namespace and not in the BearSSL:: one, due to an oversight when they were originally created. Move them to the proper namespace with the following mapping: BearSSLX509List => BearSSL::X509List BearSSLSession => BearSSL::Session BearSSLPublicKey => BearSSL::PublicKey BearSSLPrivateKey => BearSSL::PrivateKey
This commit is contained in:
committed by
GitHub
parent
a42c3c399b
commit
233d3e3b5e
@ -43,14 +43,14 @@ class WiFiServerSecure : public WiFiServer {
|
||||
|
||||
// Set the server's RSA key and x509 certificate (required, pick one).
|
||||
// Caller needs to preserve the chain and key throughout the life of the server.
|
||||
void setRSACert(const BearSSLX509List *chain, const BearSSLPrivateKey *sk);
|
||||
void setRSACert(const X509List *chain, const PrivateKey *sk);
|
||||
// Set the server's EC key and x509 certificate (required, pick one)
|
||||
// Caller needs to preserve the chain and key throughout the life of the server.
|
||||
void setECCert(const BearSSLX509List *chain, unsigned cert_issuer_key_type, const BearSSLPrivateKey *sk);
|
||||
void setECCert(const X509List *chain, unsigned cert_issuer_key_type, const PrivateKey *sk);
|
||||
|
||||
// Require client certificates validated against the passed in x509 trust anchor
|
||||
// Caller needs to preserve the cert throughout the life of the server.
|
||||
void setClientTrustAnchor(const BearSSLX509List *client_CA_ta) {
|
||||
void setClientTrustAnchor(const X509List *client_CA_ta) {
|
||||
_client_CA_ta = client_CA_ta;
|
||||
}
|
||||
|
||||
@ -62,12 +62,12 @@ class WiFiServerSecure : public WiFiServer {
|
||||
void setServerKeyAndCert_P(const uint8_t *key, int keyLen, const uint8_t *cert, int certLen);
|
||||
|
||||
private:
|
||||
const BearSSLX509List *_chain = nullptr;
|
||||
const X509List *_chain = nullptr;
|
||||
unsigned _cert_issuer_key_type = 0;
|
||||
const BearSSLPrivateKey *_sk = nullptr;
|
||||
const PrivateKey *_sk = nullptr;
|
||||
int _iobuf_in_size = BR_SSL_BUFSIZE_INPUT;
|
||||
int _iobuf_out_size = 837;
|
||||
const BearSSLX509List *_client_CA_ta = nullptr;
|
||||
const X509List *_client_CA_ta = nullptr;
|
||||
bool _deleteChainAndKey = false;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user