Revert of Change WebRTC SslCipher to be exposed as number only. (patchset #20 id:750001 of https://codereview.webrtc.org/1337673002/ )

Reason for revert:
This broke chromium.fyi bot.

Original issue's description:
> Change WebRTC SslCipher to be exposed as number only.
>
> This makes the SSL exposed as uint16_t which is the IANA value. GetRfcSslCipherName is introduced to handle the conversion to names from ID. IANA value will be used for UMA reporting. Names will still be used for WebRTC stats reporting.
>
> For SRTP, currently it's still string internally but is reported as IANA number.
>
> This is used by the ongoing CL https://codereview.chromium.org/1335023002.
>
> BUG=523033
>
> Committed: https://crrev.com/4fe3c9a77386598db9abd1f0d6983aefee9cc943
> Cr-Commit-Position: refs/heads/master@{#10124}

TBR=juberti@webrtc.org,rsleevi@chromium.org,pthatcher@webrtc.org,davidben@chromium.org,juberti@google.com,davidben@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=523033

Review URL: https://codereview.webrtc.org/1380603005

Cr-Commit-Position: refs/heads/master@{#10125}
This commit is contained in:
guoweis
2015-09-30 19:23:09 -07:00
committed by Commit bot
parent 4fe3c9a773
commit 27dc29b0df
30 changed files with 275 additions and 320 deletions

View File

@ -87,10 +87,12 @@ class OpenSSLStreamAdapter : public SSLStreamAdapter {
void Close() override;
StreamState GetState() const override;
// TODO(guoweis): Move this away from a static class method.
static std::string GetSslCipherSuiteName(uint16_t cipher);
#ifndef OPENSSL_IS_BORINGSSL
// Return the RFC (5246, 3268, etc.) cipher name for an OpenSSL cipher.
static const char* GetRfcSslCipherName(const SSL_CIPHER* cipher);
#endif
bool GetSslCipherSuite(uint16_t* cipher) override;
bool GetSslCipher(std::string* cipher) override;
// Key Extractor interface
bool ExportKeyingMaterial(const std::string& label,
@ -108,10 +110,8 @@ class OpenSSLStreamAdapter : public SSLStreamAdapter {
static bool HaveDtls();
static bool HaveDtlsSrtp();
static bool HaveExporter();
// TODO(guoweis): Move this away from a static class method.
static uint16_t GetDefaultSslCipherForTest(SSLProtocolVersion version,
KeyType key_type);
static std::string GetDefaultSslCipher(SSLProtocolVersion version,
KeyType key_type);
protected:
void OnEvent(StreamInterface* stream, int events, int err) override;