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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 | 101 |
102 // Helper function for deleting a vector of certificates. | 102 // Helper function for deleting a vector of certificates. |
103 static void DeleteCert(SSLCertificate* cert) { delete cert; } | 103 static void DeleteCert(SSLCertificate* cert) { delete cert; } |
104 | 104 |
105 std::vector<SSLCertificate*> certs_; | 105 std::vector<SSLCertificate*> certs_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(SSLCertChain); | 107 DISALLOW_COPY_AND_ASSIGN(SSLCertChain); |
108 }; | 108 }; |
109 | 109 |
| 110 // TODO(hbos, torbjorng): Don't change KT_DEFAULT without first |
| 111 // updating PeerConnectionFactory_nativeCreatePeerConnection's certificate |
| 112 // generation code. |
110 enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_RSA }; | 113 enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_RSA }; |
111 | 114 |
112 // Parameters for generating an identity for testing. If common_name is | 115 // Parameters for generating an identity for testing. If common_name is |
113 // non-empty, it will be used for the certificate's subject and issuer name, | 116 // non-empty, it will be used for the certificate's subject and issuer name, |
114 // otherwise a random string will be used. |not_before| and |not_after| are | 117 // otherwise a random string will be used. |not_before| and |not_after| are |
115 // offsets to the current time in number of seconds. | 118 // offsets to the current time in number of seconds. |
116 struct SSLIdentityParams { | 119 struct SSLIdentityParams { |
117 std::string common_name; | 120 std::string common_name; |
118 int not_before; // in seconds. | 121 int not_before; // in seconds. |
119 int not_after; // in seconds. | 122 int not_after; // in seconds. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 size_t length); | 163 size_t length); |
161 }; | 164 }; |
162 | 165 |
163 extern const char kPemTypeCertificate[]; | 166 extern const char kPemTypeCertificate[]; |
164 extern const char kPemTypeRsaPrivateKey[]; | 167 extern const char kPemTypeRsaPrivateKey[]; |
165 extern const char kPemTypeEcPrivateKey[]; | 168 extern const char kPemTypeEcPrivateKey[]; |
166 | 169 |
167 } // namespace rtc | 170 } // namespace rtc |
168 | 171 |
169 #endif // WEBRTC_BASE_SSLIDENTITY_H_ | 172 #endif // WEBRTC_BASE_SSLIDENTITY_H_ |
OLD | NEW |