Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: webrtc/base/sslidentity.h

Issue 1151943005: Ability to specify KeyType (RSA, ECDSA) for SSLIdentity generation in libjingle (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing ASAN, LSAN issues in unittests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 {
hbos 2015/06/12 12:46:55 (Also defined in torbjorng@'s CL, to be merged.)
29 // Same order as |key_type_names| in .cc for index lookup.
30 KT_RSA = 0,
31 KT_ECDSA,
32
33 KT_DEFAULT = KT_RSA
34 };
35
36 std::string KeyTypeToString(KeyType key_type);
37
28 // Abstract interface overridden by SSL library specific 38 // Abstract interface overridden by SSL library specific
29 // implementations. 39 // implementations.
30 40
31 // A somewhat opaque type used to encapsulate a certificate. 41 // A somewhat opaque type used to encapsulate a certificate.
32 // Wraps the SSL library's notion of a certificate, with reference counting. 42 // Wraps the SSL library's notion of a certificate, with reference counting.
33 // The SSLCertificate object is pretty much immutable once created. 43 // The SSLCertificate object is pretty much immutable once created.
34 // (The OpenSSL implementation only does reference counting and 44 // (The OpenSSL implementation only does reference counting and
35 // possibly caching of intermediate results.) 45 // possibly caching of intermediate results.)
36 class SSLCertificate { 46 class SSLCertificate {
37 public: 47 public:
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const unsigned char* data, 164 const unsigned char* data,
155 size_t length); 165 size_t length);
156 }; 166 };
157 167
158 extern const char kPemTypeCertificate[]; 168 extern const char kPemTypeCertificate[];
159 extern const char kPemTypeRsaPrivateKey[]; 169 extern const char kPemTypeRsaPrivateKey[];
160 170
161 } // namespace rtc 171 } // namespace rtc
162 172
163 #endif // WEBRTC_BASE_SSLIDENTITY_H_ 173 #endif // WEBRTC_BASE_SSLIDENTITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698