Index: webrtc/p2p/base/transportdescriptionfactory.cc |
diff --git a/webrtc/p2p/base/transportdescriptionfactory.cc b/webrtc/p2p/base/transportdescriptionfactory.cc |
index 1230ba52c18dee87447875245c289e048a47f21a..2c3f5fdf248cdc7ec82ebf3d73667f1cb44f86d8 100644 |
--- a/webrtc/p2p/base/transportdescriptionfactory.cc |
+++ b/webrtc/p2p/base/transportdescriptionfactory.cc |
@@ -24,7 +24,7 @@ static TransportProtocol kDefaultProtocol = ICEPROTO_RFC5245; |
TransportDescriptionFactory::TransportDescriptionFactory() |
: protocol_(kDefaultProtocol), |
secure_(SEC_DISABLED), |
- identity_(NULL) { |
+ certificate_(nullptr) { |
} |
TransportDescription* TransportDescriptionFactory::CreateOffer( |
@@ -129,7 +129,7 @@ TransportDescription* TransportDescriptionFactory::CreateAnswer( |
bool TransportDescriptionFactory::SetSecurityInfo( |
TransportDescription* desc, ConnectionRole role) const { |
- if (!identity_) { |
+ if (!certificate_) { |
LOG(LS_ERROR) << "Cannot create identity digest with no identity"; |
return false; |
} |
@@ -138,13 +138,14 @@ bool TransportDescriptionFactory::SetSecurityInfo( |
// RFC 4572 Section 5 requires that those lines use the same hash function as |
// the certificate's signature. |
std::string digest_alg; |
- if (!identity_->certificate().GetSignatureDigestAlgorithm(&digest_alg)) { |
+ if (!certificate_->identity()->certificate().GetSignatureDigestAlgorithm( |
+ &digest_alg)) { |
LOG(LS_ERROR) << "Failed to retrieve the certificate's digest algorithm"; |
return false; |
} |
desc->identity_fingerprint.reset( |
- rtc::SSLFingerprint::Create(digest_alg, identity_)); |
+ rtc::SSLFingerprint::Create(digest_alg, certificate_->identity())); |
if (!desc->identity_fingerprint.get()) { |
LOG(LS_ERROR) << "Failed to create identity fingerprint, alg=" |
<< digest_alg; |