openssl: mark connection for close on TLS close_notify

Without this, detecting and avoid reusing a closed TLS connection
(without a previous GOAWAY) when doing HTTP/2 is tricky.

Reported-by: Tom van der Woerdt
Fixes #3750
Closes #3763
This commit is contained in:
Daniel Stenberg 2019-04-11 17:22:52 +02:00
parent 687cdeb970
commit 3f5da4e59a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 3 additions and 0 deletions

View File

@ -3756,7 +3756,10 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
switch(err) {
case SSL_ERROR_NONE: /* this is not an error */
break;
case SSL_ERROR_ZERO_RETURN: /* no more data */
/* close_notify alert */
connclose(conn, "TLS close_notify");
break;
case SSL_ERROR_WANT_READ:
case SSL_ERROR_WANT_WRITE: