summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_openssl_compat.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-06-09 10:25:54 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-06-09 10:25:54 +0400
commit58c11ee714856cfe62bd52d9b2d0a52401c1abfc (patch)
tree397f4f6368eb2d60a204f48099ea7813ddca6d0a /src/event/quic/ngx_event_quic_openssl_compat.c
parent8b28fd7f26fe046007e8eb90ad7120ae033b7c58 (diff)
downloadnginx-58c11ee714856cfe62bd52d9b2d0a52401c1abfc.tar.gz
nginx-58c11ee714856cfe62bd52d9b2d0a52401c1abfc.tar.bz2
QUIC: a new constant for AEAD tag length.
Previously used constant EVP_GCM_TLS_TAG_LEN had misleading name since it was used not only with GCM, but also with CHACHAPOLY. Now a new constant NGX_QUIC_TAG_LEN introduced. Luckily all AEAD algorithms used by QUIC have the same tag length of 16.
Diffstat (limited to 'src/event/quic/ngx_event_quic_openssl_compat.c')
-rw-r--r--src/event/quic/ngx_event_quic_openssl_compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/quic/ngx_event_quic_openssl_compat.c b/src/event/quic/ngx_event_quic_openssl_compat.c
index 63d380e35..318feda10 100644
--- a/src/event/quic/ngx_event_quic_openssl_compat.c
+++ b/src/event/quic/ngx_event_quic_openssl_compat.c
@@ -445,7 +445,7 @@ SSL_provide_quic_data(SSL *ssl, enum ssl_encryption_level_t level,
u_char in[NGX_QUIC_COMPAT_RECORD_SIZE + 1];
u_char out[NGX_QUIC_COMPAT_RECORD_SIZE + 1
+ SSL3_RT_HEADER_LENGTH
- + EVP_GCM_TLS_TAG_LEN];
+ + NGX_QUIC_TAG_LEN];
c = ngx_ssl_get_connection(ssl);
@@ -528,7 +528,7 @@ ngx_quic_compat_create_header(ngx_quic_compat_record_t *rec, u_char *out,
} else {
type = SSL3_RT_APPLICATION_DATA;
- len += EVP_GCM_TLS_TAG_LEN;
+ len += NGX_QUIC_TAG_LEN;
}
out[0] = type;
@@ -552,7 +552,7 @@ ngx_quic_compat_create_record(ngx_quic_compat_record_t *rec, ngx_str_t *res)
ad.data = res->data;
ad.len = ngx_quic_compat_create_header(rec, ad.data, 0);
- out.len = rec->payload.len + EVP_GCM_TLS_TAG_LEN;
+ out.len = rec->payload.len + NGX_QUIC_TAG_LEN;
out.data = res->data + ad.len;
#ifdef NGX_QUIC_DEBUG_CRYPTO