Fixed CRYPTO offset generation.
This commit is contained in:
parent
457e579896
commit
02a2cbf438
1 changed files with 6 additions and 0 deletions
|
@ -45,6 +45,9 @@ struct ngx_quic_connection_s {
|
|||
|
||||
ngx_quic_streams_t streams;
|
||||
ngx_uint_t max_data;
|
||||
|
||||
#define SSL_ECRYPTION_LAST ((ssl_encryption_application) + 1)
|
||||
uint64_t crypto_offset[SSL_ECRYPTION_LAST];
|
||||
};
|
||||
|
||||
|
||||
|
@ -228,9 +231,12 @@ ngx_quic_add_handshake_data(ngx_ssl_conn_t *ssl_conn,
|
|||
|
||||
frame->level = level;
|
||||
frame->type = NGX_QUIC_FT_CRYPTO;
|
||||
frame->u.crypto.offset += qc->crypto_offset[level];
|
||||
frame->u.crypto.len = len;
|
||||
frame->u.crypto.data = p;
|
||||
|
||||
qc->crypto_offset[level] += len;
|
||||
|
||||
ngx_sprintf(frame->info, "crypto, generated by SSL len=%ui level=%d", len, level);
|
||||
|
||||
ngx_quic_queue_frame(qc, frame);
|
||||
|
|
Loading…
Reference in a new issue