Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
4ce2cc3c
Unverified
Commit
4ce2cc3c
authored
Sep 16, 2019
by
Me No Dev
Committed by
GitHub
Sep 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HTTP Client with SSL (#3216)
parent
07390157
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
libraries/WiFi/src/WiFiClient.h
libraries/WiFi/src/WiFiClient.h
+9
-1
libraries/WiFiClientSecure/src/WiFiClientSecure.h
libraries/WiFiClientSecure/src/WiFiClientSecure.h
+2
-0
libraries/WiFiClientSecure/src/ssl_client.cpp
libraries/WiFiClientSecure/src/ssl_client.cpp
+6
-3
No files found.
libraries/WiFi/src/WiFiClient.h
View file @
4ce2cc3c
...
...
@@ -28,7 +28,15 @@
class
WiFiClientSocketHandle
;
class
WiFiClientRxBuffer
;
class
WiFiClient
:
public
Client
class
ESPLwIPClient
:
public
Client
{
public:
virtual
int
connect
(
IPAddress
ip
,
uint16_t
port
,
int32_t
timeout
)
=
0
;
virtual
int
connect
(
const
char
*
host
,
uint16_t
port
,
int32_t
timeout
)
=
0
;
virtual
int
setTimeout
(
uint32_t
seconds
)
=
0
;
};
class
WiFiClient
:
public
ESPLwIPClient
{
protected:
std
::
shared_ptr
<
WiFiClientSocketHandle
>
clientSocketHandle
;
...
...
libraries/WiFiClientSecure/src/WiFiClientSecure.h
View file @
4ce2cc3c
...
...
@@ -72,6 +72,8 @@ public:
bool
verify
(
const
char
*
fingerprint
,
const
char
*
domain_name
);
void
setHandshakeTimeout
(
unsigned
long
handshake_timeout
);
int
setTimeout
(
uint32_t
seconds
){
return
0
;
}
operator
bool
()
{
return
connected
();
...
...
libraries/WiFiClientSecure/src/ssl_client.cpp
View file @
4ce2cc3c
...
...
@@ -22,7 +22,7 @@
const
char
*
pers
=
"esp32-tls"
;
static
int
handle_error
(
int
err
)
static
int
_handle_error
(
int
err
,
const
char
*
file
,
int
line
)
{
if
(
err
==
-
30848
){
return
err
;
...
...
@@ -30,12 +30,15 @@ static int handle_error(int err)
#ifdef MBEDTLS_ERROR_C
char
error_buf
[
100
];
mbedtls_strerror
(
err
,
error_buf
,
100
);
log_e
(
"%s"
,
error_buf
);
log_e
(
"[%s():%d]: (%d) %s"
,
file
,
line
,
err
,
error_buf
);
#else
log_e
(
"[%s():%d]: code %d"
,
file
,
line
,
err
);
#endif
log_e
(
"MbedTLS message code: %d"
,
err
);
return
err
;
}
#define handle_error(e) _handle_error(e, __FUNCTION__, __LINE__)
void
ssl_init
(
sslclient_context
*
ssl_client
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment