* 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.
*
* doesn't matter because we only use it with
* the certificate_mutex locked.
*/
-static RNG wolfssl_rng;
+static WC_RNG wolfssl_rng;
#ifndef WOLFSSL_ALT_CERT_CHAINS
/*
*********************************************************************/
static int host_to_hash(struct client_state *csp)
{
- Md5 md5;
+ wc_Md5 md5;
int ret;
size_t i;
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);
+#if LIBWOLFSSL_VERSION_HEX > 0x05005004
if (verify_result == WOLFSSL_X509_V_OK)
+#else
+ if (verify_result == X509_V_OK)
+#endif
{
ret = 0;
csp->server_cert_verification_result = SSL_CERT_VALID;
}
#ifndef WOLFSSL_ALT_NAMES
-#error wolfSSL lacks Subject Alternative Name support
+#error wolfSSL lacks Subject Alternative Name support (WOLFSSL_ALT_NAMES) which is mandatory
#endif
/*********************************************************************
*