1// Copyright (c) 2010 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef NET_BASE_SSL_CIPHER_SUITE_NAMES_H_ 6#define NET_BASE_SSL_CIPHER_SUITE_NAMES_H_ 7#pragma once 8 9#include "base/basictypes.h" 10 11namespace net { 12 13// SSLCipherSuiteToStrings returns three strings for a given cipher suite 14// number, the name of the key exchange algorithm, the name of the cipher and 15// the name of the MAC. The cipher suite number is the number as sent on the 16// wire and recorded at 17// http://www.iana.org/assignments/tls-parameters/tls-parameters.xml 18// If the cipher suite is unknown, the strings are set to "???". 19void SSLCipherSuiteToStrings(const char** key_exchange_str, 20 const char** cipher_str, const char** mac_str, 21 uint16 cipher_suite); 22 23// SSLCompressionToString returns the name of the compression algorithm 24// specified by |compression_method|, which is the TLS compression id. 25// If the algorithm is unknown, |name| is set to "???". 26void SSLCompressionToString(const char** name, uint8 compression_method); 27 28// SSLVersionToString returns the name of the SSL protocol version 29// specified by |ssl_version|, which is defined in 30// net/base/ssl_connection_status_flags.h. 31// If the version is unknown, |name| is set to "???". 32void SSLVersionToString(const char** name, int ssl_version); 33 34} // namespace net 35 36#endif // NET_BASE_SSL_CIPHER_SUITE_NAMES_H_ 37