Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_output.c @ 9025:e50f77a2d0b0 quic
QUIC: removed ngx_quic_keys_new().
The ngx_quic_keys_t structure is now exposed.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 27 Jul 2022 17:31:16 +0400 |
parents | f2925c80401c |
children | 3550b00d9dc8 |
comparison
equal
deleted
inserted
replaced
9024:f2925c80401c | 9025:e50f77a2d0b0 |
---|---|
926 ngx_quic_send_early_cc(ngx_connection_t *c, ngx_quic_header_t *inpkt, | 926 ngx_quic_send_early_cc(ngx_connection_t *c, ngx_quic_header_t *inpkt, |
927 ngx_uint_t err, const char *reason) | 927 ngx_uint_t err, const char *reason) |
928 { | 928 { |
929 ssize_t len; | 929 ssize_t len; |
930 ngx_str_t res; | 930 ngx_str_t res; |
931 ngx_quic_keys_t keys; | |
931 ngx_quic_frame_t frame; | 932 ngx_quic_frame_t frame; |
932 ngx_quic_header_t pkt; | 933 ngx_quic_header_t pkt; |
933 | 934 |
934 static u_char src[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE]; | 935 static u_char src[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE]; |
935 static u_char dst[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE]; | 936 static u_char dst[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE]; |
954 len = ngx_quic_create_frame(src, &frame); | 955 len = ngx_quic_create_frame(src, &frame); |
955 if (len == -1) { | 956 if (len == -1) { |
956 return NGX_ERROR; | 957 return NGX_ERROR; |
957 } | 958 } |
958 | 959 |
959 pkt.keys = ngx_quic_keys_new(c->pool); | 960 ngx_memzero(&keys, sizeof(ngx_quic_keys_t)); |
960 if (pkt.keys == NULL) { | 961 |
961 return NGX_ERROR; | 962 pkt.keys = &keys; |
962 } | |
963 | 963 |
964 if (ngx_quic_keys_set_initial_secret(pkt.keys, &inpkt->dcid, c->log) | 964 if (ngx_quic_keys_set_initial_secret(pkt.keys, &inpkt->dcid, c->log) |
965 != NGX_OK) | 965 != NGX_OK) |
966 { | 966 { |
967 return NGX_ERROR; | 967 return NGX_ERROR; |