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

Unified Diff: webrtc/api/dtlsidentitystore.h

Issue 2001103002: RTCCertificateGeneratorInterface and RTCCertificateGeneratorStoreWrapper added. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nits Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/dtlsidentitystore.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/dtlsidentitystore.h
diff --git a/webrtc/api/dtlsidentitystore.h b/webrtc/api/dtlsidentitystore.h
index e25b79591a76ee7465f6d344c99d93d4dd328b51..3384341e6b30f3ad1434108fa26ba3e662ba17c5 100644
--- a/webrtc/api/dtlsidentitystore.h
+++ b/webrtc/api/dtlsidentitystore.h
@@ -20,6 +20,7 @@
#include "webrtc/base/messagequeue.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/refcount.h"
+#include "webrtc/base/rtccertificategenerator.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/sslidentity.h"
#include "webrtc/base/thread.h"
@@ -131,6 +132,27 @@ class DtlsIdentityStoreImpl : public DtlsIdentityStoreInterface,
RequestInfo request_info_[rtc::KT_LAST];
};
+// Implements the |RTCCertificateGeneratorInterface| using the old |SSLIdentity|
+// generator API, |DtlsIdentityStoreInterface|. This will be used while
+// transitioning from store to generator, see bugs.webrtc.org/5707,
+// bugs.webrtc.org/5708. Once those bugs have been fixed, this will be removed.
+class RTCCertificateGeneratorStoreWrapper
+ : public rtc::RTCCertificateGeneratorInterface {
+ public:
+ RTCCertificateGeneratorStoreWrapper(
+ std::unique_ptr<DtlsIdentityStoreInterface> store);
+
+ // |RTCCertificateGeneratorInterface| overrides.
+ void GenerateCertificateAsync(
+ const rtc::KeyParams& key_params,
+ const rtc::Optional<uint64_t>& expires_ms,
+ const rtc::scoped_refptr<rtc::RTCCertificateGeneratorCallback>& callback)
+ override;
+
+ private:
+ const std::unique_ptr<DtlsIdentityStoreInterface> store_;
+};
+
} // namespace webrtc
#endif // WEBRTC_API_DTLSIDENTITYSTORE_H_
« no previous file with comments | « no previous file | webrtc/api/dtlsidentitystore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698