aboutsummaryrefslogtreecommitdiffstats
path: root/src/sbearssl/sbearssl_run.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbearssl/sbearssl_run.c')
-rw-r--r--src/sbearssl/sbearssl_run.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/sbearssl/sbearssl_run.c b/src/sbearssl/sbearssl_run.c
index 4bd4a8b..9e98884 100644
--- a/src/sbearssl/sbearssl_run.c
+++ b/src/sbearssl/sbearssl_run.c
@@ -125,6 +125,22 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fd, tain const *tto, uint32_
}
state = br_ssl_engine_current_state(ctx) ;
}
+ else if (x[y[1]].revents & IOPAUSE_EXCEPT)
+ {
+ fd_close(fd[1]) ;
+ fd[1] = -1 ;
+ if (fd[2] >= 0)
+ {
+ fd_shutdown(fd[2], 0) ;
+ fd_close(fd[2]) ;
+ fd[2] = -1 ;
+ if (!br_ssl_engine_in_isempty(ctx))
+ {
+ br_ssl_engine_fail(ctx, BR_ERR_IO) ;
+ state = br_ssl_engine_current_state(ctx) ;
+ }
+ }
+ }
/* Flush to remote */
@@ -161,6 +177,17 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fd, tain const *tto, uint32_
}
state = br_ssl_engine_current_state(ctx) ;
}
+ else if (x[y[3]].revents & IOPAUSE_EXCEPT)
+ {
+ fd_shutdown(fd[3], 1) ;
+ fd_close(fd[3]) ;
+ fd[3] = -1 ;
+ if (fd[0] >= 0)
+ {
+ fd_close(fd[0]) ;
+ fd[0] = -1 ;
+ }
+ }
/* Fill from local */