mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-04 00:31:11 +00:00
Fix message_seq with server-initiated renego
This commit is contained in:
parent
c392b240c4
commit
0557bd5fa4
|
@ -4550,6 +4550,17 @@ static int ssl_start_renegotiation( ssl_context *ssl )
|
|||
if( ( ret = ssl_handshake_init( ssl ) ) != 0 )
|
||||
return( ret );
|
||||
|
||||
/* RFC 6347 4.2.2: "[...] the HelloRequest will have message_seq = 0 and
|
||||
* the ServerHello will have message_seq = 1" */
|
||||
#if defined(POLARSSL_SSL_PROTO_DTLS)
|
||||
if( ssl->transport == SSL_TRANSPORT_DATAGRAM &&
|
||||
ssl->endpoint == SSL_IS_SERVER &&
|
||||
ssl->renegotiation == SSL_RENEGOTIATION_PENDING )
|
||||
{
|
||||
ssl->handshake->msg_seq = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
ssl->state = SSL_HELLO_REQUEST;
|
||||
ssl->renegotiation = SSL_RENEGOTIATION;
|
||||
|
||||
|
|
Loading…
Reference in a new issue