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

Unified Diff: webrtc/p2p/base/transportdescriptionfactory.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: Merge with master 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
Index: webrtc/p2p/base/transportdescriptionfactory.h
diff --git a/webrtc/p2p/base/transportdescriptionfactory.h b/webrtc/p2p/base/transportdescriptionfactory.h
index a137f72115d2dc3d90465f89e3f7ab3c984e983a..f9d235fb8f25585a5d3927bdb78142d0c4177992 100644
--- a/webrtc/p2p/base/transportdescriptionfactory.h
+++ b/webrtc/p2p/base/transportdescriptionfactory.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_
#define WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_
+#include "talk/app/webrtc/dtlscertificate.h"
+#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/p2p/base/transportdescription.h"
namespace rtc {
@@ -33,15 +35,20 @@ class TransportDescriptionFactory {
// Default ctor; use methods below to set configuration.
TransportDescriptionFactory();
SecurePolicy secure() const { return secure_; }
- // The identity to use when setting up DTLS.
- rtc::SSLIdentity* identity() const { return identity_; }
+ // The certificate to use when setting up DTLS.
+ const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate() const {
+ return certificate_;
+ }
// Specifies the transport protocol to be use.
void set_protocol(TransportProtocol protocol) { protocol_ = protocol; }
// Specifies the transport security policy to use.
void set_secure(SecurePolicy s) { secure_ = s; }
- // Specifies the identity to use (only used when secure is not SEC_DISABLED).
- void set_identity(rtc::SSLIdentity* identity) { identity_ = identity; }
+ // Specifies the certificate to use (only used when secure != SEC_DISABLED).
+ void set_certificate(
+ const rtc::scoped_refptr<webrtc::DtlsCertificate>& cert) {
+ certificate_ = cert;
+ }
// Creates a transport description suitable for use in an offer.
TransportDescription* CreateOffer(const TransportOptions& options,
@@ -58,7 +65,7 @@ class TransportDescriptionFactory {
TransportProtocol protocol_;
SecurePolicy secure_;
- rtc::SSLIdentity* identity_;
+ rtc::scoped_refptr<webrtc::DtlsCertificate> certificate_;
};
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698