# HG changeset patch # User Sergey Kandaurov # Date 1608552343 -10800 # Node ID a4c05aff8ec0411d06a3e8458e33d9c08a680a4f # Parent ab6aaa8e86b0555c227acb73d54cf6795463c290 QUIC: converted to SSL_CIPHER_get_protocol_id(). This API is available in BoringSSL for quite some time: https://boringssl.googlesource.com/boringssl/+/3743aaf diff --git a/src/event/ngx_event_quic_protection.c b/src/event/ngx_event_quic_protection.c --- a/src/event/ngx_event_quic_protection.c +++ b/src/event/ngx_event_quic_protection.c @@ -655,11 +655,7 @@ int ngx_quic_keys_set_encryption_secret( peer_secret = is_write ? &keys->secrets[level].server : &keys->secrets[level].client; - /* - * SSL_CIPHER_get_protocol_id() is not universally available, - * casting to uint16_t works for both OpenSSL and BoringSSL - */ - keys->cipher = (uint16_t) SSL_CIPHER_get_id(cipher); + keys->cipher = SSL_CIPHER_get_protocol_id(cipher); key_len = ngx_quic_ciphers(keys->cipher, &ciphers, level);