Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 80fc7eb

Browse files
committed
More missing variables
1 parent 6e5567c commit 80fc7eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/AsyncTCP_TLS_Context.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ int AsyncTCP_TLS_Context::startSSLClient(int sck, const char * host_or_ip, const
183183

184184
int AsyncTCP_TLS_Context::runSSLHandshake(void)
185185
{
186+
int ret, flags;
186187
if (_socket < 0) return -1;
187188

188189
if (handshake_start_time == 0) handshake_start_time = millis();
189-
int ret = mbedtls_ssl_handshake(&ssl_ctx);
190+
ret = mbedtls_ssl_handshake(&ssl_ctx);
190191
if (ret != 0) {
191192
// Something happened before SSL handshake could be completed
192193

@@ -217,6 +218,7 @@ int AsyncTCP_TLS_Context::runSSLHandshake(void)
217218
log_v("Verifying peer X.509 certificate...");
218219

219220
if ((flags = mbedtls_ssl_get_verify_result(&ssl_ctx)) != 0) {
221+
char buf[512];
220222
memset(buf, 0, sizeof(buf));
221223
mbedtls_x509_crt_verify_info(buf, sizeof(buf), " ! ", flags);
222224
log_e("Failed to verify peer certificate! verification info: %s", buf);

0 commit comments

Comments
 (0)