forked from wolfSSL/wolfssl
Tests and examples for bidirectional shutdown
This commit is contained in:
@@ -3045,8 +3045,11 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
|
||||
if (dtlsUDP == 0) { /* don't send alert after "break" command */
|
||||
ret = wolfSSL_shutdown(ssl);
|
||||
if (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE)
|
||||
wolfSSL_shutdown(ssl); /* bidirectional shutdown */
|
||||
while (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE) {
|
||||
ret = wolfSSL_shutdown(ssl); /* bidirectional shutdown */
|
||||
if (ret == WOLFSSL_SUCCESS)
|
||||
printf("Bidirectional shutdown complete\n");
|
||||
}
|
||||
}
|
||||
#if defined(ATOMIC_USER) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
if (atomicUser)
|
||||
|
@@ -2378,9 +2378,13 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
|
||||
if (dtlsUDP == 0) {
|
||||
ret = SSL_shutdown(ssl);
|
||||
if (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE)
|
||||
SSL_shutdown(ssl); /* bidirectional shutdown */
|
||||
while (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE) {
|
||||
ret = SSL_shutdown(ssl); /* bidirectional shutdown */
|
||||
if (ret == WOLFSSL_SUCCESS)
|
||||
printf("Bidirectional shutdown complete\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* display collected statistics */
|
||||
#ifdef WOLFSSL_STATIC_MEMORY
|
||||
if (wolfSSL_is_static_memory(ssl, &ssl_stats) != 1)
|
||||
|
@@ -2188,3 +2188,9 @@
|
||||
-v 3
|
||||
-l ECDHE-RSA-AES128-SHA256
|
||||
-U
|
||||
|
||||
# server with bidirectional shutdown
|
||||
-w
|
||||
|
||||
# client with bidirectional shutdown
|
||||
-w
|
||||
|
Reference in New Issue
Block a user