Index: webrtc/p2p/base/dtlstransportchannel.cc |
diff --git a/webrtc/p2p/base/dtlstransportchannel.cc b/webrtc/p2p/base/dtlstransportchannel.cc |
index f56001ba4d3a51943e414bad8fa97f9f86916f80..6c341a05cc18d4b619a7a65516b2524b0f95be28 100644 |
--- a/webrtc/p2p/base/dtlstransportchannel.cc |
+++ b/webrtc/p2p/base/dtlstransportchannel.cc |
@@ -95,7 +95,7 @@ DtlsTransportChannelWrapper::DtlsTransportChannelWrapper( |
channel_(channel), |
downward_(NULL), |
dtls_state_(STATE_NONE), |
- local_identity_(NULL), |
+ local_certificate_(nullptr), |
tommi
2015/09/03 20:06:04
this is a scoped_refptr now, so no need for includ
hbos
2015/09/07 08:11:01
Done.
|
ssl_role_(rtc::SSL_CLIENT), |
ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { |
channel_->SignalReadableState.connect(this, |
@@ -133,10 +133,10 @@ void DtlsTransportChannelWrapper::Connect() { |
channel_->Connect(); |
} |
-bool DtlsTransportChannelWrapper::SetLocalIdentity( |
- rtc::SSLIdentity* identity) { |
+bool DtlsTransportChannelWrapper::SetLocalCertificate( |
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { |
if (dtls_state_ != STATE_NONE) { |
- if (identity == local_identity_) { |
+ if (certificate == local_certificate_) { |
// This may happen during renegotiation. |
LOG_J(LS_INFO, this) << "Ignoring identical DTLS identity"; |
return true; |
@@ -146,8 +146,8 @@ bool DtlsTransportChannelWrapper::SetLocalIdentity( |
} |
} |
- if (identity) { |
- local_identity_ = identity; |
+ if (certificate) { |
+ local_certificate_ = certificate; |
dtls_state_ = STATE_OFFERED; |
} else { |
LOG_J(LS_INFO, this) << "NULL DTLS identity supplied. Not doing DTLS"; |
@@ -156,12 +156,12 @@ bool DtlsTransportChannelWrapper::SetLocalIdentity( |
return true; |
} |
-bool DtlsTransportChannelWrapper::GetLocalIdentity( |
- rtc::SSLIdentity** identity) const { |
- if (!local_identity_) |
+bool DtlsTransportChannelWrapper::GetLocalCertificate( |
+ rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const { |
+ if (!local_certificate_) |
return false; |
- *identity = local_identity_->GetReference(); |
+ *certificate = local_certificate_; |
return true; |
} |
@@ -245,7 +245,7 @@ bool DtlsTransportChannelWrapper::SetRemoteFingerprint( |
return true; |
} |
-bool DtlsTransportChannelWrapper::GetRemoteCertificate( |
+bool DtlsTransportChannelWrapper::GetRemoteSSLCertificate( |
rtc::SSLCertificate** cert) const { |
if (!dtls_) |
return false; |
@@ -265,7 +265,7 @@ bool DtlsTransportChannelWrapper::SetupDtls() { |
downward_ = downward; |
- dtls_->SetIdentity(local_identity_->GetReference()); |
+ dtls_->SetIdentity(local_certificate_->identity()->GetReference()); |
dtls_->SetMode(rtc::SSL_MODE_DTLS); |
dtls_->SetMaxProtocolVersion(ssl_max_version_); |
dtls_->SetServerRole(ssl_role_); |