Skip to content

Commit

Permalink
Reset init state in SSL_process_quic_post_handshake()
Browse files Browse the repository at this point in the history
  • Loading branch information
tmshort committed Aug 30, 2019
1 parent 5d59cf9 commit 81f0ce2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ssl/ssl_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,19 @@ int quic_set_encryption_secrets(SSL *ssl, OSSL_ENCRYPTION_LEVEL level)

int SSL_process_quic_post_handshake(SSL *ssl)
{
int ret;

if (SSL_in_init(ssl) || !SSL_IS_QUIC(ssl)) {
SSLerr(SSL_F_SSL_PROCESS_QUIC_POST_HANDSHAKE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}

ossl_statem_set_in_init(ssl, 1);
ret = ssl->handshake_func(ssl);
ossl_statem_set_in_init(ssl, 0);

if (ssl->handshake_func(ssl) <= 0)
if (ret <= 0)
return 0;

return 1;
}

Expand Down

0 comments on commit 81f0ce2

Please sign in to comment.