Removing "crypto_required" from MediaContentDescription.
"Crypto required" is a property of the PeerConnection of construction
time; it has nothing to do with SDP. So I'm moving it out of
MediaContentDescription and putting it in the BaseChannel constructor
instead. This is more intuitive, and provides the added assurance that
"secure_required_" can't be flipped from "true" to "false".
BUG=None
Review-Url: https://codereview.webrtc.org/2537343003
Cr-Commit-Position: refs/heads/master@{#15579}
diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc
index fda38df..2f973de 100644
--- a/webrtc/pc/mediasession.cc
+++ b/webrtc/pc/mediasession.cc
@@ -749,9 +749,6 @@
MediaContentDescriptionImpl<C>* offer) {
offer->AddCodecs(codecs);
- if (secure_policy == SEC_REQUIRED) {
- offer->set_crypto_required(CT_SDES);
- }
offer->set_rtcp_mux(options.rtcp_mux_enabled);
if (offer->type() == cricket::MEDIA_TYPE_VIDEO) {
offer->set_rtcp_reduced_size(true);
@@ -777,7 +774,7 @@
}
#endif
- if (offer->crypto_required() == CT_SDES && offer->cryptos().empty()) {
+ if (secure_policy == SEC_REQUIRED && offer->cryptos().empty()) {
return false;
}
return true;
@@ -1068,8 +1065,7 @@
}
}
- if (answer->cryptos().empty() &&
- (offer->crypto_required() == CT_SDES || sdes_policy == SEC_REQUIRED)) {
+ if (answer->cryptos().empty() && sdes_policy == SEC_REQUIRED) {
return false;
}