mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-12-18 13:06:55 +01:00
Support Arduino >=3.x for custom network client (#954)
Support Arduino >=3.x for custom network client
This commit is contained in:
@@ -158,11 +158,20 @@ void WebSocketsNetworkClientSecure::setCACert(const char *rootCA) {
|
|||||||
Serial.println(_impl->no_interface_error_);
|
Serial.println(_impl->no_interface_error_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 4)
|
||||||
|
void WebSocketsNetworkClientSecure::setCACertBundle(const uint8_t *bundle,
|
||||||
|
size_t bundle_size) {
|
||||||
|
#else
|
||||||
void WebSocketsNetworkClientSecure::setCACertBundle(const uint8_t *bundle) {
|
void WebSocketsNetworkClientSecure::setCACertBundle(const uint8_t *bundle) {
|
||||||
|
#endif
|
||||||
if (_impl->gsm_client_secure_) {
|
if (_impl->gsm_client_secure_) {
|
||||||
return _impl->gsm_client_secure_->setCACertBundle(bundle);
|
return _impl->gsm_client_secure_->setCACertBundle(bundle);
|
||||||
} else if (_impl->wifi_client_secure_) {
|
} else if (_impl->wifi_client_secure_) {
|
||||||
|
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 4)
|
||||||
|
return _impl->wifi_client_secure_->setCACertBundle(bundle, bundle_size);
|
||||||
|
#else
|
||||||
return _impl->wifi_client_secure_->setCACertBundle(bundle);
|
return _impl->wifi_client_secure_->setCACertBundle(bundle);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
Serial.println(_impl->no_interface_error_);
|
Serial.println(_impl->no_interface_error_);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,5 +21,5 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Links2004/arduinoWebSockets.git"
|
"url": "https://github.com/Links2004/arduinoWebSockets.git"
|
||||||
},
|
},
|
||||||
"version": "2.7.0"
|
"version": "2.7.1"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
name=WebSockets
|
name=WebSockets
|
||||||
version=2.7.0
|
version=2.7.1
|
||||||
author=Markus Sattler
|
author=Markus Sattler
|
||||||
maintainer=Markus Sattler
|
maintainer=Markus Sattler
|
||||||
sentence=WebSockets for Arduino (Server + Client)
|
sentence=WebSockets for Arduino (Server + Client)
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ class WebSocketsNetworkClientSecure : public WebSocketsNetworkClient {
|
|||||||
operator bool() override;
|
operator bool() override;
|
||||||
|
|
||||||
void setCACert(const char * rootCA);
|
void setCACert(const char * rootCA);
|
||||||
|
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 4)
|
||||||
|
void setCACertBundle(const uint8_t * bundle, size_t bundle_size);
|
||||||
|
#else
|
||||||
void setCACertBundle(const uint8_t * bundle);
|
void setCACertBundle(const uint8_t * bundle);
|
||||||
|
#endif
|
||||||
void setInsecure();
|
void setInsecure();
|
||||||
bool verify(const char * fingerprint, const char * domain_name);
|
bool verify(const char * fingerprint, const char * domain_name);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,12 +25,12 @@
|
|||||||
#ifndef WEBSOCKETSVERSION_H_
|
#ifndef WEBSOCKETSVERSION_H_
|
||||||
#define WEBSOCKETSVERSION_H_
|
#define WEBSOCKETSVERSION_H_
|
||||||
|
|
||||||
#define WEBSOCKETS_VERSION "2.7.0"
|
#define WEBSOCKETS_VERSION "2.7.1"
|
||||||
|
|
||||||
#define WEBSOCKETS_VERSION_MAJOR 2
|
#define WEBSOCKETS_VERSION_MAJOR 2
|
||||||
#define WEBSOCKETS_VERSION_MINOR 7
|
#define WEBSOCKETS_VERSION_MINOR 7
|
||||||
#define WEBSOCKETS_VERSION_PATCH 0
|
#define WEBSOCKETS_VERSION_PATCH 1
|
||||||
|
|
||||||
#define WEBSOCKETS_VERSION_INT 2007000
|
#define WEBSOCKETS_VERSION_INT 2007001
|
||||||
|
|
||||||
#endif /* WEBSOCKETSVERSION_H_ */
|
#endif /* WEBSOCKETSVERSION_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user