| 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_DEFAULT is currently an alias for KT_RSA. This is likely to change. | 117 // KT_DEFAULT is currently an alias for KT_RSA. This is likely to change. |
| 118 // KT_LAST is intended for vector declarations and loops over all key types; | 118 // KT_LAST is intended for vector declarations and loops over all key types; |
| 119 // it does not represent any key type in itself. | 119 // it does not represent any key type in itself. |
| 120 // TODO(hbos,torbjorng): Don't change KT_DEFAULT without first updating | |
| 121 // PeerConnectionFactory_nativeCreatePeerConnection's certificate generation | |
| 122 // code. | |
| 123 enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_RSA }; | 120 enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_RSA }; |
| 124 | 121 |
| 125 static const int kRsaDefaultModSize = 1024; | 122 static const int kRsaDefaultModSize = 1024; |
| 126 static const int kRsaDefaultExponent = 0x10001; // = 2^16+1 = 65537 | 123 static const int kRsaDefaultExponent = 0x10001; // = 2^16+1 = 65537 |
| 127 static const int kRsaMinModSize = 1024; | 124 static const int kRsaMinModSize = 1024; |
| 128 static const int kRsaMaxModSize = 8192; | 125 static const int kRsaMaxModSize = 8192; |
| 129 | 126 |
| 130 // Certificate default validity lifetime. | 127 // Certificate default validity lifetime. |
| 131 static const int kDefaultCertificateLifetimeInSeconds = | 128 static const int kDefaultCertificateLifetimeInSeconds = |
| 132 60 * 60 * 24 * 30; // 30 days | 129 60 * 60 * 24 * 30; // 30 days |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // |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|. |
| 248 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); |
| 249 | 246 |
| 250 extern const char kPemTypeCertificate[]; | 247 extern const char kPemTypeCertificate[]; |
| 251 extern const char kPemTypeRsaPrivateKey[]; | 248 extern const char kPemTypeRsaPrivateKey[]; |
| 252 extern const char kPemTypeEcPrivateKey[]; | 249 extern const char kPemTypeEcPrivateKey[]; |
| 253 | 250 |
| 254 } // namespace rtc | 251 } // namespace rtc |
| 255 | 252 |
| 256 #endif // WEBRTC_BASE_SSLIDENTITY_H_ | 253 #endif // WEBRTC_BASE_SSLIDENTITY_H_ |
| OLD | NEW |