Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic_protection.c @ 8260:a4c05aff8ec0 quic
QUIC: converted to SSL_CIPHER_get_protocol_id().
This API is available in BoringSSL for quite some time:
https://boringssl.googlesource.com/boringssl/+/3743aaf
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 21 Dec 2020 15:05:43 +0300 |
parents | dbad2d6d1898 |
children |
comparison
equal
deleted
inserted
replaced
8259:ab6aaa8e86b0 | 8260:a4c05aff8ec0 |
---|---|
653 ngx_quic_ciphers_t ciphers; | 653 ngx_quic_ciphers_t ciphers; |
654 | 654 |
655 peer_secret = is_write ? &keys->secrets[level].server | 655 peer_secret = is_write ? &keys->secrets[level].server |
656 : &keys->secrets[level].client; | 656 : &keys->secrets[level].client; |
657 | 657 |
658 /* | 658 keys->cipher = SSL_CIPHER_get_protocol_id(cipher); |
659 * SSL_CIPHER_get_protocol_id() is not universally available, | |
660 * casting to uint16_t works for both OpenSSL and BoringSSL | |
661 */ | |
662 keys->cipher = (uint16_t) SSL_CIPHER_get_id(cipher); | |
663 | 659 |
664 key_len = ngx_quic_ciphers(keys->cipher, &ciphers, level); | 660 key_len = ngx_quic_ciphers(keys->cipher, &ciphers, level); |
665 | 661 |
666 if (key_len == NGX_ERROR) { | 662 if (key_len == NGX_ERROR) { |
667 ngx_ssl_error(NGX_LOG_INFO, pool->log, 0, "unexpected cipher"); | 663 ngx_ssl_error(NGX_LOG_INFO, pool->log, 0, "unexpected cipher"); |