Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic_protection.c @ 8212:05b1ee464350 quic
QUIC: hide header creation internals in ngx_event_quic_transport.c.
It doesn't make sense to expose the header type in a public function.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 17 Nov 2020 21:32:06 +0000 |
parents | 9c3be23ddbe7 |
children | 5fdd0ef42232 |
comparison
equal
deleted
inserted
replaced
8211:fe53def49945 | 8212:05b1ee464350 |
---|---|
835 u_char nonce[12], mask[16]; | 835 u_char nonce[12], mask[16]; |
836 | 836 |
837 out.len = pkt->payload.len + EVP_GCM_TLS_TAG_LEN; | 837 out.len = pkt->payload.len + EVP_GCM_TLS_TAG_LEN; |
838 | 838 |
839 ad.data = res->data; | 839 ad.data = res->data; |
840 ad.len = ngx_quic_create_long_header(pkt, ad.data, out.len, &pnp); | 840 ad.len = ngx_quic_create_header(pkt, ad.data, out.len, &pnp); |
841 | 841 |
842 out.data = res->data + ad.len; | 842 out.data = res->data + ad.len; |
843 | 843 |
844 #ifdef NGX_QUIC_DEBUG_CRYPTO | 844 #ifdef NGX_QUIC_DEBUG_CRYPTO |
845 ngx_quic_hexdump(pkt->log, "quic ad", ad.data, ad.len); | 845 ngx_quic_hexdump(pkt->log, "quic ad", ad.data, ad.len); |
893 u_char nonce[12], mask[16]; | 893 u_char nonce[12], mask[16]; |
894 | 894 |
895 out.len = pkt->payload.len + EVP_GCM_TLS_TAG_LEN; | 895 out.len = pkt->payload.len + EVP_GCM_TLS_TAG_LEN; |
896 | 896 |
897 ad.data = res->data; | 897 ad.data = res->data; |
898 ad.len = ngx_quic_create_short_header(pkt, ad.data, out.len, &pnp); | 898 ad.len = ngx_quic_create_header(pkt, ad.data, out.len, &pnp); |
899 | 899 |
900 out.data = res->data + ad.len; | 900 out.data = res->data + ad.len; |
901 | 901 |
902 #ifdef NGX_QUIC_DEBUG_CRYPTO | 902 #ifdef NGX_QUIC_DEBUG_CRYPTO |
903 ngx_quic_hexdump(pkt->log, "quic ad", ad.data, ad.len); | 903 ngx_quic_hexdump(pkt->log, "quic ad", ad.data, ad.len); |