mirror of
https://github.com/nginx/nginx.git
synced 2025-06-22 22:10:45 +08:00
ChaCha20 / Poly1305 initial support.
This commit is contained in:
parent
4b59999afe
commit
7e417544bb
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#define NGX_AES_128_GCM_SHA256 0x1301
|
#define NGX_AES_128_GCM_SHA256 0x1301
|
||||||
#define NGX_AES_256_GCM_SHA384 0x1302
|
#define NGX_AES_256_GCM_SHA384 0x1302
|
||||||
|
#define NGX_CHACHA20_POLY1305_SHA256 0x1303
|
||||||
|
|
||||||
#define NGX_QUIC_IV_LEN 12
|
#define NGX_QUIC_IV_LEN 12
|
||||||
|
|
||||||
@ -2122,6 +2123,19 @@ ngx_quic_ciphers(ngx_connection_t *c, ngx_quic_ciphers_t *ciphers,
|
|||||||
len = 32;
|
len = 32;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NGX_CHACHA20_POLY1305_SHA256:
|
||||||
|
#ifdef OPENSSL_IS_BORINGSSL
|
||||||
|
ciphers->c = EVP_aead_chacha20_poly1305();
|
||||||
|
#else
|
||||||
|
ciphers->c = EVP_chacha20_poly1305();
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_IS_BORINGSSL
|
||||||
|
ciphers->hp = EVP_chacha20();
|
||||||
|
#endif
|
||||||
|
ciphers->d = EVP_sha256();
|
||||||
|
len = 32;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user