diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-10-26 00:41:36 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-10-26 15:53:41 +0100 |
commit | fd3cf789304c68aec6def76b24f61ea840c1a919 (patch) | |
tree | 7f6e582b61c27b2dcd523d2cd4008a63a9b135f3 /test/src/client.c | |
parent | 48224640cb97b694c3ea2f159c3e60d64598ba65 (diff) |
Testsuite: variances for OpenSSL 1.1.1
Diffstat (limited to 'test/src/client.c')
-rw-r--r-- | test/src/client.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/src/client.c b/test/src/client.c index de36ef065..c143739d0 100644 --- a/test/src/client.c +++ b/test/src/client.c @@ -578,18 +578,24 @@ nextinput: case SSL_ERROR_ZERO_RETURN: break; case SSL_ERROR_SYSCALL: - printf("%s\n", ERR_error_string(ERR_get_error(), NULL)); break; + printf("%s\n", ERR_error_string(ERR_get_error(), NULL)); rc = -1; + break; case SSL_ERROR_SSL: - printf("%s\n", ERR_error_string(ERR_get_error(), NULL)); break; + printf("%s\nTLS terminated\n", ERR_error_string(ERR_get_error(), NULL)); SSL_shutdown(srv->ssl); SSL_free(srv->ssl); srv->tls_active = FALSE; + { /* OpenSSL leaves it in restartsys mode */ + struct sigaction act = {.sa_handler = sigalrm_handler_flag, .sa_flags = 0}; + sigalrm_seen = 1; + sigaction(SIGALRM, &act, NULL); + } + *inptr = 0; goto nextinput; default: printf("SSL error code %d\n", error); } - #endif #ifdef HAVE_GNUTLS rc = gnutls_record_recv(tls_session, CS inbuffer, bsiz - 1); @@ -601,6 +607,8 @@ nextinput: if (rc < 0) { + if (errno == EINTR && sigalrm_seen && resp_optional) + continue; /* next scriptline */ printf("Read error %s\n", strerror(errno)); exit(81); } |