mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
Fix a bug in Renegotiation extension construction
The conversion to WPACKET broke the construction of the renegotiation extension. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
0086ca4e9b
commit
2f97192c78
@ -1040,8 +1040,10 @@ int ssl_add_clienthello_tlsext(SSL *s, WPACKET *pkt, int *al)
|
||||
/* Add RI if renegotiating */
|
||||
if (s->renegotiate) {
|
||||
if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
|
||||
|| !WPACKET_sub_memcpy_u16(pkt, s->s3->previous_client_finished,
|
||||
s->s3->previous_client_finished_len)) {
|
||||
|| !WPACKET_start_sub_packet_u16(pkt)
|
||||
|| !WPACKET_sub_memcpy_u8(pkt, s->s3->previous_client_finished,
|
||||
s->s3->previous_client_finished_len)
|
||||
|| !WPACKET_close(pkt)) {
|
||||
SSLerr(SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT, ERR_R_INTERNAL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user