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 */
|
if (dtlsUDP == 0) { /* don't send alert after "break" command */
|
||||||
ret = wolfSSL_shutdown(ssl);
|
ret = wolfSSL_shutdown(ssl);
|
||||||
if (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE)
|
while (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE) {
|
||||||
wolfSSL_shutdown(ssl); /* bidirectional shutdown */
|
ret = wolfSSL_shutdown(ssl); /* bidirectional shutdown */
|
||||||
|
if (ret == WOLFSSL_SUCCESS)
|
||||||
|
printf("Bidirectional shutdown complete\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#if defined(ATOMIC_USER) && !defined(WOLFSSL_AEAD_ONLY)
|
#if defined(ATOMIC_USER) && !defined(WOLFSSL_AEAD_ONLY)
|
||||||
if (atomicUser)
|
if (atomicUser)
|
||||||
|
@@ -2378,9 +2378,13 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
|||||||
|
|
||||||
if (dtlsUDP == 0) {
|
if (dtlsUDP == 0) {
|
||||||
ret = SSL_shutdown(ssl);
|
ret = SSL_shutdown(ssl);
|
||||||
if (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE)
|
while (wc_shutdown && ret == WOLFSSL_SHUTDOWN_NOT_DONE) {
|
||||||
SSL_shutdown(ssl); /* bidirectional shutdown */
|
ret = SSL_shutdown(ssl); /* bidirectional shutdown */
|
||||||
|
if (ret == WOLFSSL_SUCCESS)
|
||||||
|
printf("Bidirectional shutdown complete\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* display collected statistics */
|
/* display collected statistics */
|
||||||
#ifdef WOLFSSL_STATIC_MEMORY
|
#ifdef WOLFSSL_STATIC_MEMORY
|
||||||
if (wolfSSL_is_static_memory(ssl, &ssl_stats) != 1)
|
if (wolfSSL_is_static_memory(ssl, &ssl_stats) != 1)
|
||||||
|
@@ -2188,3 +2188,9 @@
|
|||||||
-v 3
|
-v 3
|
||||||
-l ECDHE-RSA-AES128-SHA256
|
-l ECDHE-RSA-AES128-SHA256
|
||||||
-U
|
-U
|
||||||
|
|
||||||
|
# server with bidirectional shutdown
|
||||||
|
-w
|
||||||
|
|
||||||
|
# client with bidirectional shutdown
|
||||||
|
-w
|
||||||
|
Reference in New Issue
Block a user