Commit cef27cd0 authored by Zonr Chang's avatar Zonr Chang Committed by Facebook Github Bot

Access SSL cipher info with a const reference.

Summary:
BoringSSL returns `const SSL_CIPHER*` from sk_SSL_CIPHER_value().
Closes https://github.com/facebook/folly/pull/492

Reviewed By: yfeldblum

Differential Revision: D4009712

Pulled By: Orvid

fbshipit-source-id: cca2e8cb6aab0a459dca55b8f23ef57fa5c8251f
parent b6dfac67
......@@ -170,9 +170,7 @@ static std::unordered_map<uint16_t, std::string> getOpenSSLCipherNames() {
STACK_OF(SSL_CIPHER)* sk = SSL_get_ciphers(ssl);
for (size_t i = 0; i < (size_t)sk_SSL_CIPHER_num(sk); i++) {
SSL_CIPHER* c;
c = sk_SSL_CIPHER_value(sk, i);
const SSL_CIPHER* c = sk_SSL_CIPHER_value(sk, i);
unsigned long id = SSL_CIPHER_get_id(c);
// OpenSSL 1.0.2 and prior does weird things such as stuff the SSL/TLS
// version into the top 16 bits. Let's ignore those for now. This is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment