Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_openssl_compat.c @ 9175:f7c9cd726298
QUIC: cleaned up now unused ngx_quic_ciphers() calls.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 20 Oct 2023 18:05:07 +0400 |
parents | 4ccb0d973206 |
children | 8dacf87e4007 |
comparison
equal
deleted
inserted
replaced
9174:31702c53d2db | 9175:f7c9cd726298 |
---|---|
580 | 580 |
581 | 581 |
582 static ngx_int_t | 582 static ngx_int_t |
583 ngx_quic_compat_create_record(ngx_quic_compat_record_t *rec, ngx_str_t *res) | 583 ngx_quic_compat_create_record(ngx_quic_compat_record_t *rec, ngx_str_t *res) |
584 { | 584 { |
585 ngx_str_t ad, out; | 585 ngx_str_t ad, out; |
586 ngx_quic_secret_t *secret; | 586 ngx_quic_secret_t *secret; |
587 ngx_quic_ciphers_t ciphers; | 587 u_char nonce[NGX_QUIC_IV_LEN]; |
588 u_char nonce[NGX_QUIC_IV_LEN]; | |
589 | 588 |
590 ad.data = res->data; | 589 ad.data = res->data; |
591 ad.len = ngx_quic_compat_create_header(rec, ad.data, 0); | 590 ad.len = ngx_quic_compat_create_header(rec, ad.data, 0); |
592 | 591 |
593 out.len = rec->payload.len + NGX_QUIC_TAG_LEN; | 592 out.len = rec->payload.len + NGX_QUIC_TAG_LEN; |
596 #ifdef NGX_QUIC_DEBUG_CRYPTO | 595 #ifdef NGX_QUIC_DEBUG_CRYPTO |
597 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, rec->log, 0, | 596 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, rec->log, 0, |
598 "quic compat ad len:%uz %xV", ad.len, &ad); | 597 "quic compat ad len:%uz %xV", ad.len, &ad); |
599 #endif | 598 #endif |
600 | 599 |
601 if (ngx_quic_ciphers(rec->keys->cipher, &ciphers, rec->level) == NGX_ERROR) | |
602 { | |
603 return NGX_ERROR; | |
604 } | |
605 | |
606 secret = &rec->keys->secret; | 600 secret = &rec->keys->secret; |
607 | 601 |
608 ngx_memcpy(nonce, secret->iv.data, secret->iv.len); | 602 ngx_memcpy(nonce, secret->iv.data, secret->iv.len); |
609 ngx_quic_compute_nonce(nonce, sizeof(nonce), rec->number); | 603 ngx_quic_compute_nonce(nonce, sizeof(nonce), rec->number); |
610 | 604 |