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

Unified Diff: talk/app/webrtc/dtlscertificate.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Replacing SSLIdentity* /w scoped_refptr<DtlsCertificate> in surrounding code Created 5 years, 4 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 | talk/app/webrtc/dtlscertificate.cc » ('j') | talk/app/webrtc/proxy.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/dtlscertificate.h
diff --git a/talk/app/webrtc/dtlsidentityservice.cc b/talk/app/webrtc/dtlscertificate.h
similarity index 67%
copy from talk/app/webrtc/dtlsidentityservice.cc
copy to talk/app/webrtc/dtlscertificate.h
index b4b7279c8288395a8e23a507f7c78dc199572cab..3cc05f1eee5c9075b903fb67ec30810e74cc9e1b 100644
--- a/talk/app/webrtc/dtlsidentityservice.cc
+++ b/talk/app/webrtc/dtlscertificate.h
@@ -25,26 +25,35 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "talk/app/webrtc/dtlsidentityservice.h"
+#ifndef TALK_APP_WEBRTC_DTLSCERTIFICATE_H_
+#define TALK_APP_WEBRTC_DTLSCERTIFICATE_H_
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "webrtc/base/logging.h"
+#include <string>
+
+#include "webrtc/base/refcount.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/base/sslidentity.h"
namespace webrtc {
hbos 2015/08/10 15:10:18 Hmh... should I use the webrtc or rtc namespace fo
-bool DtlsIdentityService::RequestIdentity(
- const std::string& identity_name,
- const std::string& common_name,
- webrtc::DTLSIdentityRequestObserver* observer) {
- if (identity_name != DtlsIdentityStore::kIdentityName ||
- common_name != DtlsIdentityStore::kIdentityName) {
- LOG(LS_WARNING) << "DtlsIdentityService::RequestIdentity called with "
- << "unsupported params, identity_name=" << identity_name
- << ", common_name=" << common_name;
- return false;
- }
- store_->RequestIdentity(observer);
- return true;
-}
+class DtlsCertificate : public rtc::RefCountInterface {
+ public:
+ static rtc::scoped_refptr<DtlsCertificate> Create(
+ rtc::scoped_ptr<rtc::SSLIdentity> identity);
+
+ rtc::SSLIdentity* identity() const;
+ double expires() const;
+
+ protected:
+ DtlsCertificate(rtc::SSLIdentity* identity, double expires);
+ ~DtlsCertificate() override;
+
+ private:
+ rtc::scoped_ptr<rtc::SSLIdentity> identity_;
+ double expires_;
+};
} // namespace webrtc
+
+#endif // TALK_APP_WEBRTC_DTLSCERTIFICATE_H_
« no previous file with comments | « no previous file | talk/app/webrtc/dtlscertificate.cc » ('j') | talk/app/webrtc/proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698