* creating, using and closing TLS/SSL connections
* using wolfSSL.
*
- * Copyright : Copyright (C) 2018-2021 by Fabian Keil <fk@fabiankeil.de>
+ * Copyright : Copyright (C) 2018-2024 by Fabian Keil <fk@fabiankeil.de>
* Copyright (C) 2020 Maxim Antonov <mantonov@gmail.com>
* Copyright (C) 2017 Vaclav Svec. FIT CVUT.
*
int shutdown_attempts = 0;
int ret;
int fd;
- enum { MAX_SHUTDOWN_ATTEMPTS = 2 };
+ enum { MAX_SHUTDOWN_ATTEMPTS = 5 };
fd = wolfSSL_get_fd(ssl);
return;
}
ret = wolfSSL_shutdown(ssl);
+ shutdown_attempts++;
if (WOLFSSL_SUCCESS != ret)
{
- shutdown_attempts++;
log_error(LOG_LEVEL_CONNECT, "Failed to shutdown %s connection "
"on socket %d. Attempts so far: %d, ret: %d", type, fd,
shutdown_attempts, ret);
{
long verify_result = wolfSSL_get_error(ssl, connect_ret);
-#ifdef X509_V_OK
- if (verify_result == X509_V_OK)
-#else
+#if LIBWOLFSSL_VERSION_HEX > 0x05005004
if (verify_result == WOLFSSL_X509_V_OK)
+#else
+ if (verify_result == X509_V_OK)
#endif
{
ret = 0;