diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2020-05-06 14:34:44 +0300 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2020-05-06 14:34:44 +0300 |
| commit | 9ed0d4c9aed944d6eac72e3f5c98d73ce48e522d (patch) | |
| tree | 642444c83012e8aca7b1416c301ba3463f0f412b | |
| parent | 5e5c703656a93b6b6413bdbe72043c863fb5f224 (diff) | |
| download | nginx-9ed0d4c9aed944d6eac72e3f5c98d73ce48e522d.tar.gz nginx-9ed0d4c9aed944d6eac72e3f5c98d73ce48e522d.tar.bz2 | |
Restored ngx_quic_encrypt return type.
It was inadvertently changed while working on removing memory allocations.
| -rw-r--r-- | src/event/ngx_event_quic_protection.c | 10 | ||||
| -rw-r--r-- | src/event/ngx_event_quic_protection.h | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/event/ngx_event_quic_protection.c b/src/event/ngx_event_quic_protection.c index 354d4f9fa..6af047d40 100644 --- a/src/event/ngx_event_quic_protection.c +++ b/src/event/ngx_event_quic_protection.c @@ -53,9 +53,9 @@ static ngx_int_t ngx_quic_tls_hp(ngx_log_t *log, const EVP_CIPHER *cipher, static ngx_int_t ngx_quic_hkdf_expand(ngx_pool_t *pool, const EVP_MD *digest, ngx_str_t *out, ngx_str_t *label, const uint8_t *prk, size_t prk_len); -static ssize_t ngx_quic_create_long_packet(ngx_quic_header_t *pkt, +static ngx_int_t ngx_quic_create_long_packet(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, ngx_str_t *res); -static ssize_t ngx_quic_create_short_packet(ngx_quic_header_t *pkt, +static ngx_int_t ngx_quic_create_short_packet(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, ngx_str_t *res); @@ -752,7 +752,7 @@ ngx_quic_key_update(ngx_connection_t *c, ngx_quic_secrets_t *current, } -static ssize_t +static ngx_int_t ngx_quic_create_long_packet(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, ngx_str_t *res) { @@ -819,7 +819,7 @@ ngx_quic_create_long_packet(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, } -static ssize_t +static ngx_int_t ngx_quic_create_short_packet(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, ngx_str_t *res) { @@ -944,7 +944,7 @@ ngx_quic_compute_nonce(u_char *nonce, size_t len, uint64_t pn) } -ssize_t +ngx_int_t ngx_quic_encrypt(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, ngx_str_t *res) { diff --git a/src/event/ngx_event_quic_protection.h b/src/event/ngx_event_quic_protection.h index befb7ef66..37d7c37b1 100644 --- a/src/event/ngx_event_quic_protection.h +++ b/src/event/ngx_event_quic_protection.h @@ -40,9 +40,8 @@ int ngx_quic_set_encryption_secret(ngx_pool_t *pool, ngx_ssl_conn_t *ssl_conn, ngx_int_t ngx_quic_key_update(ngx_connection_t *c, ngx_quic_secrets_t *current, ngx_quic_secrets_t *next); -ssize_t ngx_quic_encrypt(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, +ngx_int_t ngx_quic_encrypt(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, ngx_str_t *res); - ngx_int_t ngx_quic_decrypt(ngx_quic_header_t *pkt, ngx_ssl_conn_t *ssl_conn, uint64_t *largest_pn); |
