Chromium Code Reviews| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 static void DeleteCert(SSLCertificate* cert) { delete cert; } | 110 static void DeleteCert(SSLCertificate* cert) { delete cert; } |
| 111 | 111 |
| 112 std::vector<SSLCertificate*> certs_; | 112 std::vector<SSLCertificate*> certs_; |
| 113 | 113 |
| 114 RTC_DISALLOW_COPY_AND_ASSIGN(SSLCertChain); | 114 RTC_DISALLOW_COPY_AND_ASSIGN(SSLCertChain); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 // KT_LAST is intended for vector declarations and loops over all key types; | 117 // KT_LAST is intended for vector declarations and loops over all key types; |
| 118 // it does not represent any key type in itself. | 118 // it does not represent any key type in itself. |
| 119 // KT_DEFAULT is used as the default KeyType for KeyParams. | 119 // KT_DEFAULT is used as the default KeyType for KeyParams. |
| 120 enum KeyType { | 120 enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_ECDSA }; |
|
tommi
2016/05/24 18:20:23
did you run git cl format?
hbos
2016/05/24 18:43:11
If I run it it does not change the code, so I gues
| |
| 121 KT_RSA, KT_ECDSA, KT_LAST, | |
| 122 #if defined(WEBRTC_CHROMIUM_BUILD) | |
| 123 // TODO(hbos): Because of an experiment running in Chromium which relies on | |
| 124 // RSA being the default (for performance reasons) we have this #if. ECDSA | |
| 125 // launches in Chromium by flipping a flag which overrides the default. As | |
| 126 // soon as the experiment has ended and there is no risk of RSA being the | |
| 127 // default we should make KT_DEFAULT = KT_ECDSA unconditionally. | |
| 128 // crbug.com/611698 | |
| 129 KT_DEFAULT = KT_RSA | |
| 130 #else | |
| 131 KT_DEFAULT = KT_ECDSA | |
| 132 #endif | |
| 133 }; | |
| 134 | 121 |
| 135 static const int kRsaDefaultModSize = 1024; | 122 static const int kRsaDefaultModSize = 1024; |
| 136 static const int kRsaDefaultExponent = 0x10001; // = 2^16+1 = 65537 | 123 static const int kRsaDefaultExponent = 0x10001; // = 2^16+1 = 65537 |
| 137 static const int kRsaMinModSize = 1024; | 124 static const int kRsaMinModSize = 1024; |
| 138 static const int kRsaMaxModSize = 8192; | 125 static const int kRsaMaxModSize = 8192; |
| 139 | 126 |
| 140 // Certificate default validity lifetime. | 127 // Certificate default validity lifetime. |
| 141 static const int kDefaultCertificateLifetimeInSeconds = | 128 static const int kDefaultCertificateLifetimeInSeconds = |
| 142 60 * 60 * 24 * 30; // 30 days | 129 60 * 60 * 24 * 30; // 30 days |
| 143 // Certificate validity window. | 130 // Certificate validity window. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 // |s| is not 0-terminated; its char count is defined by |length|. | 244 // |s| is not 0-terminated; its char count is defined by |length|. |
| 258 int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format); | 245 int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format); |
| 259 | 246 |
| 260 extern const char kPemTypeCertificate[]; | 247 extern const char kPemTypeCertificate[]; |
| 261 extern const char kPemTypeRsaPrivateKey[]; | 248 extern const char kPemTypeRsaPrivateKey[]; |
| 262 extern const char kPemTypeEcPrivateKey[]; | 249 extern const char kPemTypeEcPrivateKey[]; |
| 263 | 250 |
| 264 } // namespace rtc | 251 } // namespace rtc |
| 265 | 252 |
| 266 #endif // WEBRTC_BASE_SSLIDENTITY_H_ | 253 #endif // WEBRTC_BASE_SSLIDENTITY_H_ |
| OLD | NEW |