summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_protection.h
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2023-10-20 18:05:07 +0400
committerSergey Kandaurov <pluknet@nginx.com>2023-10-20 18:05:07 +0400
commitb94f1fbee375eaceebf0cf0645ff83ae1966e55a (patch)
tree43ea12c73e75841510efc7bfe5ed3f76868e8a90 /src/event/quic/ngx_event_quic_protection.h
parent01bd8cacebafedf4540bc97d040ddc644aaa5418 (diff)
downloadnginx-b94f1fbee375eaceebf0cf0645ff83ae1966e55a.tar.gz
nginx-b94f1fbee375eaceebf0cf0645ff83ae1966e55a.tar.bz2
QUIC: removed key field from ngx_quic_secret_t.
It is made local as it is only needed now when creating crypto context. BoringSSL lacks EVP interface for ChaCha20, providing instead a function for one-shot encryption, thus hp is still preserved. Based on a patch by Roman Arutyunyan.
Diffstat (limited to 'src/event/quic/ngx_event_quic_protection.h')
-rw-r--r--src/event/quic/ngx_event_quic_protection.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/event/quic/ngx_event_quic_protection.h b/src/event/quic/ngx_event_quic_protection.h
index a77c257f0..34cfee61b 100644
--- a/src/event/quic/ngx_event_quic_protection.h
+++ b/src/event/quic/ngx_event_quic_protection.h
@@ -47,7 +47,6 @@ typedef struct {
typedef struct {
ngx_quic_md_t secret;
- ngx_quic_md_t key;
ngx_quic_iv_t iv;
ngx_quic_md_t hp;
ngx_quic_crypto_ctx_t *ctx;
@@ -110,7 +109,7 @@ ngx_int_t ngx_quic_decrypt(ngx_quic_header_t *pkt, uint64_t *largest_pn);
void ngx_quic_compute_nonce(u_char *nonce, size_t len, uint64_t pn);
ngx_int_t ngx_quic_ciphers(ngx_uint_t id, ngx_quic_ciphers_t *ciphers);
ngx_int_t ngx_quic_crypto_init(const ngx_quic_cipher_t *cipher,
- ngx_quic_secret_t *s, ngx_int_t enc, ngx_log_t *log);
+ ngx_quic_secret_t *s, ngx_quic_md_t *key, ngx_int_t enc, ngx_log_t *log);
ngx_int_t ngx_quic_crypto_seal(ngx_quic_secret_t *s, ngx_str_t *out,
u_char *nonce, ngx_str_t *in, ngx_str_t *ad, ngx_log_t *log);
void ngx_quic_crypto_cleanup(ngx_quic_secret_t *s);