OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 #ifndef WEBRTC_API_DTLSIDENTITYSTORE_H_ | 11 #ifndef WEBRTC_API_DTLSIDENTITYSTORE_H_ |
12 #define WEBRTC_API_DTLSIDENTITYSTORE_H_ | 12 #define WEBRTC_API_DTLSIDENTITYSTORE_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <queue> | 15 #include <queue> |
16 #include <string> | 16 #include <string> |
17 #include <utility> | 17 #include <utility> |
18 | 18 |
19 #include "webrtc/base/messagehandler.h" | 19 #include "webrtc/base/messagehandler.h" |
20 #include "webrtc/base/messagequeue.h" | 20 #include "webrtc/base/messagequeue.h" |
21 #include "webrtc/base/optional.h" | 21 #include "webrtc/base/optional.h" |
22 #include "webrtc/base/refcount.h" | 22 #include "webrtc/base/refcount.h" |
23 #include "webrtc/base/rtccertificategenerator.h" | 23 #include "webrtc/base/rtccertificategenerator.h" |
24 #include "webrtc/base/scoped_ref_ptr.h" | 24 #include "webrtc/base/scoped_ref_ptr.h" |
25 #include "webrtc/base/sslidentity.h" | 25 #include "webrtc/base/sslidentity.h" |
26 #include "webrtc/base/thread.h" | 26 #include "webrtc/base/thread.h" |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 | 29 |
30 // TODO(hbos): Remove this constant (and dtlsidentitystore.cc) after | |
31 // RTCPeerConnectionInterface.mm stops using it. | |
32 // bugs.webrtc.org/5707, bugs.webrtc.org/5708 | |
33 extern const char kIdentityName[]; | |
34 | |
35 class SSLIdentity; | 30 class SSLIdentity; |
36 class Thread; | 31 class Thread; |
37 | 32 |
38 // Used to receive callbacks of DTLS identity requests. | 33 // Used to receive callbacks of DTLS identity requests. |
39 class DtlsIdentityRequestObserver : public rtc::RefCountInterface { | 34 class DtlsIdentityRequestObserver : public rtc::RefCountInterface { |
40 public: | 35 public: |
41 virtual void OnFailure(int error) = 0; | 36 virtual void OnFailure(int error) = 0; |
42 // TODO(hbos): Unify the OnSuccess method once Chrome code is updated. | 37 // TODO(hbos): Unify the OnSuccess method once Chrome code is updated. |
43 virtual void OnSuccess(const std::string& der_cert, | 38 virtual void OnSuccess(const std::string& der_cert, |
44 const std::string& der_private_key) = 0; | 39 const std::string& der_private_key) = 0; |
(...skipping 17 matching lines...) Expand all Loading... |
62 // identity generation fails. | 57 // identity generation fails. |
63 virtual void RequestIdentity( | 58 virtual void RequestIdentity( |
64 const rtc::KeyParams& key_params, | 59 const rtc::KeyParams& key_params, |
65 const rtc::Optional<uint64_t>& expires_ms, | 60 const rtc::Optional<uint64_t>& expires_ms, |
66 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) = 0; | 61 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) = 0; |
67 }; | 62 }; |
68 | 63 |
69 } // namespace webrtc | 64 } // namespace webrtc |
70 | 65 |
71 #endif // WEBRTC_API_DTLSIDENTITYSTORE_H_ | 66 #endif // WEBRTC_API_DTLSIDENTITYSTORE_H_ |
OLD | NEW |