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 |
11 // Handling of certificates and keypairs for SSLStreamAdapter's peer mode. | 11 // Handling of certificates and keypairs for SSLStreamAdapter's peer mode. |
12 | 12 |
13 #ifndef WEBRTC_BASE_SSLIDENTITY_H_ | 13 #ifndef WEBRTC_BASE_SSLIDENTITY_H_ |
14 #define WEBRTC_BASE_SSLIDENTITY_H_ | 14 #define WEBRTC_BASE_SSLIDENTITY_H_ |
15 | 15 |
16 #include <algorithm> | 16 #include <algorithm> |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
20 #include "webrtc/base/buffer.h" | 20 #include "webrtc/base/buffer.h" |
21 #include "webrtc/base/messagedigest.h" | 21 #include "webrtc/base/messagedigest.h" |
22 | 22 |
23 namespace rtc { | 23 namespace rtc { |
24 | 24 |
25 // Forward declaration due to circular dependency with SSLCertificate. | 25 // Forward declaration due to circular dependency with SSLCertificate. |
26 class SSLCertChain; | 26 class SSLCertChain; |
27 | 27 |
| 28 enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_RSA }; |
| 29 |
28 // Abstract interface overridden by SSL library specific | 30 // Abstract interface overridden by SSL library specific |
29 // implementations. | 31 // implementations. |
30 | 32 |
31 // A somewhat opaque type used to encapsulate a certificate. | 33 // A somewhat opaque type used to encapsulate a certificate. |
32 // Wraps the SSL library's notion of a certificate, with reference counting. | 34 // Wraps the SSL library's notion of a certificate, with reference counting. |
33 // The SSLCertificate object is pretty much immutable once created. | 35 // The SSLCertificate object is pretty much immutable once created. |
34 // (The OpenSSL implementation only does reference counting and | 36 // (The OpenSSL implementation only does reference counting and |
35 // possibly caching of intermediate results.) | 37 // possibly caching of intermediate results.) |
36 class SSLCertificate { | 38 class SSLCertificate { |
37 public: | 39 public: |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 const unsigned char* data, | 156 const unsigned char* data, |
155 size_t length); | 157 size_t length); |
156 }; | 158 }; |
157 | 159 |
158 extern const char kPemTypeCertificate[]; | 160 extern const char kPemTypeCertificate[]; |
159 extern const char kPemTypeRsaPrivateKey[]; | 161 extern const char kPemTypeRsaPrivateKey[]; |
160 | 162 |
161 } // namespace rtc | 163 } // namespace rtc |
162 | 164 |
163 #endif // WEBRTC_BASE_SSLIDENTITY_H_ | 165 #endif // WEBRTC_BASE_SSLIDENTITY_H_ |
OLD | NEW |