OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1092 return false; | 1092 return false; |
1093 #endif | 1093 #endif |
1094 } | 1094 } |
1095 | 1095 |
1096 bool NSSStreamAdapter::HaveExporter() { | 1096 bool NSSStreamAdapter::HaveExporter() { |
1097 return true; | 1097 return true; |
1098 } | 1098 } |
1099 | 1099 |
1100 std::string NSSStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version, | 1100 std::string NSSStreamAdapter::GetDefaultSslCipher(SSLProtocolVersion version, |
1101 KeyType key_type) { | 1101 KeyType key_type) { |
1102 if (key_type == KT_RSA) { | 1102 if (key_type == KT_RSA1024 || key_type == KT_RSA2048) { |
juberti
2015/09/01 19:36:52
An example of the problem caused by overloading Ke
| |
1103 switch (version) { | 1103 switch (version) { |
1104 case SSL_PROTOCOL_TLS_10: | 1104 case SSL_PROTOCOL_TLS_10: |
1105 case SSL_PROTOCOL_TLS_11: | 1105 case SSL_PROTOCOL_TLS_11: |
1106 return kDefaultSslCipher10; | 1106 return kDefaultSslCipher10; |
1107 case SSL_PROTOCOL_TLS_12: | 1107 case SSL_PROTOCOL_TLS_12: |
1108 default: | 1108 default: |
1109 return kDefaultSslCipher12; | 1109 return kDefaultSslCipher12; |
1110 } | 1110 } |
1111 } else if (key_type == KT_ECDSA) { | 1111 } else if (key_type == KT_ECDSA) { |
1112 switch (version) { | 1112 switch (version) { |
1113 case SSL_PROTOCOL_TLS_10: | 1113 case SSL_PROTOCOL_TLS_10: |
1114 case SSL_PROTOCOL_TLS_11: | 1114 case SSL_PROTOCOL_TLS_11: |
1115 return kDefaultSslEcCipher10; | 1115 return kDefaultSslEcCipher10; |
1116 case SSL_PROTOCOL_TLS_12: | 1116 case SSL_PROTOCOL_TLS_12: |
1117 default: | 1117 default: |
1118 return kDefaultSslEcCipher12; | 1118 return kDefaultSslEcCipher12; |
1119 } | 1119 } |
1120 } else { | 1120 } else { |
1121 return std::string(); | 1121 return std::string(); |
1122 } | 1122 } |
1123 } | 1123 } |
1124 | 1124 |
1125 } // namespace rtc | 1125 } // namespace rtc |
1126 | 1126 |
1127 #endif // HAVE_NSS_SSL_H | 1127 #endif // HAVE_NSS_SSL_H |
OLD | NEW |