Backed out changesets bb7097d12256, 5e6c7217e92a, and 6779278f87df (bug 884573) and changeset 30e1a793fbf9 (bug 878941) for Cpp unit test failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 14 Jan 2014 11:43:48 -0500
changeset 163372 c4aadf8ea4e08a1d1c56c2ebe0b603dcfe8e77e3
parent 163371 52d6e5efa74d7f3a61fd794843901c6268cb9774
child 163373 7eac28351524d907a0032b6ce1489b20b0789e37
push id25993
push userkwierso@gmail.com
push dateTue, 14 Jan 2014 23:24:56 +0000
treeherdermozilla-central@4e671e3183c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs884573, 878941
milestone29.0a1
backs outbb7097d122565ad01149a298a8f3c580ea8dd96b
5e6c7217e92a0a98b100150d3a6b762256094bd7
6779278f87dfb5f21b91a6b326c156a5000c4d06
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changesets bb7097d12256, 5e6c7217e92a, and 6779278f87df (bug 884573) and changeset 30e1a793fbf9 (bug 878941) for Cpp unit test failures.
content/events/test/test_all_synthetic_events.html
dom/media/IdpProxy.jsm
dom/media/PeerConnection.js
dom/media/PeerConnection.manifest
dom/media/PeerConnectionIdp.jsm
dom/media/moz.build
dom/media/tests/mochitest/Makefile.in
dom/media/tests/mochitest/head.js
dom/media/tests/mochitest/idp-proxy.js
dom/media/tests/mochitest/idp.html
dom/media/tests/mochitest/mochitest.ini
dom/media/tests/mochitest/pc.js
dom/media/tests/mochitest/test_getIdentityAssertion.html
dom/media/tests/mochitest/test_idpproxy.html
dom/media/tests/mochitest/test_setIdentityProvider.html
dom/media/tests/mochitest/test_setIdentityProviderWithErrors.html
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/RTCIdentityAssertion.webidl
dom/webidl/RTCPeerConnection.webidl
dom/webidl/RTCPeerConnectionIdentityEvent.webidl
dom/webidl/moz.build
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp_main.c
media/webrtc/signaling/src/sipcc/include/ccsdp.h
modules/libpref/src/init/all.js
toolkit/identity/tests/mochitest/moz.build
toolkit/identity/tests/moz.build
--- a/content/events/test/test_all_synthetic_events.html
+++ b/content/events/test/test_all_synthetic_events.html
@@ -325,20 +325,16 @@ const kEventConstructors = {
   RTCDataChannelEvent:                       { create: function (aName, aProps) {
                                                          return new RTCDataChannelEvent(aName, aProps);
                                                        },
                                              },
   RTCPeerConnectionIceEvent:                 { create: function (aName, aProps) {
                                                          return new RTCPeerConnectionIceEvent(aName, aProps);
                                                        },
                                              },
-  RTCPeerConnectionIdentityEvent:            { create: function (aName, aProps) {
-                                                         return new RTCPeerConnectionIdentityEvent(aName, aProps);
-                                                       },
-                                             },
   ScrollAreaEvent:                           { create: function (aName, aProps) {
                                                          var e = document.createEvent("scrollareaevent");
                                                          e.initScrollAreaEvent(aName, aProps.bubbles, aProps.cancelable,
                                                                                aProps.view, aProps.details,
                                                                                aProps.x || 0.0, aProps.y || 0.0,
                                                                                aProps.width || 0.0, aProps.height || 0.0);
                                                          return e;
                                                        },
deleted file mode 100644
--- a/dom/media/IdpProxy.jsm
+++ /dev/null
@@ -1,268 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["IdpProxy"];
-
-const {
-  classes: Cc,
-  interfaces: Ci,
-  utils: Cu,
-  results: Cr
-} = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Sandbox",
-                                  "resource://gre/modules/identity/Sandbox.jsm");
-
-/**
- * An invisible iframe for hosting the idp shim.
- *
- * There is no visible UX here, as we assume the user has already
- * logged in elsewhere (on a different screen in the web site hosting
- * the RTC functions).
- */
-function IdpChannel(uri, messageCallback) {
-  this.sandbox = null;
-  this.messagechannel = null;
-  this.source = uri;
-  this.messageCallback = messageCallback;
-}
-
-IdpChannel.prototype = {
-  /**
-   * Create a hidden, sandboxed iframe for hosting the IdP's js shim.
-   *
-   * @param callback
-   *                (function) invoked when this completes, with an error
-   *                argument if there is a problem, no argument if everything is
-   *                ok
-   */
-  open: function(callback) {
-    if (this.sandbox) {
-      return callback(new Error("IdP channel already open"));
-    }
-
-    let ready = this._sandboxReady.bind(this, callback);
-    this.sandbox = new Sandbox(this.source, ready);
-  },
-
-  _sandboxReady: function(aCallback, aSandbox) {
-    // Inject a message channel into the subframe.
-    this.messagechannel = new aSandbox._frame.contentWindow.MessageChannel();
-    try {
-      Object.defineProperty(
-        aSandbox._frame.contentWindow.wrappedJSObject,
-        "rtcwebIdentityPort",
-        {
-          value: this.messagechannel.port2
-        }
-      );
-    } catch (e) {
-      this.close();
-      aCallback(e); // oops, the IdP proxy overwrote this.. bad
-      return;
-    }
-    this.messagechannel.port1.onmessage = function(msg) {
-      this.messageCallback(msg.data);
-    }.bind(this);
-    this.messagechannel.port1.start();
-    aCallback();
-  },
-
-  send: function(msg) {
-    this.messagechannel.port1.postMessage(msg);
-  },
-
-  close: function IdpChannel_close() {
-    if (this.sandbox) {
-      if (this.messagechannel) {
-        this.messagechannel.port1.close();
-      }
-      this.sandbox.free();
-    }
-    this.messagechannel = null;
-    this.sandbox = null;
-  }
-};
-
-/**
- * A message channel between the RTC PeerConnection and a designated IdP Proxy.
- *
- * @param domain (string) the domain to load up
- * @param protocol (string) Optional string for the IdP protocol
- */
-function IdpProxy(domain, protocol) {
-  IdpProxy.validateDomain(domain);
-  IdpProxy.validateProtocol(protocol);
-
-  this.domain = domain;
-  this.protocol = protocol || "default";
-
-  this._reset();
-}
-
-/**
- * Checks that the domain is only a domain, and doesn't contain anything else.
- * Adds it to a URI, then checks that it matches perfectly.
- */
-IdpProxy.validateDomain = function(domain) {
-  let message = "Invalid domain for identity provider; ";
-  if (!domain || typeof domain !== "string") {
-    throw new Error(message + "must be a non-zero length string");
-  }
-
-  message += "must only have a domain name and optionally a port";
-  try {
-    let ioService = Components.classes["@mozilla.org/network/io-service;1"]
-                    .getService(Components.interfaces.nsIIOService);
-    let uri = ioService.newURI('https://' + domain + '/', null, null);
-
-    // this should trap errors
-    // we could check uri.userPass, uri.path and uri.ref, but there is no need
-    if (uri.hostPort !== domain) {
-      throw new Error(message);
-    }
-  } catch (e if (e.result === Cr.NS_ERROR_MALFORMED_URI)) {
-    throw new Error(message);
-  }
-};
-
-/**
- * Checks that the IdP protocol is sane.  In particular, we don't want someone
- * adding relative paths (e.g., "../../myuri"), which could be used to move
- * outside of /.well-known/ and into space that they control.
- */
-IdpProxy.validateProtocol = function(protocol) {
-  if (!protocol) {
-    return;  // falsy values turn into "default", so they are OK
-  }
-  let message = "Invalid protocol for identity provider; ";
-  if (typeof protocol !== "string") {
-    throw new Error(message + "must be a string");
-  }
-  if (decodeURIComponent(protocol).match(/[\/\\]/)) {
-    throw new Error(message + "must not include '/' or '\\'");
-  }
-};
-
-IdpProxy.prototype = {
-  _reset: function() {
-    this.channel = null;
-    this.ready = false;
-
-    this.counter = 0;
-    this.tracking = {};
-    this.pending = [];
-  },
-
-  /**
-   * Get a sandboxed iframe for hosting the idp-proxy's js. Create a message
-   * channel down to the frame.
-   *
-   * @param errorCallback (function) a callback that will be invoked if there
-   *                is a fatal error starting the proxy
-   */
-  start: function(errorCallback) {
-    if (this.channel) {
-      return;
-    }
-    let well_known = "https://" + this.domain;
-    well_known += "/.well-known/idp-proxy/" + this.protocol;
-    this.channel = new IdpChannel(well_known, this._messageReceived.bind(this));
-    this.channel.open(function(error) {
-      if (error) {
-        this.close();
-        if (typeof errorCallback === "function") {
-          errorCallback(error);
-        }
-      }
-    }.bind(this));
-  },
-
-  /**
-   * Send a message up to the idp proxy. This should be an RTC "SIGN" or
-   * "VERIFY" message. This method adds the tracking 'id' parameter
-   * automatically to the message so that the callback is only invoked for the
-   * response to the message.
-   *
-   * This enqueues the message to send if the IdP hasn't signaled that it is
-   * "READY", and sends the message when it is.
-   *
-   * The caller is responsible for ensuring that a response is received. If the
-   * IdP doesn't respond, the callback simply isn't invoked.
-   */
-  send: function(message, callback) {
-    this.start();
-    if (this.ready) {
-      message.id = "" + (++this.counter);
-      this.tracking[message.id] = callback;
-      this.channel.send(message);
-    } else {
-      this.pending.push({ message: message, callback: callback });
-    }
-  },
-
-  /**
-   * Handle a message from the IdP. This automatically sends if the message is
-   * 'READY' so there is no need to track readiness state outside of this obj.
-   */
-  _messageReceived: function(message) {
-    if (!message) {
-      return;
-    }
-    if (!this.ready && message.type === "READY") {
-      this.ready = true;
-      this.pending.forEach(function(p) {
-        this.send(p.message, p.callback);
-      }, this);
-      this.pending = [];
-    } else if (this.tracking[message.id]) {
-      var callback = this.tracking[message.id];
-      delete this.tracking[message.id];
-      callback(message);
-    } else {
-      let console = Cc["@mozilla.org/consoleservice;1"].
-        getService(Ci.nsIConsoleService);
-      console.logStringMessage("Received bad message from IdP: " +
-                               message.id + ":" + message.type);
-    }
-  },
-
-  /**
-   * Performs cleanup.  The object should be OK to use again.
-   */
-  close: function() {
-    if (!this.channel) {
-      return;
-    }
-
-    // clear out before letting others know in case they do something bad
-    let trackingCopy = this.tracking;
-    let pendingCopy = this.pending;
-
-    this.channel.close();
-    this._reset();
-
-    // dump a message of type "ERROR" in response to all outstanding
-    // messages to the IdP
-    let error = { type: "ERROR", message: "IdP closed" };
-    Object.keys(trackingCopy).forEach(function(k) {
-      this.trackingCopy[k](error);
-    }, this);
-    pendingCopy.forEach(function(p) {
-      p.callback(error);
-    }, this);
-
-  },
-
-  toString: function() {
-    return this.domain + '/' + this.protocol;
-  }
-};
-
-this.IdpProxy = IdpProxy;
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -1,40 +1,34 @@
-/* jshint moz:true, browser:true */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/PopupNotifications.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PeerConnectionIdp",
-  "resource://gre/modules/media/PeerConnectionIdp.jsm");
 
 const PC_CONTRACT = "@mozilla.org/dom/peerconnection;1";
 const WEBRTC_GLOBAL_CONTRACT = "@mozilla.org/dom/webrtcglobalinformation1";
 const PC_OBS_CONTRACT = "@mozilla.org/dom/peerconnectionobserver;1";
 const PC_ICE_CONTRACT = "@mozilla.org/dom/rtcicecandidate;1";
 const PC_SESSION_CONTRACT = "@mozilla.org/dom/rtcsessiondescription;1";
 const PC_MANAGER_CONTRACT = "@mozilla.org/dom/peerconnectionmanager;1";
 const PC_STATS_CONTRACT = "@mozilla.org/dom/rtcstatsreport;1";
-const PC_IDENTITY_CONTRACT = "@mozilla.org/dom/rtcidentityassertion;1";
 
 const PC_CID = Components.ID("{00e0e20d-1494-4776-8e0e-0f0acbea3c79}");
 const WEBRTC_GLOBAL_CID = Components.ID("{f6063d11-f467-49ad-9765-e7923050dc08}");
 const PC_OBS_CID = Components.ID("{d1748d4c-7f6a-4dc5-add6-d55b7678537e}");
 const PC_ICE_CID = Components.ID("{02b9970c-433d-4cc2-923d-f7028ac66073}");
 const PC_SESSION_CID = Components.ID("{1775081b-b62d-4954-8ffe-a067bbf508a7}");
 const PC_MANAGER_CID = Components.ID("{7293e901-2be3-4c02-b4bd-cbef6fc24f78}");
 const PC_STATS_CID = Components.ID("{7fe6e18b-0da3-4056-bf3b-440ef3809e06}");
-const PC_IDENTITY_CID = Components.ID("{1abc7499-3c54-43e0-bd60-686e2703f072}");
 
 // Global list of PeerConnection objects, so they can be cleaned up when
 // a page is torn down. (Maps inner window ID to an array of PC objects).
 function GlobalPCList() {
   this._list = {};
   this._networkdown = false; // XXX Need to query current state somehow
   Services.obs.addObserver(this, "inner-window-destroyed", true);
   Services.obs.addObserver(this, "profile-change-net-teardown", true);
@@ -100,28 +94,28 @@ GlobalPCList.prototype = {
     };
 
     if (topic == "inner-window-destroyed") {
       cleanupWinId(this._list, subject.QueryInterface(Ci.nsISupportsPRUint64).data);
     } else if (topic == "profile-change-net-teardown" ||
                topic == "network:offline-about-to-go-offline") {
       // Delete all peerconnections on shutdown - mostly synchronously (we
       // need them to be done deleting transports and streams before we
-      // return)! All socket operations must be queued to STS thread
+      // return)!  All socket operations must be queued to STS thread
       // before we return to here.
       // Also kill them if "Work Offline" is selected - more can be created
       // while offline, but attempts to connect them should fail.
       for (let winId in this._list) {
         cleanupWinId(this._list, winId);
       }
       this._networkdown = true;
     }
     else if (topic == "network:offline-status-changed") {
       if (data == "offline") {
-        // this._list shold be empty here
+	// this._list shold be empty here
         this._networkdown = true;
       } else if (data == "online") {
         this._networkdown = false;
       }
     }
   },
 
   getStatsForEachPC: function(callback, errorCallback) {
@@ -278,32 +272,16 @@ RTCStatsReport.prototype = {
 
   has: function(key) {
     return this._report[key] !== undefined;
   },
 
   get mozPcid() { return this._pcid; }
 };
 
-function RTCIdentityAssertion() {}
-RTCIdentityAssertion.prototype = {
-  classDescription: "RTCIdentityAssertion",
-  classID: PC_IDENTITY_CID,
-  contractID: PC_IDENTITY_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer]),
-
-  init: function(win) { this._win = win; },
-
-  __init: function(idp, name) {
-    this.idp = idp;
-    this.name  = name;
-  }
-};
-
 function RTCPeerConnection() {
   this._queue = [];
 
   this._pc = null;
   this._observer = null;
   this._closed = false;
 
   this._onCreateOfferSuccess = null;
@@ -314,25 +292,24 @@ function RTCPeerConnection() {
   this._onGetStatsFailure = null;
   this._onGetLoggingSuccess = null;
   this._onGetLoggingFailure = null;
 
   this._pendingType = null;
   this._localType = null;
   this._remoteType = null;
   this._trickleIce = false;
-  this._peerIdentity = null;
 
   /**
-   * Everytime we get a request from content, we put it in the queue. If there
-   * are no pending operations though, we will execute it immediately. In
-   * PeerConnectionObserver, whenever we are notified that an operation has
-   * finished, we will check the queue for the next operation and execute if
-   * neccesary. The _pending flag indicates whether an operation is currently in
-   * progress.
+   * Everytime we get a request from content, we put it in the queue. If
+   * there are no pending operations though, we will execute it immediately.
+   * In PeerConnectionObserver, whenever we are notified that an operation
+   * has finished, we will check the queue for the next operation and execute
+   * if neccesary. The _pending flag indicates whether an operation is currently
+   * in progress.
    */
   this._pending = false;
 
   // States
   this._iceGatheringState = this._iceConnectionState = "new";
 }
 RTCPeerConnection.prototype = {
   classDescription: "mozRTCPeerConnection",
@@ -360,64 +337,53 @@ RTCPeerConnection.prototype = {
     this.makeGetterSetterEH("onicecandidate");
     this.makeGetterSetterEH("onnegotiationneeded");
     this.makeGetterSetterEH("onsignalingstatechange");
     this.makeGetterSetterEH("onremovestream");
     this.makeGetterSetterEH("ondatachannel");
     this.makeGetterSetterEH("onconnection");
     this.makeGetterSetterEH("onclosedconnection");
     this.makeGetterSetterEH("oniceconnectionstatechange");
-    this.makeGetterSetterEH("onidentityresult");
-    this.makeGetterSetterEH("onpeeridentity");
 
     this._pc = new this._win.PeerConnectionImpl();
 
     this.__DOM_IMPL__._innerObject = this;
     this._observer = new this._win.PeerConnectionObserver(this.__DOM_IMPL__);
+    this._winID = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
+                           .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
 
     // Add a reference to the PeerConnection to global list (before init).
-    this._winID = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
-      .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
     _globalPCList.addPC(this);
 
     this._queueOrRun({
       func: this._initialize,
       args: [rtcConfig],
       // If not trickling, suppress start.
       wait: !this._trickleIce
     });
   },
 
   _initialize: function(rtcConfig) {
-    this._impl.initialize(this._observer, this._win, rtcConfig,
-                          Services.tm.currentThread);
-    this._initIdp();
+    this._getPC().initialize(this._observer, this._win, rtcConfig,
+                             Services.tm.currentThread);
   },
 
-  get _impl() {
+  _getPC: function() {
     if (!this._pc) {
       throw new this._win.DOMError("",
           "RTCPeerConnection is gone (did you enter Offline mode?)");
     }
     return this._pc;
   },
 
-  _initIdp: function() {
-    let prefName = "media.peerconnection.identity.timeout";
-    let idpTimeout = Services.prefs.getIntPref(prefName);
-    let warningFunc = this.reportWarning.bind(this);
-    this._localIdp = new PeerConnectionIdp(this._win, idpTimeout, warningFunc);
-    this._remoteIdp = new PeerConnectionIdp(this._win, idpTimeout, warningFunc);
-  },
-
   /**
    * Add a function to the queue or run it immediately if the queue is empty.
    * Argument is an object with the func, args and wait properties; wait should
-   * be set to true if the function has a success/error callback that will call
-   * _executeNext, false if it doesn't have a callback.
+   * be set to true if the function has a success/error callback that will
+   * call _executeNext, false if it doesn't have a callback.
    */
   _queueOrRun: function(obj) {
     this._checkClosed();
     if (!this._pending) {
       if (obj.type !== undefined) {
         this._pendingType = obj.type;
       }
       obj.func.apply(this, obj.args);
@@ -496,18 +462,18 @@ RTCPeerConnection.prototype = {
    * MediaConstraints look like this:
    *
    * {
    *   mandatory: {"OfferToReceiveAudio": true, "OfferToReceiveVideo": true },
    *   optional: [{"VoiceActivityDetection": true}, {"FooBar": 10}]
    * }
    *
    * WebIDL normalizes the top structure for us, but the mandatory constraints
-   * member comes in as a raw object so we can detect unknown constraints. We
-   * compare its members against ones we support, and fail if not found.
+   * member comes in as a raw object so we can detect unknown constraints.
+   * We compare its members against ones we support, and fail if not found.
    */
   _mustValidateConstraints: function(constraints, errorMsg) {
     if (constraints.mandatory) {
       let supported;
       try {
         // Passing the raw constraints.mandatory here validates its structure
         supported = this._observer.getSupportedConstraints(constraints.mandatory);
       } catch (e) {
@@ -615,17 +581,17 @@ RTCPeerConnection.prototype = {
       args: [onSuccess, onError, constraints],
       wait: true
     });
   },
 
   _createOffer: function(onSuccess, onError, constraints) {
     this._onCreateOfferSuccess = onSuccess;
     this._onCreateOfferFailure = onError;
-    this._impl.createOffer(constraints);
+    this._getPC().createOffer(constraints);
   },
 
   _createAnswer: function(onSuccess, onError, constraints, provisional) {
     this._onCreateAnswerSuccess = onSuccess;
     this._onCreateAnswerFailure = onError;
 
     if (!this.remoteDescription) {
 
@@ -638,17 +604,17 @@ RTCPeerConnection.prototype = {
 
       this._observer.onCreateAnswerError(Ci.IPeerConnection.kInvalidState,
                                          "No outstanding offer");
       return;
     }
 
     // TODO: Implement provisional answer.
 
-    this._impl.createAnswer(constraints);
+    this._getPC().createAnswer(constraints);
   },
 
   createAnswer: function(onSuccess, onError, constraints, provisional) {
     if (!constraints) {
       constraints = {};
     }
 
     this._mustValidateConstraints(constraints, "createAnswer passed invalid constraints");
@@ -686,17 +652,17 @@ RTCPeerConnection.prototype = {
       wait: true,
       type: desc.type
     });
   },
 
   _setLocalDescription: function(type, sdp, onSuccess, onError) {
     this._onSetLocalDescriptionSuccess = onSuccess;
     this._onSetLocalDescriptionFailure = onError;
-    this._impl.setLocalDescription(type, sdp);
+    this._getPC().setLocalDescription(type, sdp);
   },
 
   setRemoteDescription: function(desc, onSuccess, onError) {
     let type;
     switch (desc.type) {
       case "offer":
         type = Ci.IPeerConnection.kActionOffer;
         break;
@@ -705,117 +671,28 @@ RTCPeerConnection.prototype = {
         break;
       case "pranswer":
         throw new this._win.DOMError("", "pranswer not yet implemented");
       default:
         throw new this._win.DOMError("",
             "Invalid type " + desc.type + " provided to setRemoteDescription");
     }
 
-    try {
-      let showUX = this._showIdentityUx.bind(this);
-      this._remoteIdp.verifyIdentityFromSDP(desc.sdp, showUX);
-    } catch (e) {
-      this.reportWarning(e.message, e.fileName, e.lineNumber);
-      // only happens if processing the SDP for identity doesn't work
-      this._showIdentityUx(null);
-      // let _setRemoteDescription do the error reporting
-    }
-
     this._queueOrRun({
       func: this._setRemoteDescription,
       args: [type, desc.sdp, onSuccess, onError],
       wait: true,
       type: desc.type
     });
   },
 
-  _showIdentityUx: function(message) {
-    let browser = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
-      .getInterface(Ci.nsIWebNavigation)
-      .QueryInterface(Ci.nsIDocShell)
-      .chromeEventHandler
-      .ownerDocument
-      .defaultView
-      .gBrowser;
-    let notificationBox = browser.getNotificationBox();
-
-    if (message) {
-      this._peerIdentity = new this._win.RTCIdentityAssertion(
-          this._remoteIdp.provider, message.identity.name);
-
-      // TODO (:mt) - ultimately, these notifications need to go away
-      // for one, they are highly spoofable, which is very bad
-      // but they are also ugly and unnecessary
-      // Bug 942372 should provide a better approach
-      notificationBox.appendNotification(
-          "Identity of your WebRTC peer is " + this._peerIdentity.name,
-          "webrtc-auth",
-          null,
-          notificationBox.PRIORITY_INFO_HIGH,
-          []
-      );
-
-      this.dispatchEvent(new this._win.Event("peeridentity"));
-    } else {
-      notificationBox.appendNotification(
-          "Identity of your WebRTC peer is not verified",
-          "webrtc-auth",
-          null,
-          notificationBox.PRIORITY_WARNING_HIGH,
-          []
-      );
-    }
-  },
-
   _setRemoteDescription: function(type, sdp, onSuccess, onError) {
     this._onSetRemoteDescriptionSuccess = onSuccess;
     this._onSetRemoteDescriptionFailure = onError;
-    this._impl.setRemoteDescription(type, sdp);
-  },
-
-  setIdentityProvider: function(provider, protocol, username) {
-    this._checkClosed();
-    this._localIdp.setIdentityProvider(provider, protocol, username);
-  },
-
-  _gotIdentityAssertion: function(assertion){
-    let args = { assertion: assertion };
-    let ev = new this._win.RTCPeerConnectionIdentityEvent("identityresult", args);
-    this.dispatchEvent(ev);
-  },
-
-  // we're going off spec with the error callback here.
-  getIdentityAssertion: function(errorCallback) {
-    this._checkClosed();
-    if (typeof errorCallback !== "function") {
-      if (errorCallback) {
-        let message ="getIdentityAssertion argument must be a function";
-        throw new this._win.DOMError("", message);
-      }
-      errorCallback = function() {
-        this.reportWarning("getIdentityAssertion: no error callback set");
-      }.bind(this);
-    }
-
-    function gotAssertion(assertion) {
-      if (assertion) {
-        this._gotIdentityAssertion(assertion);
-      } else {
-        errorCallback("IdP did not produce an assertion");
-      }
-    }
-
-    try {
-      this._localIdp.getIdentityAssertion(this._impl.fingerprint,
-          gotAssertion.bind(this));
-    }
-    catch (e) {
-      errorCallback("Could not get identity assertion: " + e.message);
-    }
+    this._getPC().setRemoteDescription(type, sdp);
   },
 
   updateIce: function(config, constraints) {
     throw new this._win.DOMError("", "updateIce not yet implemented");
   },
 
   addIceCandidate: function(cand, onSuccess, onError) {
     if (!cand.candidate && !cand.sdpMLineIndex) {
@@ -824,19 +701,19 @@ RTCPeerConnection.prototype = {
     }
     this._onAddIceCandidateSuccess = onSuccess || null;
     this._onAddIceCandidateError = onError || null;
 
     this._queueOrRun({ func: this._addIceCandidate, args: [cand], wait: true });
   },
 
   _addIceCandidate: function(cand) {
-    this._impl.addIceCandidate(cand.candidate, cand.sdpMid || "",
-                               (cand.sdpMLineIndex === null) ? 0 :
-                                 cand.sdpMLineIndex + 1);
+    this._getPC().addIceCandidate(cand.candidate, cand.sdpMid || "",
+                                  (cand.sdpMLineIndex === null)? 0 :
+                                      cand.sdpMLineIndex + 1);
   },
 
   addStream: function(stream, constraints) {
     if (!constraints) {
       constraints = {};
     }
     this._mustValidateConstraints(constraints,
                                   "addStream passed invalid constraints");
@@ -844,91 +721,86 @@ RTCPeerConnection.prototype = {
       throw new this._win.DOMError("", "Invalid stream passed to addStream!");
     }
     this._queueOrRun({ func: this._addStream,
                        args: [stream, constraints],
                        wait: false });
   },
 
   _addStream: function(stream, constraints) {
-    this._impl.addStream(stream, constraints);
+    this._getPC().addStream(stream, constraints);
   },
 
   removeStream: function(stream) {
-     // Bug 844295: Not implementing this functionality.
+     //Bug 844295: Not implementing this functionality.
      throw new this._win.DOMError("", "removeStream not yet implemented");
   },
 
   getStreamById: function(id) {
     throw new this._win.DOMError("", "getStreamById not yet implemented");
   },
 
   close: function() {
     this._queueOrRun({ func: this._close, args: [false], wait: false });
     this._closed = true;
     this.changeIceConnectionState("closed");
   },
 
   _close: function() {
-    this._localIdp.close();
-    this._remoteIdp.close();
-    this._impl.close();
+    this._getPC().close();
   },
 
   getLocalStreams: function() {
     this._checkClosed();
-    return this._impl.getLocalStreams();
+    return this._getPC().getLocalStreams();
   },
 
   getRemoteStreams: function() {
     this._checkClosed();
-    return this._impl.getRemoteStreams();
+    return this._getPC().getRemoteStreams();
   },
 
   get localDescription() {
     this._checkClosed();
-    let sdp = this._impl.localDescription;
+    let sdp = this._getPC().localDescription;
     if (sdp.length == 0) {
       return null;
     }
-
-    sdp = this._localIdp.wrapSdp(sdp);
     return new this._win.mozRTCSessionDescription({ type: this._localType,
                                                     sdp: sdp });
   },
 
   get remoteDescription() {
     this._checkClosed();
-    let sdp = this._impl.remoteDescription;
+    let sdp = this._getPC().remoteDescription;
     if (sdp.length == 0) {
       return null;
     }
     return new this._win.mozRTCSessionDescription({ type: this._remoteType,
                                                     sdp: sdp });
   },
 
-  get peerIdentity() { return this._peerIdentity; },
   get iceGatheringState()  { return this._iceGatheringState; },
   get iceConnectionState() { return this._iceConnectionState; },
 
   get signalingState() {
     // checking for our local pc closed indication
     // before invoking the pc methods.
-    if (this._closed) {
+    if(this._closed) {
       return "closed";
     }
     return {
       "SignalingInvalid":            "",
       "SignalingStable":             "stable",
       "SignalingHaveLocalOffer":     "have-local-offer",
       "SignalingHaveRemoteOffer":    "have-remote-offer",
       "SignalingHaveLocalPranswer":  "have-local-pranswer",
       "SignalingHaveRemotePranswer": "have-remote-pranswer",
       "SignalingClosed":             "closed"
-    }[this._impl.signalingState];
+    }[this._getPC().signalingState];
   },
 
   changeIceGatheringState: function(state) {
     this._iceGatheringState = state;
   },
 
   changeIceConnectionState: function(state) {
     this._iceConnectionState = state;
@@ -950,46 +822,45 @@ RTCPeerConnection.prototype = {
       wait: true
     });
   },
 
   _getStats: function(selector, onSuccess, onError, internal) {
     this._onGetStatsSuccess = onSuccess;
     this._onGetStatsFailure = onError;
 
-    this._impl.getStats(selector, internal);
+    this._getPC().getStats(selector, internal);
   },
 
   getLogging: function(pattern, onSuccess, onError) {
     this._queueOrRun({
       func: this._getLogging,
       args: [pattern, onSuccess, onError],
       wait: true
     });
   },
 
   _getLogging: function(pattern, onSuccess, onError) {
     this._onGetLoggingSuccess = onSuccess;
     this._onGetLoggingFailure = onError;
 
-    this._impl.getLogging(pattern);
+    this._getPC().getLogging(pattern);
   },
 
   createDataChannel: function(label, dict) {
     this._checkClosed();
     if (dict == undefined) {
       dict = {};
     }
     if (dict.maxRetransmitNum != undefined) {
       dict.maxRetransmits = dict.maxRetransmitNum;
       this.reportWarning("Deprecated RTCDataChannelInit dictionary entry maxRetransmitNum used!", null, 0);
     }
     if (dict.outOfOrderAllowed != undefined) {
-      dict.ordered = !dict.outOfOrderAllowed; // the meaning is swapped with
-                                              // the name change
+      dict.ordered = !dict.outOfOrderAllowed; // the meaning is swapped with the name change
       this.reportWarning("Deprecated RTCDataChannelInit dictionary entry outOfOrderAllowed used!", null, 0);
     }
     if (dict.preset != undefined) {
       dict.negotiated = dict.preset;
       this.reportWarning("Deprecated RTCDataChannelInit dictionary entry preset used!", null, 0);
     }
     if (dict.stream != undefined) {
       dict.id = dict.stream;
@@ -1014,17 +885,17 @@ RTCPeerConnection.prototype = {
       type = Ci.IPeerConnection.kDataChannelPartialReliableTimed;
     } else if (dict.maxRetransmits != undefined) {
       type = Ci.IPeerConnection.kDataChannelPartialReliableRexmit;
     } else {
       type = Ci.IPeerConnection.kDataChannelReliable;
     }
 
     // Synchronous since it doesn't block.
-    let channel = this._impl.createDataChannel(
+    let channel = this._getPC().createDataChannel(
       label, protocol, type, !dict.ordered, dict.maxRetransmitTime,
       dict.maxRetransmits, dict.negotiated ? true : false,
       dict.id != undefined ? dict.id : 0xFFFF
     );
     return channel;
   },
 
   connectDataConnection: function(localport, remoteport, numstreams) {
@@ -1034,17 +905,17 @@ RTCPeerConnection.prototype = {
     this._queueOrRun({
       func: this._connectDataConnection,
       args: [localport, remoteport, numstreams],
       wait: false
     });
   },
 
   _connectDataConnection: function(localport, remoteport, numstreams) {
-    this._impl.connectDataConnection(localport, remoteport, numstreams);
+    this._getPC().connectDataConnection(localport, remoteport, numstreams);
   }
 };
 
 function RTCError(code, message) {
   this.name = this.reasonName[Math.min(code, this.reasonName.length - 1)];
   this.message = (typeof message === "string")? message : this.name;
   this.__exposedProps__ = { name: "rw", message: "rw" };
 }
@@ -1093,46 +964,32 @@ PeerConnectionObserver.prototype = {
         // want this to take down peerconnection, but we still want the user
         // to see it, so we catch it, report it, and move on.
         this._dompc.reportError(e.message, e.fileName, e.lineNumber);
       }
     }
   },
 
   onCreateOfferSuccess: function(sdp) {
-    let pc = this._dompc;
-    let fp = pc._impl.fingerprint;
-    pc._localIdp.appendIdentityToSDP(sdp, fp, function(sdp, assertion) {
-      if (assertion) {
-        pc._gotIdentityAssertion(assertion);
-      }
-      this.callCB(pc._onCreateOfferSuccess,
-                  new pc._win.mozRTCSessionDescription({ type: "offer",
-                                                         sdp: sdp }));
-      pc._executeNext();
-    }.bind(this));
+    this.callCB(this._dompc._onCreateOfferSuccess,
+                new this._dompc._win.mozRTCSessionDescription({ type: "offer",
+                                                                sdp: sdp }));
+    this._dompc._executeNext();
   },
 
   onCreateOfferError: function(code, message) {
     this.callCB(this._dompc._onCreateOfferFailure, new RTCError(code, message));
     this._dompc._executeNext();
   },
 
   onCreateAnswerSuccess: function(sdp) {
-    let pc = this._dompc;
-    let fp = pc._impl.fingerprint;
-    pc._localIdp.appendIdentityToSDP(sdp, fp, function(sdp, assertion) {
-      if (assertion) {
-        pc._gotIdentityAssertion(assertion);
-      }
-      this.callCB (pc._onCreateAnswerSuccess,
-                   new pc._win.mozRTCSessionDescription({ type: "answer",
-                                                          sdp: sdp }));
-      pc._executeNext();
-    }.bind(this));
+    this.callCB (this._dompc._onCreateAnswerSuccess,
+                 new this._dompc._win.mozRTCSessionDescription({ type: "answer",
+                                                                 sdp: sdp }));
+    this._dompc._executeNext();
   },
 
   onCreateAnswerError: function(code, message) {
     this.callCB(this._dompc._onCreateAnswerFailure, new RTCError(code, message));
     this._dompc._executeNext();
   },
 
   onSetLocalDescriptionSuccess: function() {
@@ -1366,12 +1223,11 @@ PeerConnectionObserver.prototype = {
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(
   [GlobalPCList,
    RTCIceCandidate,
    RTCSessionDescription,
    RTCPeerConnection,
    RTCStatsReport,
-   RTCIdentityAssertion,
    PeerConnectionObserver,
    WebrtcGlobalInformation]
 );
--- a/dom/media/PeerConnection.manifest
+++ b/dom/media/PeerConnection.manifest
@@ -1,17 +1,15 @@
 component {00e0e20d-1494-4776-8e0e-0f0acbea3c79} PeerConnection.js
 component {f6063d11-f467-49ad-9765-e7923050dc08} PeerConnection.js
 component {d1748d4c-7f6a-4dc5-add6-d55b7678537e} PeerConnection.js
 component {02b9970c-433d-4cc2-923d-f7028ac66073} PeerConnection.js
 component {1775081b-b62d-4954-8ffe-a067bbf508a7} PeerConnection.js
 component {7293e901-2be3-4c02-b4bd-cbef6fc24f78} PeerConnection.js
 component {7fe6e18b-0da3-4056-bf3b-440ef3809e06} PeerConnection.js
-component {1abc7499-3c54-43e0-bd60-686e2703f072} PeerConnection.js
 
 contract @mozilla.org/dom/peerconnection;1 {00e0e20d-1494-4776-8e0e-0f0acbea3c79}
 contract @mozilla.org/dom/webrtcglobalinformation;1 {f6063d11-f467-49ad-9765-e7923050dc08}
 contract @mozilla.org/dom/peerconnectionobserver;1 {d1748d4c-7f6a-4dc5-add6-d55b7678537e}
 contract @mozilla.org/dom/rtcicecandidate;1 {02b9970c-433d-4cc2-923d-f7028ac66073}
 contract @mozilla.org/dom/rtcsessiondescription;1 {1775081b-b62d-4954-8ffe-a067bbf508a7}
 contract @mozilla.org/dom/peerconnectionmanager;1 {7293e901-2be3-4c02-b4bd-cbef6fc24f78}
 contract @mozilla.org/dom/rtcstatsreport;1 {7fe6e18b-0da3-4056-bf3b-440ef3809e06}
-contract @mozilla.org/dom/rtcidentityassertion;1 {1abc7499-3c54-43e0-bd60-686e2703f072}
deleted file mode 100644
--- a/dom/media/PeerConnectionIdp.jsm
+++ /dev/null
@@ -1,340 +0,0 @@
-/* jshint moz:true, browser:true */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-this.EXPORTED_SYMBOLS = ["PeerConnectionIdp"];
-
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "IdpProxy",
-  "resource://gre/modules/media/IdpProxy.jsm");
-
-/**
- * Creates an IdP helper.
- *
- * @param window (object) the window object to use for miscellaneous goodies
- * @param timeout (int) the timeout in milliseconds
- * @param warningFunc (function) somewhere to dump warning messages
- */
-function PeerConnectionIdp(window, timeout, warningFunc) {
-  this._win = window;
-  this._timeout = timeout || 5000;
-  this._warning = warningFunc;
-
-  this.assertion = null;
-  this.provider = null;
-}
-
-(function() {
-  PeerConnectionIdp._mLinePattern = new RegExp("^m=", "m");
-  // attributes are funny, the 'a' is case sensitive, the name isn't
-  let pattern = "^a=[iI][dD][eE][nN][tT][iI][tT][yY]:(\\S+)";
-  PeerConnectionIdp._identityPattern = new RegExp(pattern, "m");
-  pattern = "^a=[fF][iI][nN][gG][eE][rR][pP][rR][iI][nN][tT]:(\\S+) (\\S+)";
-  PeerConnectionIdp._fingerprintPattern = new RegExp(pattern, "m");
-})();
-
-PeerConnectionIdp.prototype = {
-  setIdentityProvider: function(
-      provider, protocol, username) {
-    this.provider = provider;
-    this._idpchannel = new IdpProxy(provider, protocol, username);
-  },
-
-  close: function() {
-    this.assertion = null;
-    this.provider = null;
-    if (this._idpchannel) {
-      this._idpchannel.close();
-      this._idpchannel = null;
-    }
-  },
-
-  _getFingerprintFromSdp: function(sdp) {
-    let sections = sdp.split(PeerConnectionIdp._mLinePattern);
-    let attributes = sections.map(function(sect) {
-      let m = sect.match(PeerConnectionIdp._fingerprintPattern);
-      if (m) {
-        let remainder = sect.substring(m.index + m[0].length);
-        if (!remainder.match(PeerConnectionIdp._fingerprintPattern)) {
-          return { algorithm: m[1], digest: m[2] };
-        }
-        this._warning("RTC identity: two fingerprint values in same media " +
-            "section are not supported", null, 0);
-        // we have to return non-falsy here so that a media section doesn't
-        // accidentally fall back to the session-level stuff (which is bad)
-        return "error";
-      }
-      // return undefined unless there is exactly one match
-    }, this);
-
-    let sessionLevel = attributes.shift();
-    attributes = attributes.map(function(sectionLevel) {
-      return sectionLevel || sessionLevel;
-    });
-
-    let first = attributes.shift();
-    function sameAsFirst(attr) {
-      return typeof attr === "object" &&
-      first.algorithm === attr.algorithm &&
-      first.digest === attr.digest;
-    }
-
-    if (typeof first === "object" && attributes.every(sameAsFirst)) {
-      return first;
-    }
-    // undefined!
-  },
-
-  _getIdentityFromSdp: function(sdp) {
-    // we only pull from the session level right now
-    // TODO allow for per-m=-section identity
-    let mLineMatch = sdp.match(PeerConnectionIdp._mLinePattern);
-    let sessionLevel = sdp.substring(0, mLineMatch.index);
-    let idMatch = sessionLevel.match(PeerConnectionIdp._identityPattern);
-    if (idMatch) {
-      let assertion = {};
-      try {
-        assertion = JSON.parse(atob(idMatch[1]));
-      } catch (e) {
-        this._warning("RTC identity: invalid identity assertion: " + e, null, 0);
-      } // for JSON.parse
-      if (typeof assertion.idp === "object" &&
-          typeof assertion.idp.domain === "string" &&
-          typeof assertion.assertion === "string") {
-        return assertion;
-      }
-      this._warning("RTC identity: assertion missing idp/idp.domain/assertion",
-                    null, 0);
-    }
-    // undefined!
-  },
-
-  /**
-   * Queues a task to verify the a=identity line the given SDP contains, if any.
-   * If the verification succeeds callback is called with the message from the
-   * IdP proxy as parameter, else (verification failed OR no a=identity line in
-   * SDP at all) null is passed to callback.
-   */
-  verifyIdentityFromSDP: function(sdp, callback) {
-    let identity = this._getIdentityFromSdp(sdp);
-    let fingerprint = this._getFingerprintFromSdp(sdp);
-    // it's safe to use the fingerprint from the SDP here,
-    // only because we ensure that there is only one
-    if (!fingerprint || !identity) {
-      callback(null);
-      return;
-    }
-    if (!this._idpchannel) {
-      this.setIdentityProvider(identity.idp.domain, identity.idp.protocol);
-    }
-
-    this._verifyIdentity(identity.assertion, fingerprint, callback);
-  },
-
-  /**
-   * Checks that the name in the identity provided by the IdP is OK.
-   *
-   * @param name (string) the name to validate
-   * @returns (string) an error message, iff the name isn't good
-   */
-  _validateName: function(name) {
-    if (typeof name !== "string") {
-      return "name not a string";
-    }
-    let atIdx = name.indexOf("@");
-    if (atIdx > 0) {
-      // no third party assertions... for now
-      let tail = name.substring(atIdx + 1);
-
-      // strip the port number, if present
-      let provider = this.provider;
-      let providerPortIdx = provider.indexOf(":");
-      if (providerPortIdx > 0) {
-        provider = provider.substring(0, providerPortIdx);
-      }
-      // this really isn't correct for IDN names
-      // Bug 958741 will fix that
-      if (tail.toLowerCase() !== provider.toLowerCase()) {
-        return "name '" + identity.name +
-            "' doesn't match IdP: '" + this.provider + "'";
-      }
-      return null;
-    }
-    return "missing authority in name from IdP";
-  },
-
-  // we are very defensive here when handling the message from the IdP
-  // proxy so that broken IdPs can only do as little harm as possible.
-  _checkVerifyResponse: function(
-      message, fingerprint) {
-    let warn = function(message) {
-      this._warning("RTC identity: VERIFY error: " + message, null, 0);
-    }.bind(this);
-
-    try {
-      let contents = JSON.parse(message.contents);
-      if (typeof contents.fingerprint !== "object" ||
-          typeof message.identity !== "object") {
-        warn("fingerprint or identity not objects");
-      } else if (contents.fingerprint.digest !== fingerprint.digest ||
-          contents.fingerprint.algorithm !== fingerprint.algorithm) {
-        warn("fingerprint does not match");
-      } else {
-        let error = this._validateName(message.identity.name);
-        if (error) {
-          warn(error);
-        } else {
-          return true;
-        }
-      }
-    } catch(e) {
-      warn("invalid JSON in content");
-    }
-    return false;
-  },
-
-  /**
-   * Asks the IdP proxy to verify an identity.
-   */
-  _verifyIdentity: function(
-      assertion, fingerprint, callback) {
-    function onVerification(message) {
-      if (!message) {
-        this._warning("RTC identity: verification failure", null, 0);
-        callback(null);
-        return;
-      }
-      if (this._checkVerifyResponse(message, fingerprint)) {
-        callback(message);
-      } else {
-        callback(null);
-      }
-    }
-
-    this._sendToIdp("VERIFY", assertion, onVerification.bind(this));
-  },
-
-  /**
-   * Asks the IdP proxy for an identity assertion and, on success, enriches the
-   * given SDP with an a=identity line and calls callback with the new SDP as
-   * parameter. If no IdP is configured the original SDP (without a=identity
-   * line) is passed to the callback.
-   */
-  appendIdentityToSDP: function(
-      sdp, fingerprint, callback) {
-    if (!this._idpchannel) {
-      callback(sdp);
-      return;
-    }
-
-    if (this.assertion) {
-      callback(this.wrapSdp(sdp));
-      return;
-    }
-
-    function onAssertion(assertion) {
-      if (!assertion) {
-        this._warning("RTC identity: assertion generation failure", null, 0);
-        callback(sdp);
-        return;
-      }
-
-      this.assertion = btoa(JSON.stringify(assertion));
-      callback(this.wrapSdp(sdp), this.assertion);
-    }
-
-    this._getIdentityAssertion(fingerprint, onAssertion.bind(this));
-  },
-
-  /**
-   * Inserts an identity assertion into the given SDP.
-   */
-  wrapSdp: function(sdp) {
-    if (!this.assertion) {
-      return sdp;
-    }
-
-    // yes, we assume that this matches; if it doesn't something is *wrong*
-    let match = sdp.match(PeerConnectionIdp._mLinePattern);
-    return sdp.substring(0, match.index) +
-      "a=identity:" + this.assertion + "\r\n" +
-      sdp.substring(match.index);
-  },
-
-  getIdentityAssertion: function(
-      fingerprint, callback) {
-    if (!this._idpchannel) {
-      throw new Error("IdP not set");
-    }
-
-    this._getIdentityAssertion(fingerprint, callback);
-  },
-
-  _getIdentityAssertion: function(
-      fingerprint, callback) {
-    let [algorithm, digest] = fingerprint.split(" ");
-    let message = {
-      fingerprint: {
-        algorithm: algorithm,
-        digest: digest
-      }
-    };
-    this._sendToIdp("SIGN", JSON.stringify(message), callback);
-  },
-
-  /**
-   * Packages a message and sends it to the IdP.
-   */
-  _sendToIdp: function(type, message, callback) {
-    let origin = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
-        .getInterface(Ci.nsIWebNavigation)
-        .QueryInterface(Ci.nsIDocShell).chromeEventHandler
-        .ownerDocument
-        .defaultView
-        .gBrowser
-        .currentURI
-        .prePath;
-
-    this._idpchannel.send({
-      type: type,
-      message: message,
-      origin: origin
-    }, this._wrapCallback(callback));
-  },
-
-  /**
-   * Wraps a callback, adding a timeout and ensuring that the callback doesn't
-   * receive any message other than one where the IdP generated a "SUCCESS"
-   * response.
-   */
-  _wrapCallback: function(callback) {
-    let timeout = this._win.setTimeout(function() {
-      this._warning("RTC identity: IdP timeout for " + this._idpchannel + " " +
-           (this._idpchannel.ready ? "[ready]" : "[not ready]"), null, 0);
-      timeout = null;
-      callback(null);
-    }.bind(this), this._timeout);
-
-    return function(message) {
-      if (!timeout) {
-        return;
-      }
-      this._win.clearTimeout(timeout);
-      timeout = null;
-      var content = null;
-      if (message.type === "SUCCESS") {
-        content = message.message;
-      } else {
-        this._warning("RTC Identity: received response of type '" +
-            message.type + "' from IdP: " + message.message, null, 0);
-      }
-      callback(content);
-    }.bind(this);
-  }
-};
-
-this.PeerConnectionIdp = PeerConnectionIdp;
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -35,23 +35,16 @@ UNIFIED_SOURCES += [
     'MediaManager.cpp',
 ]
 
 EXTRA_COMPONENTS += [
     'PeerConnection.js',
     'PeerConnection.manifest',
 ]
 
-JS_MODULES_PATH = 'modules/media'
-
-EXTRA_JS_MODULES += [
-    'IdpProxy.jsm',
-    'PeerConnectionIdp.jsm',
-]
-
 if CONFIG['MOZ_B2G']:
     EXPORTS.mozilla += [
         'MediaPermissionGonk.h',
     ]
     SOURCES += [
         'MediaPermissionGonk.cpp',
     ]
 
--- a/dom/media/tests/mochitest/Makefile.in
+++ b/dom/media/tests/mochitest/Makefile.in
@@ -2,12 +2,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # The following tests are leaking and cannot be run by default yet
 ifdef MOZ_WEBRTC_LEAKING_TESTS
 MOCHITEST_FILES += \
   $(NULL)
 endif
-
-INSTALL_TARGETS += idpproxy
-idpproxy_FILES := idp.html idp-proxy.js
-idpproxy_DEST := $(DEPTH)/_tests/testing/mochitest/.well-known/idp-proxy/
--- a/dom/media/tests/mochitest/head.js
+++ b/dom/media/tests/mochitest/head.js
@@ -112,20 +112,17 @@ function getUserMedia(constraints, onSuc
  * @param {Function} aCallback
  *        Test method to execute after initialization
  */
 function runTest(aCallback) {
   if (window.SimpleTest) {
     // Running as a Mochitest.
     SimpleTest.waitForExplicitFinish();
     SpecialPowers.pushPrefEnv({'set': [
-      ['dom.messageChannel.enabled', true],
       ['media.peerconnection.enabled', true],
-      ['media.peerconnection.identity.enabled', true],
-      ['media.peerconnection.identity.timeout', 1000],
       ['media.navigator.permission.disabled', true]]
     }, function () {
       try {
         aCallback();
       }
       catch (err) {
         unexpectedCallbackAndFinish()(err);
       }
deleted file mode 100644
--- a/dom/media/tests/mochitest/idp-proxy.js
+++ /dev/null
@@ -1,96 +0,0 @@
-(function(global) {
-  "use strict";
-
-  function IDPJS() {
-    this.domain = window.location.host;
-    // so rather than create a million different IdP configurations and litter
-    // the world with files all containing near-identical code, let's use the
-    // hash/URL fragment as a way of generating instructions for the IdP
-    this.instructions = window.location.hash.replace("#", "").split(":");
-    this.port = window.rtcwebIdentityPort;
-    this.port.onmessage = this.receiveMessage.bind(this);
-    this.sendResponse({
-      type : "READY"
-    });
-  }
-
-  IDPJS.prototype.getDelay = function() {
-    // instructions in the form "delay123" have that many milliseconds
-    // added before sending the response
-    var delay = 0;
-    function addDelay(instruction) {
-      var m = instruction.match(/^delay(\d+)$/);
-      if (m) {
-        delay += parseInt(m[1], 10);
-      }
-    }
-    this.instructions.forEach(addDelay);
-    return delay;
-  };
-
-  function is(target) {
-    return function(instruction) {
-      return instruction === target;
-    };
-  }
-
-  IDPJS.prototype.sendResponse = function(response) {
-    // we don't touch the READY message unless told to
-    if (response.type === "READY" && !this.instructions.some(is("ready"))) {
-      this.port.postMessage(response);
-      return;
-    }
-
-    // if any instruction is "error", return an error.
-    if (this.instructions.some(is("error"))) {
-      response.type = "ERROR";
-    }
-
-    window.setTimeout(function() {
-      this.port.postMessage(response);
-    }.bind(this), this.getDelay());
-  };
-
-  IDPJS.prototype.receiveMessage = function(ev) {
-    var message = ev.data;
-    switch (message.type) {
-    case "SIGN":
-      this.sendResponse({
-        type : "SUCCESS",
-        id : message.id,
-        message : {
-          idp : {
-            domain : this.domain,
-            protocol : "idp.html"
-          },
-          assertion : JSON.stringify({
-            identity : "someone@" + this.domain,
-            contents : message.message
-          })
-        }
-      });
-      break;
-    case "VERIFY":
-      this.sendResponse({
-        type : "SUCCESS",
-        id : message.id,
-        message : {
-          identity : {
-            name : "someone@" + this.domain,
-            displayname : "Someone"
-          },
-          contents : JSON.parse(message.message).contents
-        }
-      });
-      break;
-    default:
-      this.sendResponse({
-        type : "ERROR",
-        error : JSON.stringify(message)
-      });
-      break;
-    }
-  };
-
-  global.idp = new IDPJS();
-}(this));
deleted file mode 100644
--- a/dom/media/tests/mochitest/idp.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <title>IDP Proxy</title>
-    <script src="idp-proxy.js"></script>
-  </head>
-  <body>
-    Test IDP Proxy
-  </body>
-</html>
--- a/dom/media/tests/mochitest/mochitest.ini
+++ b/dom/media/tests/mochitest/mochitest.ini
@@ -47,12 +47,8 @@ skip-if = os == 'mac'
 [test_peerConnection_setLocalAnswerInHaveLocalOffer.html]
 [test_peerConnection_setLocalAnswerInStable.html]
 [test_peerConnection_setLocalOfferInHaveRemoteOffer.html]
 [test_peerConnection_setRemoteAnswerInHaveRemoteOffer.html]
 [test_peerConnection_setRemoteAnswerInStable.html]
 [test_peerConnection_setRemoteOfferInHaveLocalOffer.html]
 [test_peerConnection_throwInCallbacks.html]
 [test_peerConnection_toJSON.html]
-[test_setIdentityProvider.html]
-[test_setIdentityProviderWithErrors.html]
-[test_getIdentityAssertion.html]
-[test_idpproxy.html]
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -430,21 +430,16 @@ function PCT_createAnswer(peer, onSucces
  */
 PeerConnectionTest.prototype.createOffer =
 function PCT_createOffer(peer, onSuccess) {
   peer.createOffer(function (offer) {
     onSuccess(offer);
   });
 };
 
-PeerConnectionTest.prototype.setIdentityProvider =
-function(peer, provider, protocol, identity) {
-  peer.setIdentityProvider(provider, protocol, identity);
-};
-
 /**
  * Sets the local description for the specified peer connection instance
  * and automatically handles the failure case.
  *
  * @param {PeerConnectionWrapper} peer
           The peer connection wrapper to run the command on
  * @param {mozRTCSessionDescription} desc
  *        Session description for the local description request
@@ -670,17 +665,17 @@ DataChannelTest.prototype = Object.creat
           // externally negotiated - we need to open from both ends
           options.id = options.id || channel.id;  // allow for no id to let the impl choose
           self.pcRemote.createDataChannel(options, function (channel) {
             remoteChannel = channel;
             check_next_test();
           });
         } else {
           check_next_test();
-        }
+	}
       });
     }
   },
 
   send : {
     /**
      * Send data (message or blob) to the other peer
      *
@@ -1109,20 +1104,16 @@ PeerConnectionWrapper.prototype = {
    * Returns the ICE connection state.
    *
    * @returns {object} The local description
    */
   get iceConnectionState() {
     return this._pc.iceConnectionState;
   },
 
-  setIdentityProvider: function(provider, protocol, identity) {
-      this._pc.setIdentityProvider(provider, protocol, identity);
-  },
-
   /**
    * Callback when we get media from either side. Also an appropriate
    * HTML media element will be created.
    *
    * @param {MediaStream} stream
    *        Media stream to handle
    * @param {string} type
    *        The type of media stream ('audio' or 'video')
deleted file mode 100644
--- a/dom/media/tests/mochitest/test_getIdentityAssertion.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="head.js"></script>
-  <script type="application/javascript" src="pc.js"></script>
-  <script type="application/javascript" src="templates.js"></script>
-</head>
-<body>
-<pre id="test">
-<script type="application/javascript">
-  createHTML({
-    title: "getIdentityAssertion Tests"
-  });
-
-var test;
-function theTest() {
-  test = new PeerConnectionTest();
-  test.setMediaConstraints([{audio: true}], [{audio: true}]);
-  test.chain.append([
-  [
-    "GET_IDENTITY_ASSERTION_FAILS_WITHOUT_PROVIDER",
-    function(test) {
-      test.pcLocal._pc.getIdentityAssertion(function(err) {
-        ok(err, "getIdentityAssertion must fail without provider");
-        test.next();
-      });
-    },
-  ],
-  [
-    "GET_IDENTITY_ASSERTION_FIRES_EVENTUALLY_AND_SUBSEQUENTLY",
-    function(test) {
-      var fired = 0;
-      test.setIdentityProvider(test.pcLocal, 'example.com', 'idp.html', 'nobody');
-      test.pcLocal._pc.onidentityresult = function() {
-        fired++;
-        if (fired == 1) {
-          ok(true, "identityresult fired");
-        } else if (fired == 2) {
-          ok(true, "identityresult fired 2x");
-          test.next();
-        }
-      };
-      test.pcLocal._pc.getIdentityAssertion();
-      test.pcLocal._pc.getIdentityAssertion();
-    }
-  ],
-  [
-    "GET_IDENTITY_ASSERTION_FAILS",
-    function(test) {
-      test.setIdentityProvider(test.pcLocal, 'example.com', 'idp.html#error');
-      test.pcLocal._pc.onidentityresult = function(e) {
-       ok(false, "Should not get an identity result");
-        test.next();
-      };
-      test.pcLocal._pc.getIdentityAssertion(function(err) {
-        ok(err, "Got error callback from getIdentityAssertion");
-        test.next();
-      });
-    }
-  ],
-  [
-    "GET_IDENTITY_ASSERTION_IDP_NOT_READY",
-    function(test) {
-      test.setIdentityProvider(test.pcLocal, 'example.com', 'idp.html#error:ready');
-      test.pcLocal._pc.onidentityresult = function(e) {
-        ok(false, "Should not get an identity result");
-        test.next();
-      };
-      test.pcLocal._pc.getIdentityAssertion(function(err) {
-        ok(err, "Got error callback from getIdentityAssertion");
-        test.next();
-      });
-    }
-  ]
-  ]);
-  test.run();
-}
-runTest(theTest);
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/media/tests/mochitest/test_idpproxy.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<html>
-<head>
-<meta charset="utf-8" />
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-</head>
-<body>
-  <script class="testbody" type="application/javascript">
-"use strict";
-var Cu = SpecialPowers.Cu;
-var rtcid = Cu.import("resource://gre/modules/media/IdpProxy.jsm");
-var IdpProxy = rtcid.IdpProxy;
-var request = {
-  type: "SIGN",
-  message: "foo"
-};
-
-function test_domain_sandbox(done) {
-  var diabolical = {
-    toString : function() {
-      return "example.com/path";
-    }
-  };
-  var domains = [ "ex/foo", "user@ex", "user:pass@ex", "ex#foo", "ex?foo",
-                  "", 12, null, diabolical, true ];
-  domains.forEach(function(domain) {
-    try {
-      var idp = new IdpProxy(domain);
-      ok(false, "IdpProxy didn't catch bad domain: " + domain);
-    } catch (e) {
-      var str = (typeof domain === "string") ? domain : typeof domain;
-      ok(true, "Evil domain '" + str + "' raises exception");
-    }
-  });
-  done();
-}
-
-function test_protocol_sandbox(done) {
-  var protos = [ "../evil/proto", "..%2Fevil%2Fproto",
-                 "\\evil", "%5cevil", 12, true, {} ];
-  protos.forEach(function(proto) {
-    try {
-      var idp = new IdpProxy("example.com", proto);
-      ok(false, "IdpProxy didn't catch bad protocol: " + proto);
-    } catch (e) {
-      var str = (typeof proto === "string") ? proto : typeof proto;
-      ok(true, "Evil protocol '" + proto + "' raises exception");
-    }
-  });
-  done();
-}
-
-function handleFailure(done) {
-  return function failure(error) {
-    ok(false, "IdP error" + error);
-    done();
-  };
-}
-
-function test_success_response(done) {
-  var idp;
-
-  function handleResponse(response) {
-    is(SpecialPowers.wrap(response).type, "SUCCESS", "IdP responds with SUCCESS");
-    idp.close();
-    done();
-  }
-
-  idp = new IdpProxy("example.com", "idp.html");
-  idp.start(handleFailure(done));
-  idp.send(request, handleResponse);
-}
-
-function test_error_response(done) {
-  var idp;
-
-  function handleResponse(response) {
-    is(SpecialPowers.wrap(response).type, "ERROR", "IdP should produce ERROR");
-    idp.close();
-    done();
-  }
-
-  idp = new IdpProxy("example.com", "idp.html#error");
-  idp.start(handleFailure(done));
-  idp.send(request, handleResponse);
-}
-
-function test_delayed_response(done) {
-  var idp;
-
-  function handleResponse(response) {
-    is(SpecialPowers.wrap(response).type, "SUCCESS",
-       "IdP should handle delayed response");
-    idp.close();
-    done();
-  }
-
-  idp = new IdpProxy("example.com", "idp.html#delay100");
-  idp.start(handleFailure(done));
-  idp.send(request, handleResponse);
-}
-
-var TESTS = [ test_domain_sandbox, test_protocol_sandbox,
-              test_success_response, test_error_response,
-              test_delayed_response ];
-
-function run_next_test() {
-  if (TESTS.length) {
-    var test = TESTS.shift();
-    test(run_next_test);
-  } else {
-    SimpleTest.finish();
-  }
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({
-  "set" : [ [ "dom.messageChannel.enabled", true ] ]
-}, run_next_test);
-</script>
-  </body>
-</html>
deleted file mode 100644
--- a/dom/media/tests/mochitest/test_setIdentityProvider.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8"/>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="head.js"></script>
-  <script type="application/javascript" src="pc.js"></script>
-  <script type="application/javascript" src="templates.js"></script>
-</head>
-<body>
-<pre id="test">
-<script type="application/javascript">
-  createHTML({
-    title: "setIdentityProvider leads to peerIdentity and assertions in SDP"
-  });
-
-var test;
-function theTest() {
-  test = new PeerConnectionTest();
-  test.setMediaConstraints([{audio: true}], [{audio: true}]);
-  test.setIdentityProvider(test.pcLocal, 'test1.example.com', 'idp.html', 'nobody');
-  test.setIdentityProvider(test.pcRemote, 'test2.example.com', 'idp.html', 'nobody');
-  test.chain.append([
-  [
-    "PEER_IDENTITY_IS_SET_CORRECTLY",
-    function(test) {
-      var outstanding = 0;
-      // we have to wait for the identity result in order to get the actual
-      // identity information, since the call will complete before the identity
-      // provider has a chance to finish verifying... that's OK, but it makes
-      // testing more difficult
-
-      function checkOrSetupCheck(pc, pfx, idp, name) {
-        function checkIdentity() {
-          is(pc.peerIdentity.idp, idp, pfx + "IdP is correct");
-          is(pc.peerIdentity.name, name + "@" + idp, pfx + "identity is correct");
-        }
-        if (pc.peerIdentity) {
-          checkIdentity();
-        } else {
-          ++outstanding;
-          pc.onpeeridentity = function checkIdentityEvent(e) {
-            checkIdentity();
-            --outstanding;
-            if (outstanding <= 0) {
-              test.next();
-            }
-          };
-        }
-      }
-
-      checkOrSetupCheck(test.pcLocal._pc, "local: ", "test2.example.com", "someone");
-      checkOrSetupCheck(test.pcRemote._pc, "remote: ", "test1.example.com", "someone");
-      if (outstanding <= 0) {
-        test.next();
-      }
-    }
-  ],
-  [
-    "OFFERS_AND_ANSWERS_INCLUDE_IDENTITY",
-    function(test) {
-      ok(test.pcLocal._last_offer.sdp.contains("a=identity"), "a=identity is in the offer SDP");
-      ok(test.pcRemote._last_answer.sdp.contains("a=identity"), "a=identity is in the answer SDP");
-      test.next();
-    }
-  ],
-  [
-    "DESCRIPTIONS_CONTAIN_IDENTITY",
-    function(test) {
-      ok(test.pcLocal.localDescription.sdp.contains("a=identity"),
-                         "a=identity is in the local copy of the offer");
-      ok(test.pcRemote.localDescription.sdp.contains("a=identity"),
-                         "a=identity is in the remote copy of the offer");
-      ok(test.pcLocal.remoteDescription.sdp.contains("a=identity"),
-                         "a=identity is in the local copy of the answer");
-      ok(test.pcRemote.remoteDescription.sdp.contains("a=identity"),
-                         "a=identity is in the remote copy of the answer");
-      test.next();
-    }
-  ]
-  ]);
-  test.run();
-}
-runTest(theTest);
-
-
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/media/tests/mochitest/test_setIdentityProviderWithErrors.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="head.js"></script>
-  <script type="application/javascript" src="pc.js"></script>
-  <script type="application/javascript" src="templates.js"></script>
-</head>
-<body>
-<pre id="test">
-<script type="application/javascript">
-  createHTML({
-    title: "Identity Provider returning errors is handled correctly"
-  });
-
-var test;
-runTest(function () {
-  test = new PeerConnectionTest();
-  test.setMediaConstraints([{audio: true}], [{audio: true}]);
-  // first example generates an error
-  test.setIdentityProvider(test.pcLocal, 'example.com', 'idp.html#error', 'nobody');
-  // first doesn't even get a ready message from the IdP - results in a timeout
-  test.setIdentityProvider(test.pcRemote, 'example.com', 'idp.html#error:ready', 'nobody');
-  test.chain.append([
-  [
-    "PEER_IDENTITY_IS_EMPTY",
-    function(test) {
-      ok(!test.pcLocal._pc.peerIdentity, "local peerIdentity is not set");
-      ok(!test.pcRemote._pc.peerIdentity, "remote peerIdentity is not set");
-      test.next();
-    }
-  ],
-  [
-    "OFFERS_AND_ANSWERS_DONT_INCLUDE_IDENTITY",
-    function(test) {
-      ok(!test.pcLocal._last_offer.sdp.contains("a=identity"), "a=identity not contained in the offer SDP");
-      ok(!test.pcRemote._last_answer.sdp.contains("a=identity"), "a=identity not contained in the answer SDP");
-      test.next();
-    }
-  ],
-  ]);
-  test.run();
-});
-
-</script>
-</pre>
-</body>
-</html>
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -437,17 +437,16 @@ var interfaceNamesInGlobalScope =
     {name: "Promise", b2g: false, release: false},
     "PropertyNodeList",
     "Range",
     "RecordErrorEvent",
     "Rect",
     "RGBColor",
     {name: "RTCDataChannelEvent", pref: "media.peerconnection.enabled"},
     {name: "RTCPeerConnectionIceEvent", pref: "media.peerconnection.enabled"},
-    {name: "RTCPeerConnectionIdentityEvent", pref: "media.peerconnection.identity.enabled"},
     {name: "RTCStatsReport", pref: "media.peerconnection.enabled"},
     "Screen",
     "ScriptProcessorNode",
     "ScrollAreaEvent",
     "Selection",
     "SettingsLock",
     "SettingsManager",
     {name: "ShadowRoot", pref: "dom.webcomponents.enabled"},
deleted file mode 100644
--- a/dom/webidl/RTCIdentityAssertion.webidl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2013/WD-webrtc-20130910/#idl-def-RTCIdentityAssertion
- */
-
-[Pref="media.peerconnection.identity.enabled",
- JSImplementation="@mozilla.org/dom/rtcidentityassertion;1",
- Constructor(DOMString idp, DOMString name)]
-interface RTCIdentityAssertion {
-  attribute DOMString idp;
-  attribute DOMString name;
-};
--- a/dom/webidl/RTCPeerConnection.webidl
+++ b/dom/webidl/RTCPeerConnection.webidl
@@ -82,22 +82,16 @@ dictionary MediaConstraintsInternal {
 interface RTCDataChannel;
 
 [Pref="media.peerconnection.enabled",
  JSImplementation="@mozilla.org/dom/peerconnection;1",
  Constructor (optional RTCConfiguration configuration,
               optional object? constraints)]
 // moz-prefixed until sufficiently standardized.
 interface mozRTCPeerConnection : EventTarget  {
-  [Pref="media.peerconnection.identity.enabled"]
-  void setIdentityProvider (DOMString provider,
-                            optional DOMString protocol,
-                            optional DOMString username);
-  [Pref="media.peerconnection.identity.enabled"]
-  void getIdentityAssertion(optional RTCPeerConnectionErrorCallback failureCallback);
   void createOffer (RTCSessionDescriptionCallback successCallback,
                     RTCPeerConnectionErrorCallback failureCallback,
                     optional MediaConstraints constraints);
   void createAnswer (RTCSessionDescriptionCallback successCallback,
                      RTCPeerConnectionErrorCallback failureCallback,
                      optional MediaConstraints constraints);
   void setLocalDescription (mozRTCSessionDescription description,
                             optional VoidFunction successCallback,
@@ -110,19 +104,16 @@ interface mozRTCPeerConnection : EventTa
   readonly attribute RTCSignalingState signalingState;
   void updateIce (optional RTCConfiguration configuration,
                   optional MediaConstraints constraints);
   void addIceCandidate (mozRTCIceCandidate candidate,
                         optional VoidFunction successCallback,
                         optional RTCPeerConnectionErrorCallback failureCallback);
   readonly attribute RTCIceGatheringState iceGatheringState;
   readonly attribute RTCIceConnectionState iceConnectionState;
-  [Pref="media.peerconnection.identity.enabled"]
-  readonly attribute RTCIdentityAssertion? peerIdentity;
-
   sequence<MediaStream> getLocalStreams ();
   sequence<MediaStream> getRemoteStreams ();
   MediaStream? getStreamById (DOMString streamId);
   void addStream (MediaStream stream, optional MediaConstraints constraints);
   void removeStream (MediaStream stream);
   void close ();
   attribute EventHandler onnegotiationneeded;
   attribute EventHandler onicecandidate;
@@ -141,26 +132,25 @@ interface mozRTCPeerConnection : EventTa
                          RTCPeerConnectionErrorCallback failureCallback);
 
   // Data channel.
   RTCDataChannel createDataChannel (DOMString label,
                                     optional RTCDataChannelInit dataChannelDict);
   attribute EventHandler ondatachannel;
   attribute EventHandler onconnection;
   attribute EventHandler onclosedconnection;
-  [Pref="media.peerconnection.identity.enabled"]
-  attribute EventHandler onidentityresult;
-  [Pref="media.peerconnection.identity.enabled"]
-  attribute EventHandler onpeeridentity;
 };
 
 callback RTCLogCallback = void (sequence<DOMString> logMessages);
 
 [JSImplementation="@mozilla.org/dom/webrtcglobalinformation;1",
  ChromeOnly,
  Constructor ()]
 interface WebrtcGlobalInformation {
     void getAllStats(RTCStatsCallback callback,
                      RTCPeerConnectionErrorCallback errorCallback);
     void getCandPairLogs(DOMString candPairId,
                          RTCLogCallback callback,
                          RTCPeerConnectionErrorCallback errorCallback);
 };
+
+
+
deleted file mode 100644
--- a/dom/webidl/RTCPeerConnectionIdentityEvent.webidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Proposed only, not in spec yet:
- * http://lists.w3.org/Archives/Public/public-webrtc/2013Dec/0104.html
- */
-
-dictionary RTCPeerConnectionIdentityEventInit : EventInit {
-  DOMString? assertion = null;
-};
-
-[Pref="media.peerconnection.identity.enabled",
- Constructor(DOMString type,
-             optional RTCPeerConnectionIdentityEventInit eventInitDict)]
-interface RTCPeerConnectionIdentityEvent : Event {
-  readonly attribute DOMString? assertion;
-};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -265,17 +265,16 @@ WEBIDL_FILES = [
     'ProcessingInstruction.webidl',
     'Promise.webidl',
     'PushManager.webidl',
     'Range.webidl',
     'Rect.webidl',
     'RGBColor.webidl',
     'RTCConfiguration.webidl',
     'RTCIceCandidate.webidl',
-    'RTCIdentityAssertion.webidl',
     'RTCPeerConnection.webidl',
     'RTCSessionDescription.webidl',
     'RTCStatsReport.webidl',
     'Screen.webidl',
     'ScriptProcessorNode.webidl',
     'ScrollAreaEvent.webidl',
     'Selection.webidl',
     'SettingsManager.webidl',
@@ -566,17 +565,16 @@ GENERATED_EVENTS_WEBIDL_FILES = [
     'MediaStreamEvent.webidl',
     'MozContactChangeEvent.webidl',
     'MozEmergencyCbModeEvent.webidl',
     'MozInterAppMessageEvent.webidl',
     'MozOtaStatusEvent.webidl',
     'MozStkCommandEvent.webidl',
     'RTCDataChannelEvent.webidl',
     'RTCPeerConnectionIceEvent.webidl',
-    'RTCPeerConnectionIdentityEvent.webidl',
     'TrackEvent.webidl',
     'UserProximityEvent.webidl',
     'USSDReceivedEvent.webidl',
 ]
 
 if CONFIG['MOZ_GAMEPAD']:
     GENERATED_EVENTS_WEBIDL_FILES += [
         'GamepadAxisMoveEvent.webidl',
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -1883,81 +1883,48 @@ gsmsdp_set_setup_attribute(uint16_t leve
  * gsmsdp_set_dtls_fingerprint_attribute
  *
  * Description:
  *
  * Adds an dtls fingerprint attribute attributes to the specified SDP.
  *
  * Parameters:
  *
- * sdp_attr     - The attribute to set
+ * session      - true = session level attribute, false = media line attribute
  * level        - The media level of the SDP where the media attribute exists.
- * sdp_p        - Pointer to the SDP to set the attribute against.
- * hash_func    - hash function string, e.g. "sha-256"
+ * sdp_p        - Pointer to the SDP to set the ice candidate attribute against.
+ * hash_func    - hash function string, e.g. "sha-1"
+ * hash_func_len   - string len
  * fingerprint     - fingerprint attribute to set
+ * fingerprint_len - string len of fingerprint
  */
 static void
 gsmsdp_set_dtls_fingerprint_attribute (sdp_attr_e sdp_attr, uint16_t level, void *sdp_p,
-  char *hash_func, char *fingerprint)
+  char *hash_func,char *fingerprint)
 {
     uint16_t      a_instance = 0;
     sdp_result_e  result;
     char hash_and_fingerprint[FSMDEF_MAX_DIGEST_ALG_LEN + FSMDEF_MAX_DIGEST_LEN + 2];
 
     snprintf(hash_and_fingerprint, sizeof(hash_and_fingerprint),
          "%s %s", hash_func, fingerprint);
 
     result = sdp_add_new_attr(sdp_p, level, 0, sdp_attr, &a_instance);
     if (result != SDP_SUCCESS) {
         GSM_ERR_MSG("Failed to add attribute");
         return;
     }
 
-    result = sdp_attr_set_dtls_fingerprint_attribute(sdp_p, level, 0, sdp_attr,
-        a_instance, hash_and_fingerprint);
+    result = sdp_attr_set_dtls_fingerprint_attribute(sdp_p, level, 0, sdp_attr, a_instance, hash_and_fingerprint);
     if (result != SDP_SUCCESS) {
         GSM_ERR_MSG("Failed to set dtls fingerprint attribute");
     }
 }
 
 /*
- * gsmsdp_set_identity_attribute
- *
- * Description:
- *
- * Adds an identity attribute to the specified SDP.
- *
- * Parameters:
- *
- * level        - The media level of the SDP where the media attribute exists.
- * sdp_p        - Pointer to the SDP to set the ice candidate attribute against.
- * identity     - attribute value to set
- * identity_len - string len of fingerprint
- */
-static void
-gsmsdp_set_identity_attribute (uint16_t level, void *sdp_p,
-  char *identity)
-{
-    uint16_t      a_instance = 0;
-    sdp_result_e  result;
-
-    result = sdp_add_new_attr(sdp_p, level, 0, SDP_ATTR_IDENTITY, &a_instance);
-    if (result != SDP_SUCCESS) {
-        GSM_ERR_MSG("Failed to add attribute");
-        return;
-    }
-
-    result = sdp_attr_set_simple_string(sdp_p, level, 0, SDP_ATTR_IDENTITY,
-        a_instance, identity);
-    if (result != SDP_SUCCESS) {
-        GSM_ERR_MSG("Failed to set identity attribute");
-    }
-}
-
-/*
  * gsmsdp_remove_sdp_direction
  *
  * Description:
  *
  * Removes the direction attribute corresponding to the passed in direction
  * from the media line of the specified SDP.
  *
  * Parameters:
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
@@ -180,17 +180,17 @@ sdp_result_e sdp_add_new_attr (void *sdp
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     if ((cap_num != 0) &&
         ((attr_type == SDP_ATTR_X_CAP) || (attr_type == SDP_ATTR_X_CPAR) ||
          (attr_type == SDP_ATTR_X_SQN) || (attr_type == SDP_ATTR_CDSC) ||
-         (attr_type == SDP_ATTR_CPAR) || (attr_type == SDP_ATTR_SQN))) {
+	 (attr_type == SDP_ATTR_CPAR) || (attr_type == SDP_ATTR_SQN))) {
         if (sdp_p->debug_flag[SDP_DEBUG_WARNINGS]) {
             CSFLogDebug(logTag, "%s Warning: Invalid attribute type for X-cpar/cdsc "
                      "parameter.", sdp_p->debug_str);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
@@ -212,51 +212,51 @@ sdp_result_e sdp_add_new_attr (void *sdp
         return (SDP_NO_RESOURCE);
     }
 
     new_attr_p->type = attr_type;
     new_attr_p->next_p = NULL;
 
     /* Initialize the new attribute structure */
     if ((new_attr_p->type == SDP_ATTR_X_CAP) ||
-        (new_attr_p->type == SDP_ATTR_CDSC)) {
+	(new_attr_p->type == SDP_ATTR_CDSC)) {
         new_attr_p->attr.cap_p = (sdp_mca_t *)SDP_MALLOC(sizeof(sdp_mca_t));
         if (new_attr_p->attr.cap_p == NULL) {
             sdp_free_attr(new_attr_p);
             sdp_p->conf_p->num_no_resource++;
             return (SDP_NO_RESOURCE);
         }
     } else if (new_attr_p->type == SDP_ATTR_FMTP) {
         fmtp_p = &(new_attr_p->attr.fmtp);
         fmtp_p->fmtp_format = SDP_FMTP_UNKNOWN_TYPE;
         // set to invalid value
         fmtp_p->packetization_mode = 0xff;
         fmtp_p->level_asymmetry_allowed = SDP_INVALID_LEVEL_ASYMMETRY_ALLOWED_VALUE;
-        fmtp_p->annexb_required = FALSE;
-        fmtp_p->annexa_required = FALSE;
+	fmtp_p->annexb_required = FALSE;
+	fmtp_p->annexa_required = FALSE;
         fmtp_p->maxval = 0;
-        fmtp_p->bitrate = 0;
-        fmtp_p->cif = 0;
-        fmtp_p->qcif = 0;
+	fmtp_p->bitrate = 0;
+	fmtp_p->cif = 0;
+	fmtp_p->qcif = 0;
         fmtp_p->profile = SDP_INVALID_VALUE;
         fmtp_p->level = SDP_INVALID_VALUE;
         fmtp_p->parameter_add = SDP_FMTP_UNUSED;
         fmtp_p->usedtx = SDP_FMTP_UNUSED;
         fmtp_p->stereo = SDP_FMTP_UNUSED;
         fmtp_p->useinbandfec = SDP_FMTP_UNUSED;
         fmtp_p->cbr = SDP_FMTP_UNUSED;
-        for (i=0; i < SDP_NE_NUM_BMAP_WORDS; i++) {
+	for (i=0; i < SDP_NE_NUM_BMAP_WORDS; i++) {
             fmtp_p->bmap[i] = 0;
         }
     } else if ((new_attr_p->type == SDP_ATTR_RTPMAP) ||
-               (new_attr_p->type == SDP_ATTR_SPRTMAP)) {
+	       (new_attr_p->type == SDP_ATTR_SPRTMAP)) {
         new_attr_p->attr.transport_map.num_chan = 1;
     } else if (new_attr_p->type == SDP_ATTR_DIRECTION) {
         comediadir_p = &(new_attr_p->attr.comediadir);
-        comediadir_p->role = SDP_MEDIADIR_ROLE_PASSIVE;
+	comediadir_p->role = SDP_MEDIADIR_ROLE_PASSIVE;
         comediadir_p->conn_info_present = FALSE;
     } else if (new_attr_p->type == SDP_ATTR_MPTIME) {
         sdp_mptime_t *mptime = &(new_attr_p->attr.mptime);
         mptime->num_intervals = 0;
     }
 
     if (cap_num == 0) {
         /* Add a new attribute. */
@@ -346,17 +346,17 @@ void sdp_copy_attr_fields (sdp_attr_t *s
     case SDP_ATTR_CALLED:
     case SDP_ATTR_CONN_TYPE:
     case SDP_ATTR_DIALED:
     case SDP_ATTR_DIALING:
     case SDP_ATTR_FRAMING:
     case SDP_ATTR_MAXPRATE:
     case SDP_ATTR_LABEL:
         sstrncpy(dst_attr_p->attr.string_val, src_attr_p->attr.string_val,
-                 SDP_MAX_STRING_LEN+1);
+		 SDP_MAX_STRING_LEN+1);
         break;
 
     case SDP_ATTR_EECID:
     case SDP_ATTR_PTIME:
     case SDP_ATTR_T38_VERSION:
     case SDP_ATTR_T38_MAXBITRATE:
     case SDP_ATTR_T38_MAXBUFFER:
     case SDP_ATTR_T38_MAXDGRAM:
@@ -440,40 +440,40 @@ void sdp_copy_attr_fields (sdp_attr_t *s
 
         sstrncpy(dst_attr_p->attr.fmtp.profile_level_id,
                  src_attr_p->attr.fmtp.profile_level_id,
                  SDP_MAX_STRING_LEN+1);
         sstrncpy(dst_attr_p->attr.fmtp.parameter_sets,
                  src_attr_p->attr.fmtp.parameter_sets,
                  SDP_MAX_STRING_LEN+1);
         dst_attr_p->attr.fmtp.deint_buf_req =
-                 src_attr_p->attr.fmtp.deint_buf_req;
+		 src_attr_p->attr.fmtp.deint_buf_req;
         dst_attr_p->attr.fmtp.max_don_diff =
             src_attr_p->attr.fmtp.max_don_diff;
         dst_attr_p->attr.fmtp.init_buf_time =
-                 src_attr_p->attr.fmtp.init_buf_time;
+		 src_attr_p->attr.fmtp.init_buf_time;
         dst_attr_p->attr.fmtp.packetization_mode =
-                 src_attr_p->attr.fmtp.packetization_mode;
+		 src_attr_p->attr.fmtp.packetization_mode;
         dst_attr_p->attr.fmtp.flag =
                  src_attr_p->attr.fmtp.flag;
 
         dst_attr_p->attr.fmtp.max_mbps = src_attr_p->attr.fmtp.max_mbps;
         dst_attr_p->attr.fmtp.max_fs = src_attr_p->attr.fmtp.max_fs;
         dst_attr_p->attr.fmtp.max_fr = src_attr_p->attr.fmtp.max_fr;
         dst_attr_p->attr.fmtp.max_cpb = src_attr_p->attr.fmtp.max_cpb;
         dst_attr_p->attr.fmtp.max_dpb = src_attr_p->attr.fmtp.max_dpb;
         dst_attr_p->attr.fmtp.max_br = src_attr_p->attr.fmtp.max_br;
         dst_attr_p->attr.fmtp.redundant_pic_cap =
             src_attr_p->attr.fmtp.redundant_pic_cap;
         dst_attr_p->attr.fmtp.deint_buf_cap =
-                 src_attr_p->attr.fmtp.deint_buf_cap;
+		 src_attr_p->attr.fmtp.deint_buf_cap;
         dst_attr_p->attr.fmtp.max_rcmd_nalu_size =
                  src_attr_p->attr.fmtp.max_rcmd_nalu_size;
         dst_attr_p->attr.fmtp.interleaving_depth =
-                 src_attr_p->attr.fmtp.interleaving_depth;
+		 src_attr_p->attr.fmtp.interleaving_depth;
         dst_attr_p->attr.fmtp.parameter_add =
             src_attr_p->attr.fmtp.parameter_add;
 
         dst_attr_p->attr.fmtp.annex_d = src_attr_p->attr.fmtp.annex_d;
         dst_attr_p->attr.fmtp.annex_f = src_attr_p->attr.fmtp.annex_f;
         dst_attr_p->attr.fmtp.annex_i = src_attr_p->attr.fmtp.annex_i;
         dst_attr_p->attr.fmtp.annex_j = src_attr_p->attr.fmtp.annex_j;
         dst_attr_p->attr.fmtp.annex_t = src_attr_p->attr.fmtp.annex_t;
@@ -508,17 +508,17 @@ void sdp_copy_attr_fields (sdp_attr_t *s
                SDP_MAX_STRING_LEN+1);
         break;
 
     case SDP_ATTR_SUBNET:
         dst_attr_p->attr.subnet.nettype  = src_attr_p->attr.subnet.nettype;
         dst_attr_p->attr.subnet.addrtype = src_attr_p->attr.subnet.addrtype;
         dst_attr_p->attr.subnet.prefix   = src_attr_p->attr.subnet.prefix;
         sstrncpy(dst_attr_p->attr.subnet.addr, src_attr_p->attr.subnet.addr,
-                 SDP_MAX_STRING_LEN+1);
+		 SDP_MAX_STRING_LEN+1);
         break;
 
     case SDP_ATTR_T38_RATEMGMT:
         dst_attr_p->attr.t38ratemgmt = src_attr_p->attr.t38ratemgmt;
         break;
 
     case SDP_ATTR_T38_UDPEC:
         dst_attr_p->attr.t38udpec = src_attr_p->attr.t38udpec;
@@ -530,32 +530,32 @@ void sdp_copy_attr_fields (sdp_attr_t *s
         for (i=0; i < src_attr_p->attr.pccodec.num_payloads; i++) {
             dst_attr_p->attr.pccodec.payload_type[i] =
                 src_attr_p->attr.pccodec.payload_type[i];
         }
         break;
 
     case SDP_ATTR_DIRECTION:
 
-        dst_attr_p->attr.comediadir.role =
-            src_attr_p->attr.comediadir.role;
-
-        if (src_attr_p->attr.comediadir.conn_info.nettype) {
-            dst_attr_p->attr.comediadir.conn_info_present = TRUE;
-            dst_attr_p->attr.comediadir.conn_info.nettype =
-                src_attr_p->attr.comediadir.conn_info.nettype;
-            dst_attr_p->attr.comediadir.conn_info.addrtype =
-                src_attr_p->attr.comediadir.conn_info.addrtype;
-            sstrncpy(dst_attr_p->attr.comediadir.conn_info.conn_addr,
-                     src_attr_p->attr.comediadir.conn_info.conn_addr,
-                     SDP_MAX_STRING_LEN+1);
-            dst_attr_p->attr.comediadir.src_port =
-                src_attr_p->attr.comediadir.src_port;
-        }
-        break;
+	dst_attr_p->attr.comediadir.role =
+	    src_attr_p->attr.comediadir.role;
+
+	if (src_attr_p->attr.comediadir.conn_info.nettype) {
+	    dst_attr_p->attr.comediadir.conn_info_present = TRUE;
+	    dst_attr_p->attr.comediadir.conn_info.nettype =
+		src_attr_p->attr.comediadir.conn_info.nettype;
+	    dst_attr_p->attr.comediadir.conn_info.addrtype =
+		src_attr_p->attr.comediadir.conn_info.addrtype;
+	    sstrncpy(dst_attr_p->attr.comediadir.conn_info.conn_addr,
+		     src_attr_p->attr.comediadir.conn_info.conn_addr,
+		     SDP_MAX_STRING_LEN+1);
+	    dst_attr_p->attr.comediadir.src_port =
+		src_attr_p->attr.comediadir.src_port;
+	}
+	break;
 
     case SDP_ATTR_SILENCESUPP:
         dst_attr_p->attr.silencesupp.enabled =
             src_attr_p->attr.silencesupp.enabled;
         dst_attr_p->attr.silencesupp.timer_null =
             src_attr_p->attr.silencesupp.timer_null;
         dst_attr_p->attr.silencesupp.timer =
             src_attr_p->attr.silencesupp.timer;
@@ -565,18 +565,18 @@ void sdp_copy_attr_fields (sdp_attr_t *s
             src_attr_p->attr.silencesupp.siduse;
         dst_attr_p->attr.silencesupp.fxnslevel_null =
             src_attr_p->attr.silencesupp.fxnslevel_null;
         dst_attr_p->attr.silencesupp.fxnslevel =
             src_attr_p->attr.silencesupp.fxnslevel;
         break;
 
     case SDP_ATTR_RTR:
-        dst_attr_p->attr.rtr.confirm = src_attr_p->attr.rtr.confirm;
-        break;
+	dst_attr_p->attr.rtr.confirm = src_attr_p->attr.rtr.confirm;
+	break;
 
     case SDP_ATTR_X_SIDIN:
     case SDP_ATTR_X_SIDOUT:
     case SDP_ATTR_X_CONFID:
         sstrncpy(dst_attr_p->attr.stream_data.x_sidin,
                  src_attr_p->attr.stream_data.x_sidin,SDP_MAX_STRING_LEN+1);
         sstrncpy(dst_attr_p->attr.stream_data.x_sidout,
                  src_attr_p->attr.stream_data.x_sidout,SDP_MAX_STRING_LEN+1);
@@ -615,54 +615,54 @@ void sdp_copy_attr_fields (sdp_attr_t *s
                 src_attr_p->attr.source_filter.num_src_addr;
         break;
 
     case SDP_ATTR_SRTP_CONTEXT:
     case SDP_ATTR_SDESCRIPTIONS:
          /* Tag parameter is not valid for version 2 sdescriptions */
         if (src_attr_p->type == SDP_ATTR_SDESCRIPTIONS) {
             dst_attr_p->attr.srtp_context.tag =
-                src_attr_p->attr.srtp_context.tag;
-        }
-
-        dst_attr_p->attr.srtp_context.selection_flags =
-                    src_attr_p->attr.srtp_context.selection_flags;
-
-        dst_attr_p->attr.srtp_context.suite = src_attr_p->attr.srtp_context.suite;
-
-        dst_attr_p->attr.srtp_context.master_key_size_bytes =
-                    src_attr_p->attr.srtp_context.master_key_size_bytes;
+	        src_attr_p->attr.srtp_context.tag;
+        }
+
+	dst_attr_p->attr.srtp_context.selection_flags =
+	            src_attr_p->attr.srtp_context.selection_flags;
+
+	dst_attr_p->attr.srtp_context.suite = src_attr_p->attr.srtp_context.suite;
+
+	dst_attr_p->attr.srtp_context.master_key_size_bytes =
+	            src_attr_p->attr.srtp_context.master_key_size_bytes;
 
         dst_attr_p->attr.srtp_context.master_salt_size_bytes =
-                    src_attr_p->attr.srtp_context.master_salt_size_bytes;
+	            src_attr_p->attr.srtp_context.master_salt_size_bytes;
 
         bcopy(src_attr_p->attr.srtp_context.master_key,
-              dst_attr_p->attr.srtp_context.master_key,
-              SDP_SRTP_MAX_KEY_SIZE_BYTES);
-
-        bcopy(src_attr_p->attr.srtp_context.master_salt,
-              dst_attr_p->attr.srtp_context.master_salt,
-              SDP_SRTP_MAX_SALT_SIZE_BYTES);
-
-
-        sstrncpy((char*)dst_attr_p->attr.srtp_context.master_key_lifetime,
-                 (char*)src_attr_p->attr.srtp_context.master_key_lifetime,
-                 SDP_SRTP_MAX_LIFETIME_BYTES);
-
-        sstrncpy((char*)dst_attr_p->attr.srtp_context.mki,
-                 (char*)src_attr_p->attr.srtp_context.mki,
-                 SDP_SRTP_MAX_MKI_SIZE_BYTES);
-
-        dst_attr_p->attr.srtp_context.mki_size_bytes =
-                    src_attr_p->attr.srtp_context.mki_size_bytes;
-
-        if (src_attr_p->attr.srtp_context.session_parameters) {
-            dst_attr_p->attr.srtp_context.session_parameters =
-                        cpr_strdup(src_attr_p->attr.srtp_context.session_parameters);
-        }
+	      dst_attr_p->attr.srtp_context.master_key,
+	      SDP_SRTP_MAX_KEY_SIZE_BYTES);
+
+	bcopy(src_attr_p->attr.srtp_context.master_salt,
+	      dst_attr_p->attr.srtp_context.master_salt,
+	      SDP_SRTP_MAX_SALT_SIZE_BYTES);
+
+
+	sstrncpy((char*)dst_attr_p->attr.srtp_context.master_key_lifetime,
+	         (char*)src_attr_p->attr.srtp_context.master_key_lifetime,
+		 SDP_SRTP_MAX_LIFETIME_BYTES);
+
+	sstrncpy((char*)dst_attr_p->attr.srtp_context.mki,
+	         (char*)src_attr_p->attr.srtp_context.mki,
+		 SDP_SRTP_MAX_MKI_SIZE_BYTES);
+
+	dst_attr_p->attr.srtp_context.mki_size_bytes =
+	            src_attr_p->attr.srtp_context.mki_size_bytes;
+
+	if (src_attr_p->attr.srtp_context.session_parameters) {
+	    dst_attr_p->attr.srtp_context.session_parameters =
+	                cpr_strdup(src_attr_p->attr.srtp_context.session_parameters);
+	}
 
         break;
 
     default:
         break;
     }
 
     return;
@@ -716,17 +716,17 @@ sdp_result_e sdp_copy_attr (void *src_sd
         return (SDP_INVALID_PARAMETER);
     }
 
     /* Cannot copy X_CAP/CDSC attributes directly using this routine.
      * You also can't copy X_CPAR/CPAR attributes by specifying them directly,
      * but you can copy them by giving the corresponding cap_num. */
     if ((src_attr_type == SDP_ATTR_X_CAP) ||
         (src_attr_type == SDP_ATTR_X_CPAR) ||
-        (src_attr_type == SDP_ATTR_CDSC) ||
+	(src_attr_type == SDP_ATTR_CDSC) ||
         (src_attr_type == SDP_ATTR_CPAR)) {
         src_sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     src_attr_p = sdp_find_attr(src_sdp_p, src_level, src_cap_num,
                                src_attr_type, src_inst_num);
     if (src_attr_p == NULL) {
@@ -754,17 +754,17 @@ sdp_result_e sdp_copy_attr (void *src_sd
     case SDP_ATTR_CALLED:
     case SDP_ATTR_CONN_TYPE:
     case SDP_ATTR_DIALED:
     case SDP_ATTR_DIALING:
     case SDP_ATTR_FRAMING:
     case SDP_ATTR_MAXPRATE:
     case SDP_ATTR_LABEL:
         sstrncpy(new_attr_p->attr.string_val, src_attr_p->attr.string_val,
-                 SDP_MAX_STRING_LEN+1);
+		 SDP_MAX_STRING_LEN+1);
         break;
 
     case SDP_ATTR_EECID:
     case SDP_ATTR_PTIME:
     case SDP_ATTR_T38_VERSION:
     case SDP_ATTR_T38_MAXBITRATE:
     case SDP_ATTR_T38_MAXBUFFER:
     case SDP_ATTR_T38_MAXDGRAM:
@@ -818,45 +818,45 @@ sdp_result_e sdp_copy_attr (void *src_sd
     case SDP_ATTR_SENDONLY:
     case SDP_ATTR_SENDRECV:
         /* These attrs have no parameters. */
         break;
 
     case SDP_ATTR_FMTP:
         new_attr_p->attr.fmtp.payload_num = src_attr_p->attr.fmtp.payload_num;
         new_attr_p->attr.fmtp.maxval      = src_attr_p->attr.fmtp.maxval;
-        new_attr_p->attr.fmtp.bitrate     = src_attr_p->attr.fmtp.bitrate;
-        new_attr_p->attr.fmtp.annexa      = src_attr_p->attr.fmtp.annexa;
-        new_attr_p->attr.fmtp.annexb      = src_attr_p->attr.fmtp.annexb;
-        new_attr_p->attr.fmtp.cif      = src_attr_p->attr.fmtp.cif;
-        new_attr_p->attr.fmtp.qcif      = src_attr_p->attr.fmtp.qcif;
-        new_attr_p->attr.fmtp.sqcif      = src_attr_p->attr.fmtp.qcif;
-        new_attr_p->attr.fmtp.cif4      = src_attr_p->attr.fmtp.cif4;
-        new_attr_p->attr.fmtp.cif16      = src_attr_p->attr.fmtp.cif16;
-        new_attr_p->attr.fmtp.maxbr      = src_attr_p->attr.fmtp.maxbr;
-        new_attr_p->attr.fmtp.custom_x      = src_attr_p->attr.fmtp.custom_x;
-        new_attr_p->attr.fmtp.custom_y      = src_attr_p->attr.fmtp.custom_y;
-        new_attr_p->attr.fmtp.custom_mpi    = src_attr_p->attr.fmtp.custom_mpi;
-        new_attr_p->attr.fmtp.par_width      = src_attr_p->attr.fmtp.par_width;
-        new_attr_p->attr.fmtp.par_height      = src_attr_p->attr.fmtp.par_height;
-        new_attr_p->attr.fmtp.cpcf      = src_attr_p->attr.fmtp.cpcf;
-        new_attr_p->attr.fmtp.bpp      = src_attr_p->attr.fmtp.bpp;
-        new_attr_p->attr.fmtp.hrd      = src_attr_p->attr.fmtp.hrd;
+	new_attr_p->attr.fmtp.bitrate     = src_attr_p->attr.fmtp.bitrate;
+	new_attr_p->attr.fmtp.annexa      = src_attr_p->attr.fmtp.annexa;
+	new_attr_p->attr.fmtp.annexb      = src_attr_p->attr.fmtp.annexb;
+	new_attr_p->attr.fmtp.cif      = src_attr_p->attr.fmtp.cif;
+	new_attr_p->attr.fmtp.qcif      = src_attr_p->attr.fmtp.qcif;
+	new_attr_p->attr.fmtp.sqcif      = src_attr_p->attr.fmtp.qcif;
+	new_attr_p->attr.fmtp.cif4      = src_attr_p->attr.fmtp.cif4;
+	new_attr_p->attr.fmtp.cif16      = src_attr_p->attr.fmtp.cif16;
+	new_attr_p->attr.fmtp.maxbr      = src_attr_p->attr.fmtp.maxbr;
+	new_attr_p->attr.fmtp.custom_x      = src_attr_p->attr.fmtp.custom_x;
+	new_attr_p->attr.fmtp.custom_y      = src_attr_p->attr.fmtp.custom_y;
+	new_attr_p->attr.fmtp.custom_mpi    = src_attr_p->attr.fmtp.custom_mpi;
+	new_attr_p->attr.fmtp.par_width      = src_attr_p->attr.fmtp.par_width;
+	new_attr_p->attr.fmtp.par_height      = src_attr_p->attr.fmtp.par_height;
+	new_attr_p->attr.fmtp.cpcf      = src_attr_p->attr.fmtp.cpcf;
+	new_attr_p->attr.fmtp.bpp      = src_attr_p->attr.fmtp.bpp;
+	new_attr_p->attr.fmtp.hrd      = src_attr_p->attr.fmtp.hrd;
         new_attr_p->attr.fmtp.profile    = src_attr_p->attr.fmtp.profile;
         new_attr_p->attr.fmtp.level      = src_attr_p->attr.fmtp.level;
         new_attr_p->attr.fmtp.is_interlace = src_attr_p->attr.fmtp.is_interlace;
 
         sstrncpy(new_attr_p->attr.fmtp.profile_level_id,
                 src_attr_p->attr.fmtp.profile_level_id,
                 SDP_MAX_STRING_LEN+1);
         sstrncpy(new_attr_p->attr.fmtp.parameter_sets,
                 src_attr_p->attr.fmtp.parameter_sets,
                 SDP_MAX_STRING_LEN+1);
         new_attr_p->attr.fmtp.deint_buf_req =
-                 src_attr_p->attr.fmtp.deint_buf_req;
+		 src_attr_p->attr.fmtp.deint_buf_req;
         new_attr_p->attr.fmtp.max_don_diff =
             src_attr_p->attr.fmtp.max_don_diff;
         new_attr_p->attr.fmtp.init_buf_time =
                  src_attr_p->attr.fmtp.init_buf_time;
         new_attr_p->attr.fmtp.packetization_mode =
                  src_attr_p->attr.fmtp.packetization_mode;
         new_attr_p->attr.fmtp.flag =
                  src_attr_p->attr.fmtp.flag;
@@ -865,42 +865,42 @@ sdp_result_e sdp_copy_attr (void *src_sd
         new_attr_p->attr.fmtp.max_fs = src_attr_p->attr.fmtp.max_fs;
         new_attr_p->attr.fmtp.max_fr = src_attr_p->attr.fmtp.max_fr;
         new_attr_p->attr.fmtp.max_cpb = src_attr_p->attr.fmtp.max_cpb;
         new_attr_p->attr.fmtp.max_dpb = src_attr_p->attr.fmtp.max_dpb;
         new_attr_p->attr.fmtp.max_br = src_attr_p->attr.fmtp.max_br;
         new_attr_p->attr.fmtp.redundant_pic_cap =
             src_attr_p->attr.fmtp.redundant_pic_cap;
         new_attr_p->attr.fmtp.deint_buf_cap =
-                 src_attr_p->attr.fmtp.deint_buf_cap;
+		 src_attr_p->attr.fmtp.deint_buf_cap;
         new_attr_p->attr.fmtp.max_rcmd_nalu_size =
                  src_attr_p->attr.fmtp.max_rcmd_nalu_size;
         new_attr_p->attr.fmtp.interleaving_depth =
-                 src_attr_p->attr.fmtp.interleaving_depth;
+		 src_attr_p->attr.fmtp.interleaving_depth;
         new_attr_p->attr.fmtp.parameter_add =
             src_attr_p->attr.fmtp.parameter_add;
 
         new_attr_p->attr.fmtp.annex_d = src_attr_p->attr.fmtp.annex_d;
         new_attr_p->attr.fmtp.annex_f = src_attr_p->attr.fmtp.annex_f;
         new_attr_p->attr.fmtp.annex_i = src_attr_p->attr.fmtp.annex_i;
         new_attr_p->attr.fmtp.annex_j = src_attr_p->attr.fmtp.annex_j;
         new_attr_p->attr.fmtp.annex_t = src_attr_p->attr.fmtp.annex_t;
         new_attr_p->attr.fmtp.annex_k_val = src_attr_p->attr.fmtp.annex_k_val;
         new_attr_p->attr.fmtp.annex_n_val = src_attr_p->attr.fmtp.annex_n_val;
         new_attr_p->attr.fmtp.annex_p_val_picture_resize =
             src_attr_p->attr.fmtp.annex_p_val_picture_resize;
         new_attr_p->attr.fmtp.annex_p_val_warp  =
             src_attr_p->attr.fmtp.annex_p_val_warp;
 
-        new_attr_p->attr.fmtp.annexb_required  =
-                                          src_attr_p->attr.fmtp.annexb_required;
+	new_attr_p->attr.fmtp.annexb_required  =
+	                                  src_attr_p->attr.fmtp.annexb_required;
         new_attr_p->attr.fmtp.annexa_required  =
-                                          src_attr_p->attr.fmtp.annexa_required;
-        new_attr_p->attr.fmtp.fmtp_format
-                                          = src_attr_p->attr.fmtp.fmtp_format;
+	                                  src_attr_p->attr.fmtp.annexa_required;
+	new_attr_p->attr.fmtp.fmtp_format
+	                                  = src_attr_p->attr.fmtp.fmtp_format;
 
         for (i=0; i < SDP_NE_NUM_BMAP_WORDS; i++) {
             new_attr_p->attr.fmtp.bmap[i] = src_attr_p->attr.fmtp.bmap[i];
         }
         break;
 
     case SDP_ATTR_RTPMAP:
         new_attr_p->attr.transport_map.payload_num =
@@ -914,17 +914,17 @@ sdp_result_e sdp_copy_attr (void *src_sd
                SDP_MAX_STRING_LEN+1);
         break;
 
     case SDP_ATTR_SUBNET:
         new_attr_p->attr.subnet.nettype  = src_attr_p->attr.subnet.nettype;
         new_attr_p->attr.subnet.addrtype = src_attr_p->attr.subnet.addrtype;
         new_attr_p->attr.subnet.prefix   = src_attr_p->attr.subnet.prefix;
         sstrncpy(new_attr_p->attr.subnet.addr, src_attr_p->attr.subnet.addr,
-                 SDP_MAX_STRING_LEN+1);
+		 SDP_MAX_STRING_LEN+1);
         break;
 
     case SDP_ATTR_T38_RATEMGMT:
         new_attr_p->attr.t38ratemgmt = src_attr_p->attr.t38ratemgmt;
         break;
 
     case SDP_ATTR_T38_UDPEC:
         new_attr_p->attr.t38udpec = src_attr_p->attr.t38udpec;
@@ -936,32 +936,32 @@ sdp_result_e sdp_copy_attr (void *src_sd
         for (i=0; i < src_attr_p->attr.pccodec.num_payloads; i++) {
             new_attr_p->attr.pccodec.payload_type[i] =
                 src_attr_p->attr.pccodec.payload_type[i];
         }
         break;
 
     case SDP_ATTR_DIRECTION:
 
-        new_attr_p->attr.comediadir.role =
-            src_attr_p->attr.comediadir.role;
-
-        if (src_attr_p->attr.comediadir.conn_info.nettype) {
-            new_attr_p->attr.comediadir.conn_info_present = TRUE;
-            new_attr_p->attr.comediadir.conn_info.nettype =
-                src_attr_p->attr.comediadir.conn_info.nettype;
-            new_attr_p->attr.comediadir.conn_info.addrtype =
-                src_attr_p->attr.comediadir.conn_info.addrtype;
-            sstrncpy(new_attr_p->attr.comediadir.conn_info.conn_addr,
-                     src_attr_p->attr.comediadir.conn_info.conn_addr,
-                     SDP_MAX_STRING_LEN+1);
-            new_attr_p->attr.comediadir.src_port =
-                src_attr_p->attr.comediadir.src_port;
-        }
-        break;
+	new_attr_p->attr.comediadir.role =
+	    src_attr_p->attr.comediadir.role;
+
+	if (src_attr_p->attr.comediadir.conn_info.nettype) {
+	    new_attr_p->attr.comediadir.conn_info_present = TRUE;
+	    new_attr_p->attr.comediadir.conn_info.nettype =
+		src_attr_p->attr.comediadir.conn_info.nettype;
+	    new_attr_p->attr.comediadir.conn_info.addrtype =
+		src_attr_p->attr.comediadir.conn_info.addrtype;
+	    sstrncpy(new_attr_p->attr.comediadir.conn_info.conn_addr,
+		     src_attr_p->attr.comediadir.conn_info.conn_addr,
+		     SDP_MAX_STRING_LEN+1);
+	    new_attr_p->attr.comediadir.src_port =
+		src_attr_p->attr.comediadir.src_port;
+	}
+	break;
 
 
     case SDP_ATTR_SILENCESUPP:
         new_attr_p->attr.silencesupp.enabled =
             src_attr_p->attr.silencesupp.enabled;
         new_attr_p->attr.silencesupp.timer_null =
             src_attr_p->attr.silencesupp.timer_null;
         new_attr_p->attr.silencesupp.timer =
@@ -989,17 +989,17 @@ sdp_result_e sdp_copy_attr (void *src_sd
     case SDP_ATTR_X_SIDOUT:
     case SDP_ATTR_X_CONFID:
         sstrncpy(new_attr_p->attr.stream_data.x_sidin,
                  src_attr_p->attr.stream_data.x_sidin,SDP_MAX_STRING_LEN+1);
         sstrncpy(new_attr_p->attr.stream_data.x_sidout,
                  src_attr_p->attr.stream_data.x_sidout,SDP_MAX_STRING_LEN+1);
         sstrncpy(new_attr_p->attr.stream_data.x_confid,
                  src_attr_p->attr.stream_data.x_confid,SDP_MAX_STRING_LEN+1);
-        break;
+	break;
 
     case SDP_ATTR_GROUP:
         new_attr_p->attr.stream_data.group_attr =
             src_attr_p->attr.stream_data.group_attr;
         new_attr_p->attr.stream_data.num_group_id =
             src_attr_p->attr.stream_data.num_group_id;
 
         for (i=0; i < src_attr_p->attr.stream_data.num_group_id; i++) {
@@ -1027,55 +1027,55 @@ sdp_result_e sdp_copy_attr (void *src_sd
                 src_attr_p->attr.source_filter.num_src_addr;
         break;
 
     case SDP_ATTR_SRTP_CONTEXT:
     case SDP_ATTR_SDESCRIPTIONS:
         /* Tag parameter is only valid for version 9 sdescriptions */
         if (src_attr_type == SDP_ATTR_SDESCRIPTIONS) {
             new_attr_p->attr.srtp_context.tag =
-                src_attr_p->attr.srtp_context.tag;
-        }
-
-        new_attr_p->attr.srtp_context.suite =
-                    src_attr_p->attr.srtp_context.suite;
-
-        new_attr_p->attr.srtp_context.selection_flags =
-                    src_attr_p->attr.srtp_context.selection_flags;
-
-        new_attr_p->attr.srtp_context.master_key_size_bytes =
-                    src_attr_p->attr.srtp_context.master_key_size_bytes;
+	        src_attr_p->attr.srtp_context.tag;
+	}
+
+	new_attr_p->attr.srtp_context.suite =
+	            src_attr_p->attr.srtp_context.suite;
+
+	new_attr_p->attr.srtp_context.selection_flags =
+	            src_attr_p->attr.srtp_context.selection_flags;
+
+	new_attr_p->attr.srtp_context.master_key_size_bytes =
+	            src_attr_p->attr.srtp_context.master_key_size_bytes;
 
         new_attr_p->attr.srtp_context.master_salt_size_bytes =
-                    src_attr_p->attr.srtp_context.master_salt_size_bytes;
+	            src_attr_p->attr.srtp_context.master_salt_size_bytes;
 
         bcopy(src_attr_p->attr.srtp_context.master_key,
-              new_attr_p->attr.srtp_context.master_key,
-              SDP_SRTP_MAX_KEY_SIZE_BYTES);
-
-        bcopy(src_attr_p->attr.srtp_context.master_salt,
-              new_attr_p->attr.srtp_context.master_salt,
-              SDP_SRTP_MAX_SALT_SIZE_BYTES);
-
-
-        sstrncpy((char*)new_attr_p->attr.srtp_context.master_key_lifetime,
-                 (char*)src_attr_p->attr.srtp_context.master_key_lifetime,
-                 SDP_SRTP_MAX_LIFETIME_BYTES);
-
-        sstrncpy((char*)new_attr_p->attr.srtp_context.mki,
-                 (char*)src_attr_p->attr.srtp_context.mki,
-                 SDP_SRTP_MAX_MKI_SIZE_BYTES);
-
-        new_attr_p->attr.srtp_context.mki_size_bytes =
-                    src_attr_p->attr.srtp_context.mki_size_bytes;
-
-        if (src_attr_p->attr.srtp_context.session_parameters) {
-            new_attr_p->attr.srtp_context.session_parameters =
-                        cpr_strdup(src_attr_p->attr.srtp_context.session_parameters);
-        }
+	      new_attr_p->attr.srtp_context.master_key,
+	      SDP_SRTP_MAX_KEY_SIZE_BYTES);
+
+	bcopy(src_attr_p->attr.srtp_context.master_salt,
+	      new_attr_p->attr.srtp_context.master_salt,
+	      SDP_SRTP_MAX_SALT_SIZE_BYTES);
+
+
+	sstrncpy((char*)new_attr_p->attr.srtp_context.master_key_lifetime,
+	         (char*)src_attr_p->attr.srtp_context.master_key_lifetime,
+		 SDP_SRTP_MAX_LIFETIME_BYTES);
+
+	sstrncpy((char*)new_attr_p->attr.srtp_context.mki,
+	         (char*)src_attr_p->attr.srtp_context.mki,
+		 SDP_SRTP_MAX_MKI_SIZE_BYTES);
+
+	new_attr_p->attr.srtp_context.mki_size_bytes =
+	            src_attr_p->attr.srtp_context.mki_size_bytes;
+
+	if (src_attr_p->attr.srtp_context.session_parameters) {
+	    new_attr_p->attr.srtp_context.session_parameters =
+	                cpr_strdup(src_attr_p->attr.srtp_context.session_parameters);
+	}
 
         break;
 
     default:
         break;
     }
 
     if (src_cap_num == 0) {
@@ -1206,27 +1206,27 @@ sdp_result_e sdp_copy_all_attrs (void *s
         /* Allocate the new attr. */
         new_attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
         if (new_attr_p == NULL) {
             src_sdp_p->conf_p->num_no_resource++;
             return (SDP_NO_RESOURCE);
         }
 
         if ((src_attr_p->type != SDP_ATTR_X_CAP) &&
-            (src_attr_p->type != SDP_ATTR_CDSC)) {
+	    (src_attr_p->type != SDP_ATTR_CDSC)) {
             /* Simple attr type - copy over all the attr info. */
             sdp_copy_attr_fields(src_attr_p, new_attr_p);
         } else {
             /* X-cap/cdsc attrs must be handled differently. Allocate an
              * mca structure and copy over any X-cpar/cdsc attrs. */
 
             new_attr_p->attr.cap_p =
                 (sdp_mca_t *)SDP_MALLOC(sizeof(sdp_mca_t));
             if (new_attr_p->attr.cap_p == NULL) {
-                sdp_free_attr(new_attr_p);
+	        sdp_free_attr(new_attr_p);
                 return (SDP_NO_RESOURCE);
             }
 
             new_attr_p->type = src_attr_p->type;
 
             src_cap_p = src_attr_p->attr.cap_p;
             dst_cap_p = new_attr_p->attr.cap_p;
 
@@ -1256,17 +1256,17 @@ sdp_result_e sdp_copy_all_attrs (void *s
             src_cap_attr_p = src_attr_p->attr.cap_p->media_attrs_p;
             dst_cap_attr_p = NULL;
 
             /* Copy all of the X-cpar/cpar attrs from the src. */
             while (src_cap_attr_p != NULL) {
 
                 new_cap_attr_p = (sdp_attr_t *)SDP_MALLOC(sizeof(sdp_attr_t));
                 if (new_cap_attr_p == NULL) {
-                    sdp_free_attr (new_attr_p);
+		    sdp_free_attr (new_attr_p);
                     return (SDP_NO_RESOURCE);
                 }
 
                 /* Copy X-cpar/cpar attribute info. */
                 sdp_copy_attr_fields(src_cap_attr_p, new_cap_attr_p);
 
                 /* Now add the new X-cpar/cpar attr in the right place. */
                 if (dst_cap_attr_p == NULL) {
@@ -1464,17 +1464,17 @@ void sdp_free_attr (sdp_attr_t *attr_p)
 {
     sdp_mca_t   *cap_p;
     sdp_attr_t  *cpar_p;
     sdp_attr_t  *next_cpar_p;
 
     /* If this is an X-cap/cdsc attr, free the cap_p structure and
      * all X-cpar/cpar attributes. */
     if ((attr_p->type == SDP_ATTR_X_CAP) ||
-        (attr_p->type == SDP_ATTR_CDSC)) {
+	(attr_p->type == SDP_ATTR_CDSC)) {
         cap_p = attr_p->attr.cap_p;
         if (cap_p != NULL) {
             for (cpar_p = cap_p->media_attrs_p; cpar_p != NULL;) {
                 next_cpar_p = cpar_p->next_p;
                 sdp_free_attr(cpar_p);
                 cpar_p = next_cpar_p;
             }
             SDP_FREE(cap_p);
@@ -1825,34 +1825,34 @@ sdp_attr_t *sdp_find_capability (sdp_t *
     sdp_mca_t   *mca_p;
     sdp_mca_t   *cap_p;
     sdp_attr_t  *attr_p;
 
     if (level == SDP_SESSION_LEVEL) {
         for (attr_p = sdp_p->sess_attrs_p; attr_p != NULL;
              attr_p = attr_p->next_p) {
             if ((attr_p->type == SDP_ATTR_X_CAP) ||
-                (attr_p->type == SDP_ATTR_CDSC)) {
+	        (attr_p->type == SDP_ATTR_CDSC)) {
                 cap_p = attr_p->attr.cap_p;
                 cur_cap_num += cap_p->num_payloads;
                 if (cap_num <= cur_cap_num) {
                     /* This is the right capability */
                     return (attr_p);
                 }
             }
         }
     } else {  /* Capability is at a media level */
         mca_p = sdp_find_media_level(sdp_p, level);
         if (mca_p == NULL) {
             return (NULL);
         }
         for (attr_p = mca_p->media_attrs_p; attr_p != NULL;
              attr_p = attr_p->next_p) {
             if ((attr_p->type == SDP_ATTR_X_CAP) ||
-                (attr_p->type == SDP_ATTR_CDSC)) {
+	        (attr_p->type == SDP_ATTR_CDSC)) {
                 cap_p = attr_p->attr.cap_p;
                 cur_cap_num += cap_p->num_payloads;
                 if (cap_num <= cur_cap_num) {
                     /* This is the right capability */
                     return (attr_p);
                 }
             }
         }
@@ -1986,20 +1986,19 @@ sdp_result_e sdp_attr_set_simple_string 
 
     if ((attr_type != SDP_ATTR_BEARER) &&
         (attr_type != SDP_ATTR_CALLED) &&
         (attr_type != SDP_ATTR_CONN_TYPE) &&
         (attr_type != SDP_ATTR_DIALED) &&
         (attr_type != SDP_ATTR_DIALING) &&
         (attr_type != SDP_ATTR_FRAMING) &&
         (attr_type != SDP_ATTR_X_SIDIN) &&
-        (attr_type != SDP_ATTR_X_SIDOUT) &&
+        (attr_type != SDP_ATTR_X_SIDOUT)&&
         (attr_type != SDP_ATTR_X_CONFID) &&
-        (attr_type != SDP_ATTR_LABEL) &&
-        (attr_type != SDP_ATTR_IDENTITY)) {
+        (attr_type != SDP_ATTR_LABEL)) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s Attribute type is not a simple string (%s)",
                       sdp_p->debug_str, sdp_get_attr_name(attr_type));
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
@@ -4032,17 +4031,17 @@ sdp_result_e sdp_attr_get_rtcp_mux_attri
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_SDP_PTR);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, sdp_attr, inst_num);
     if (attr_p != NULL) {
-        *rtcp_mux = attr_p->attr.boolean_val;
+    	*rtcp_mux = attr_p->attr.boolean_val;
         return (SDP_SUCCESS);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s rtcp-mux attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
@@ -4926,18 +4925,18 @@ sdp_attr_fmtp_valid(void *sdp_ptr, u16 l
       return FALSE;
 
     /* Ok, events are within range. Now check that only
      * allowed events have been received
      */
     mapword = appl_maxval/SDP_NE_BITS_PER_WORD;
     for (i=0; i<mapword; i++) {
       if (fmtp_p->bmap[i] & ~(evt_array[i])) {
-        /* Remote SDP is requesting events not supported by Application */
-        return FALSE;
+	/* Remote SDP is requesting events not supported by Application */
+	return FALSE;
       }
     }
     return TRUE;
 }
 
 /* Function:    sdp_attr_set_fmtp_payload_type
  * Description: Sets the value of the fmtp attribute payload type parameter
  *              for the given attribute.
@@ -6038,17 +6037,17 @@ sdp_result_e sdp_attr_set_fmtp_profile_l
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
     if (profile_level_id) {
         sstrncpy(fmtp_p->profile_level_id, profile_level_id,
-           SDP_MAX_STRING_LEN+1);
+	   SDP_MAX_STRING_LEN+1);
     }
 
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_attr_set_fmtp_parameter_sets (void *sdp_ptr, u16 level,
                                                u8 cap_num, u16 inst_num,
                                                const char *parameter_sets)
@@ -6261,17 +6260,17 @@ sdp_result_e sdp_attr_set_fmtp_interleav
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
     fmtp_p->interleaving_depth  = interleaving_depth;
 
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_attr_set_fmtp_redundant_pic_cap (void *sdp_ptr, u16 level,
                                                u8 cap_num, u16 inst_num,
-                                               tinybool redundant_pic_cap)
+					       tinybool redundant_pic_cap)
 {
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
     sdp_fmtp_t  *fmtp_p;
 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
@@ -6726,17 +6725,17 @@ sdp_result_e sdp_attr_set_fmtp_maxcodeda
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     fmtp_p = &(attr_p->attr.fmtp);
     fmtp_p->fmtp_format = SDP_FMTP_CODEC_INFO;
     if (maxcodedaudiobandwidth) {
         sstrncpy(fmtp_p->maxcodedaudiobandwidth, maxcodedaudiobandwidth,
-           SDP_MAX_STRING_LEN+1);
+	   SDP_MAX_STRING_LEN+1);
     }
 
     return (SDP_SUCCESS);
 }
 
 /* Function:    sdp_attr_get_fmtp_maxcodedaudiobandwidth
  * Description: Gets the value of the fmtp attribute maxcodedaudiobandwidth parameter for OPUS codec
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
@@ -6982,17 +6981,17 @@ sdp_result_e sdp_attr_get_sctpmap_protoc
                                             u8 cap_num, u16 inst_num,
                                             char* protocol)
 {
 
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
-        return (SDP_INVALID_PARAMETER);
+    	return (SDP_INVALID_PARAMETER);
     }
 
     attr_p = sdp_find_attr(sdp_p, level, cap_num, SDP_ATTR_SCTPMAP,
                            inst_num);
     if (!attr_p) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s sctpmap, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
@@ -7068,17 +7067,17 @@ sdp_result_e sdp_attr_set_fmtp_max_dpb (
         return (SDP_SUCCESS);
     } else {
         return (SDP_FAILURE);
     }
 }
 
 sdp_result_e sdp_attr_set_fmtp_max_rcmd_nalu_size (void *sdp_ptr, u16 level,
                                                u8 cap_num, u16 inst_num,
-                                               u32 max_rcmd_nalu_size)
+					       u32 max_rcmd_nalu_size)
 {
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
     sdp_fmtp_t  *fmtp_p;
 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
@@ -7099,17 +7098,17 @@ sdp_result_e sdp_attr_set_fmtp_max_rcmd_
     fmtp_p->max_rcmd_nalu_size = max_rcmd_nalu_size;
     fmtp_p->flag |= SDP_MAX_RCMD_NALU_SIZE_FLAG;
 
     return (SDP_SUCCESS);
 }
 
 sdp_result_e sdp_attr_set_fmtp_deint_buf_cap (void *sdp_ptr, u16 level,
                                                u8 cap_num, u16 inst_num,
-                                               u32 deint_buf_cap)
+					       u32 deint_buf_cap)
 {
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
     sdp_fmtp_t  *fmtp_p;
 
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return (SDP_INVALID_PARAMETER);
@@ -7967,18 +7966,18 @@ sdp_result_e sdp_attr_get_fmtp_pack_mode
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
-        *val = attr_p->attr.fmtp.packetization_mode;
-        return (SDP_SUCCESS);
+	*val = attr_p->attr.fmtp.packetization_mode;
+	return (SDP_SUCCESS);
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_level_asymmetry_allowed
  * Description: Gets the value of the fmtp attribute- level-asymmetry-allowed parameter for H.264 codec
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
  *              level       The level to check for the attribute.
  *              cap_num     The capability number associated with the
@@ -8003,18 +8002,18 @@ sdp_result_e sdp_attr_get_fmtp_level_asy
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
-        *val = attr_p->attr.fmtp.level_asymmetry_allowed;
-        return (SDP_SUCCESS);
+	*val = attr_p->attr.fmtp.level_asymmetry_allowed;
+	return (SDP_SUCCESS);
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_profile_id
  * Description: Gets the value of the fmtp attribute- profile-level-id parameter for H.264 codec
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
  *              level       The level to check for the attribute.
  *              cap_num     The capability number associated with the
@@ -8106,18 +8105,18 @@ sdp_result_e sdp_attr_get_fmtp_interleav
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
-        *val = attr_p->attr.fmtp.interleaving_depth;
-        return (SDP_SUCCESS);
+	*val = attr_p->attr.fmtp.interleaving_depth;
+	return (SDP_SUCCESS);
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_deint_buf_req
  * Description: Gets the value of the fmtp attribute- deint-buf-req parameter for H.264 codec
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
  *              level       The level to check for the attribute.
  *              cap_num     The capability number associated with the
@@ -8143,18 +8142,18 @@ sdp_result_e sdp_attr_get_fmtp_deint_buf
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_DEINT_BUF_REQ_FLAG) {
-            *val = attr_p->attr.fmtp.deint_buf_req;
-            return (SDP_SUCCESS);
+	    *val = attr_p->attr.fmtp.deint_buf_req;
+	    return (SDP_SUCCESS);
         } else {
             return (SDP_FAILURE);
         }
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_max_don_diff
  * Description: Gets the value of the fmtp attribute- max-don-diff parameter for H.264 codec
@@ -8181,18 +8180,18 @@ sdp_result_e sdp_attr_get_fmtp_max_don_d
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
-        *val = attr_p->attr.fmtp.max_don_diff;
-        return (SDP_SUCCESS);
+	*val = attr_p->attr.fmtp.max_don_diff;
+	return (SDP_SUCCESS);
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_init_buf_time
  * Description: Gets the value of the fmtp attribute- init-buf-time parameter for H.264 codec
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
  *              level       The level to check for the attribute.
  *              cap_num     The capability number associated with the
@@ -8217,18 +8216,18 @@ sdp_result_e sdp_attr_get_fmtp_init_buf_
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_INIT_BUF_TIME_FLAG) {
-            *val = attr_p->attr.fmtp.init_buf_time;
-            return (SDP_SUCCESS);
+	    *val = attr_p->attr.fmtp.init_buf_time;
+	    return (SDP_SUCCESS);
         } else {
             return (SDP_FAILURE);
         }
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_max_mbps
  * Description: Gets the value of the fmtp attribute- max-mbps parameter for H.264 codec
@@ -8504,18 +8503,18 @@ sdp_result_e sdp_attr_get_fmtp_deint_buf
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_DEINT_BUF_CAP_FLAG) {
-            *val = attr_p->attr.fmtp.deint_buf_cap;
-            return (SDP_SUCCESS);
+	    *val = attr_p->attr.fmtp.deint_buf_cap;
+	    return (SDP_SUCCESS);
         } else {
             return (SDP_FAILURE);
         }
     }
 }
 
 /* Function:    sdp_attr_get_fmtp_max_rcmd_nalu_size
  * Description: Gets the value of the fmtp attribute- max-rcmd-nalu-size parameter for H.264 codec
@@ -8544,18 +8543,18 @@ sdp_result_e sdp_attr_get_fmtp_max_rcmd_
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s fmtp attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (attr_p->attr.fmtp.flag & SDP_MAX_RCMD_NALU_SIZE_FLAG) {
-            *val = attr_p->attr.fmtp.max_rcmd_nalu_size;
-            return (SDP_SUCCESS);
+	    *val = attr_p->attr.fmtp.max_rcmd_nalu_size;
+	    return (SDP_SUCCESS);
         } else {
             return (SDP_FAILURE);
         }
     }
 }
 
 /* Function:    sdp_attr_fmtp_is_parameter_add
  * Description: Gets the value of the fmtp attribute- parameter-add for H.264 codec
@@ -9694,17 +9693,17 @@ tinybool sdp_media_dynamic_payload_valid
        sdp_get_media_num_payload_types(sdp_p, m_line);
 
    for(p_type=1; p_type <=num_payload_types;p_type++){
 
        m_ptype = (u16)sdp_get_media_payload_type(sdp_p,
                                             m_line, p_type, &ind);
        if (payload_type == m_ptype) {
            payload_matches = TRUE;
-           break;
+	   break;
        }
 
    }
 
    if (!payload_matches) {
        return FALSE;
    }
 
@@ -10403,18 +10402,18 @@ sdp_group_attr_e sdp_get_group_attr (voi
             CSFLogError(logTag, "%s Group (a= group line) attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_GROUP_ATTR_UNSUPPORTED);
     } else {
        if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
            SDP_PRINT("%s Stream data group attr field is :%s ",
-                     sdp_p->debug_str,
-                     sdp_get_group_attr_name(attr_p->attr.stream_data.group_attr) );
+		     sdp_p->debug_str,
+		     sdp_get_group_attr_name(attr_p->attr.stream_data.group_attr) );
         }
         return (attr_p->attr.stream_data.group_attr);
     }
 }
 
 /* Function:    sdp_set_group_attr
  * Description: Sets the value of the group attribute for the
  *              a=group:<val> line.
@@ -10592,18 +10591,18 @@ sdp_result_e sdp_set_group_id (void *sdp
     if (attr_p == NULL) {
         if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
             CSFLogError(logTag, "%s Group attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
-        num_group_id = attr_p->attr.stream_data.num_group_id;
-        if (num_group_id == SDP_MAX_GROUP_STREAM_ID) {
+	num_group_id = attr_p->attr.stream_data.num_group_id;
+	if (num_group_id == SDP_MAX_GROUP_STREAM_ID) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s Max number of Group Ids already defined "
                       "for this group line %u", sdp_p->debug_str, level);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
         }
         attr_p->attr.stream_data.group_id_arr[num_group_id] = group_id;
@@ -10639,18 +10638,18 @@ const char* sdp_attr_get_x_sidin (void *
             CSFLogError(logTag, "%s X-sidin attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream X-sidin attr field is :%s ",
-                      sdp_p->debug_str,
-                      attr_p->attr.stream_data.x_sidin);
+	       	      sdp_p->debug_str,
+		      attr_p->attr.stream_data.x_sidin);
         }
         return (attr_p->attr.stream_data.x_sidin);
     }
 }
 
 /* Function:    sdp_attr_set_x_sidin
  * Description: Sets the value of the X-sidin parameter
  *              for the given attribute. The address is copied into the
@@ -10719,18 +10718,18 @@ const char* sdp_attr_get_x_sidout (void 
             CSFLogError(logTag, "%s X-sidout attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream X-sidout attr field is :%s ",
-                      sdp_p->debug_str,
-                      attr_p->attr.stream_data.x_sidout);
+	 	      sdp_p->debug_str,
+		      attr_p->attr.stream_data.x_sidout);
         }
         return (attr_p->attr.stream_data.x_sidout);
     }
 }
 
 /* Function:    sdp_attr_set_x_sidout
  * Description: Sets the value of the x-sidout parameter
  *              for the given attribute. The address is copied into the
@@ -10799,18 +10798,18 @@ const char* sdp_attr_get_x_confid (void 
             CSFLogError(logTag, "%s X-confid attribute, level %u instance %u "
                       "not found.", sdp_p->debug_str, level, inst_num);
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Stream X-confid attr field is :%s ",
-                      sdp_p->debug_str,
-                      attr_p->attr.stream_data.x_confid);
+		      sdp_p->debug_str,
+		      attr_p->attr.stream_data.x_confid);
         }
         return (attr_p->attr.stream_data.x_confid);
     }
 }
 
 /* Function:    sdp_attr_set_x_confid
  * Description: Sets the value of the X-confid parameter
  *              for the given attribute. The address is copied into the
@@ -10894,25 +10893,25 @@ sdp_set_source_filter (void *sdp_ptr, u1
     attr_p->attr.source_filter.mode = mode;
     attr_p->attr.source_filter.nettype = nettype;
     attr_p->attr.source_filter.addrtype = addrtype;
     sstrncpy(attr_p->attr.source_filter.dest_addr, dest_addr,
              SDP_MAX_STRING_LEN+1);
     if (src_addr) {
         index = attr_p->attr.source_filter.num_src_addr;
         sstrncpy(attr_p->attr.source_filter.src_list[index],
-                 src_addr,SDP_MAX_STRING_LEN+1);
+	         src_addr,SDP_MAX_STRING_LEN+1);
         /* Increment source list count if the api was invoked for
          * first time or else we're basically replacing the index 0
          * element in src-list.
          */
         ++attr_p->attr.source_filter.num_src_addr;
-        SDP_PRINT("%s Source address (%s) number %d added to source filter",
-                  sdp_p->debug_str,src_addr,
-                  attr_p->attr.source_filter.num_src_addr);
+	SDP_PRINT("%s Source address (%s) number %d added to source filter",
+		  sdp_p->debug_str,src_addr,
+		  attr_p->attr.source_filter.num_src_addr);
 
     }
 
     return (SDP_SUCCESS);
 }
 
 /* Function:    sdp_include_new_filter_src_addr
  * Description: Adds source addresses to the list to which the filter applies
@@ -11236,24 +11235,24 @@ sdp_attr_get_sdescriptions_crypto_suite 
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* There's no version 2 so now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute suite, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SRTP_UNKNOWN_CRYPTO_SUITE;
-        }
+	}
     }
 
     return attr_p->attr.srtp_context.suite;
 
 }
 
 /* Function:    sdp_attr_get_sdescriptions_key
  * Description: Returns the value of the sdescriptions master key
@@ -11285,27 +11284,27 @@ sdp_attr_get_sdescriptions_key (void *sd
     }
 
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
-        attr_p = sdp_find_attr(sdp_p, level, cap_num,
+	attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute key, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
-        }
+	}
     }
 
     return (char*)attr_p->attr.srtp_context.master_key;
 }
 
 
 /* Function:    sdp_attr_get_sdescriptions_salt
  * Description: Returns the value of the sdescriptions master salt
@@ -11340,24 +11339,24 @@ sdp_attr_get_sdescriptions_salt (void *s
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute salt, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
-        }
+	}
     }
 
     return (char*) attr_p->attr.srtp_context.master_salt;
 
 }
 
 
 
@@ -11394,24 +11393,24 @@ sdp_attr_get_sdescriptions_lifetime (voi
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
 
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute lifetime, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
-        }
+	}
     }
 
     return (char*)attr_p->attr.srtp_context.master_key_lifetime;
 
 }
 
 /* Function:    sdp_attr_get_sdescriptions_mki
  * Description: Returns the value of the sdescriptions MKI value and length
@@ -11434,18 +11433,18 @@ sdp_attr_get_sdescriptions_lifetime (voi
  *                         is set to the MKI length if one exists.
  * Returns:     SDP_SUCCESS no errors encountered otherwise sdp error
  *              based upon the specific error.
  */
 
 sdp_result_e
 sdp_attr_get_sdescriptions_mki (void *sdp_ptr, u16 level,
                                 u8 cap_num, u16 inst_num,
-                                const char **mki_value,
-                                u16 *mki_length)
+				const char **mki_value,
+				u16 *mki_length)
 {
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     *mki_value = NULL;
     *mki_length = 0;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
@@ -11455,24 +11454,24 @@ sdp_attr_get_sdescriptions_mki (void *sd
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
-        }
+	}
     }
 
     *mki_value = (char*)attr_p->attr.srtp_context.mki;
     *mki_length = attr_p->attr.srtp_context.mki_size_bytes;
     return SDP_SUCCESS;
 
 }
 
@@ -11511,17 +11510,17 @@ sdp_attr_get_sdescriptions_session_param
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute session params, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return NULL;
         }
     }
@@ -11546,18 +11545,18 @@ sdp_attr_get_sdescriptions_session_param
  *              inst_num    The attribute instance number to check.
  * Returns:     0 (SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN) if error was
  *              encountered, otherwise key size.
  */
 
 unsigned char
 sdp_attr_get_sdescriptions_key_size (void *sdp_ptr,
                                      u16 level,
-                                     u8 cap_num,
-                                     u16 inst_num)
+				     u8 cap_num,
+				     u16 inst_num)
 {
 
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN;
     }
@@ -11565,24 +11564,24 @@ sdp_attr_get_sdescriptions_key_size (voi
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN;
-        }
+	}
     }
 
     return attr_p->attr.srtp_context.master_key_size_bytes;
 
 }
 
 
 /* Function:    sdp_attr_get_sdescriptions_salt_size
@@ -11601,18 +11600,18 @@ sdp_attr_get_sdescriptions_key_size (voi
  *              inst_num    The attribute instance number to check.
  * Returns:     0 (SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN) if error was
  *              encountered, otherwise salt size.
  */
 
 unsigned char
 sdp_attr_get_sdescriptions_salt_size (void *sdp_ptr,
                                       u16 level,
-                                      u8 cap_num,
-                                      u16 inst_num)
+				      u8 cap_num,
+				      u16 inst_num)
 {
 
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN;
     }
@@ -11620,24 +11619,24 @@ sdp_attr_get_sdescriptions_salt_size (vo
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SDESCRIPTIONS_KEY_SIZE_UNKNOWN;
-        }
+	}
     }
 
     return attr_p->attr.srtp_context.master_salt_size_bytes;
 
 }
 
 
 /* Function:    sdp_attr_get_srtp_crypto_selection_flags
@@ -11657,18 +11656,18 @@ sdp_attr_get_sdescriptions_salt_size (vo
  *              inst_num    The attribute instance number to check.
  * Returns:     0 (SDP_SRTP_CRYPTO_SELECTION_FLAGS_UNKNOWN) if error was
  *              encountered, otherwise selection flags.
  */
 
 unsigned long
 sdp_attr_get_srtp_crypto_selection_flags (void *sdp_ptr,
                                           u16 level,
-                                          u8 cap_num,
-                                          u16 inst_num)
+					  u8 cap_num,
+					  u16 inst_num)
 {
 
 
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_SRTP_CRYPTO_SELECTION_FLAGS_UNKNOWN;
@@ -11677,24 +11676,24 @@ sdp_attr_get_srtp_crypto_selection_flags
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
 
     if (attr_p == NULL) {
         /* Couldn't find version 2 now try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute MKI, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_SRTP_CRYPTO_SELECTION_FLAGS_UNKNOWN;
-        }
+	}
     }
 
     return attr_p->attr.srtp_context.selection_flags;
 
 }
 
 
 
@@ -11781,34 +11780,34 @@ sdp_attr_set_sdescriptions_crypto_suite 
         if (attr_p == NULL) {
 
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute suite, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
-        }
+	}
     }
 
     attr_p->attr.srtp_context.suite = crypto_suite;
     for (i=0; i < SDP_SRTP_MAX_NUM_CRYPTO_SUITES; i++) {
          /* For the specified crypto suite, get the size of the
-          * key and salt.
-          */
-         if (sdp_srtp_crypto_suite_array[i].crypto_suite_val ==
-                                            crypto_suite) {
+	  * key and salt.
+	  */
+	 if (sdp_srtp_crypto_suite_array[i].crypto_suite_val ==
+	                                    crypto_suite) {
 
               attr_p->attr.srtp_context.master_key_size_bytes =
-              sdp_srtp_crypto_suite_array[i].key_size_bytes;
-
-              attr_p->attr.srtp_context.master_salt_size_bytes =
-              sdp_srtp_crypto_suite_array[i].salt_size_bytes;
-
-         }
+	      sdp_srtp_crypto_suite_array[i].key_size_bytes;
+
+	      attr_p->attr.srtp_context.master_salt_size_bytes =
+	      sdp_srtp_crypto_suite_array[i].salt_size_bytes;
+
+	 }
    }
 
    return SDP_SUCCESS;
 
 }
 
 
 /* Function:    sdp_attr_set_sdescriptions_key
@@ -11857,17 +11856,17 @@ sdp_attr_set_sdescriptions_key (void *sd
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
         }
 
     }
 
     bcopy(key, attr_p->attr.srtp_context.master_key,
-          SDP_SRTP_MAX_KEY_SIZE_BYTES);
+	  SDP_SRTP_MAX_KEY_SIZE_BYTES);
 
     return SDP_SUCCESS;
 
 }
 
 
 /* Function:    sdp_attr_set_sdescriptions_salt
  * Description: Sets the sdescriptions salt parameter. Note that
@@ -11903,29 +11902,29 @@ sdp_attr_set_sdescriptions_salt (void *s
 
     /* Try to find version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp attribute salt, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return (SDP_INVALID_PARAMETER);
-        }
+	}
 
     }
 
     bcopy(salt, attr_p->attr.srtp_context.master_salt,
-          SDP_SRTP_MAX_SALT_SIZE_BYTES);
+	  SDP_SRTP_MAX_SALT_SIZE_BYTES);
 
     return SDP_SUCCESS;
 }
 
 
 /* Function:    sdp_attr_set_sdescriptions_lifetime
  * Description: Sets the sdescriptions lifetime parameter. Note that
  *              this is a common api for both version 2 and version 9
@@ -11959,29 +11958,29 @@ sdp_attr_set_sdescriptions_lifetime (voi
 
     /* Try version 2 first */
     attr_p = sdp_find_attr(sdp_p, level, cap_num,
                            SDP_ATTR_SRTP_CONTEXT, inst_num);
     if (attr_p == NULL) {
         /* Couldn't find version 2, try version 9 */
         attr_p = sdp_find_attr(sdp_p, level, cap_num,
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
-        if (attr_p == NULL) {
+	if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp lifetime attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
-        }
+	}
 
     }
 
     sstrncpy((char*)attr_p->attr.srtp_context.master_key_lifetime, lifetime,
-             SDP_SRTP_MAX_LIFETIME_BYTES);
+	     SDP_SRTP_MAX_LIFETIME_BYTES);
     return SDP_SUCCESS;
 
 }
 
 
 /* Function:    sdp_attr_set_sdescriptions_mki
  * Description: Sets the sdescriptions mki parameter compose of the MKI
  *              value and length. Note that this is a common api for both
@@ -12002,17 +12001,17 @@ sdp_attr_set_sdescriptions_lifetime (voi
  * Returns:     SDP_SUCCESS            Attribute param was set successfully.
  *              SDP_INVALID_PARAMETER  Specified attribute is not defined.
  */
 
 sdp_result_e
 sdp_attr_set_sdescriptions_mki (void *sdp_ptr, u16 level,
                                 u8 cap_num, u16 inst_num,
                                 char *mki_value,
-                                u16 mki_length)
+				u16 mki_length)
 {
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_INVALID_SDP_PTR;
     }
 
@@ -12025,21 +12024,21 @@ sdp_attr_set_sdescriptions_mki (void *sd
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp MKI attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
-        }
+	}
     }
 
     sstrncpy((char*)attr_p->attr.srtp_context.mki, mki_value,
-             SDP_SRTP_MAX_MKI_SIZE_BYTES);
+	     SDP_SRTP_MAX_MKI_SIZE_BYTES);
     attr_p->attr.srtp_context.mki_size_bytes = mki_length;
     return SDP_SUCCESS;
 
 }
 
 
 /* Function:    sdp_attr_set_sdescriptions_key_size
  * Description: Sets the sdescriptions key size parameter. Note that
@@ -12058,19 +12057,19 @@ sdp_attr_set_sdescriptions_mki (void *sd
  *              key_size    key size
  * Returns:     SDP_SUCCESS            Attribute param was set successfully.
  *              SDP_INVALID_PARAMETER  Specified attribute is not defined.
  */
 
 sdp_result_e
 sdp_attr_set_sdescriptions_key_size (void *sdp_ptr,
                                      u16 level,
-                                     u8 cap_num,
-                                     u16 inst_num,
-                                     unsigned char key_size)
+				     u8 cap_num,
+				     u16 inst_num,
+				     unsigned char key_size)
 
 {
 
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_INVALID_SDP_PTR;
@@ -12085,17 +12084,17 @@ sdp_attr_set_sdescriptions_key_size (voi
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp MKI attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
-        }
+	}
     }
 
     attr_p->attr.srtp_context.master_key_size_bytes = key_size;
     return SDP_SUCCESS;
 
 }
 
 
@@ -12116,19 +12115,19 @@ sdp_attr_set_sdescriptions_key_size (voi
  *              salt_size   salt size
  * Returns:     SDP_SUCCESS            Attribute param was set successfully.
  *              SDP_INVALID_PARAMETER  Specified attribute is not defined.
  */
 
 sdp_result_e
 sdp_attr_set_sdescriptions_salt_size (void *sdp_ptr,
                                       u16 level,
-                                      u8 cap_num,
-                                      u16 inst_num,
-                                      unsigned char salt_size)
+				      u8 cap_num,
+				      u16 inst_num,
+				      unsigned char salt_size)
 {
 
     sdp_t       *sdp_p = (sdp_t *)sdp_ptr;
     sdp_attr_t  *attr_p;
 
     if (sdp_verify_sdp_ptr(sdp_p) == FALSE) {
         return SDP_INVALID_SDP_PTR;
     }
@@ -12142,17 +12141,17 @@ sdp_attr_set_sdescriptions_salt_size (vo
                                SDP_ATTR_SDESCRIPTIONS, inst_num);
         if (attr_p == NULL) {
             if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
                 CSFLogError(logTag, "%s srtp MKI attribute, level %u instance %u "
                           "not found.", sdp_p->debug_str, level, inst_num);
             }
             sdp_p->conf_p->num_invalid_param++;
             return SDP_INVALID_PARAMETER;
-        }
+	}
     }
 
     attr_p->attr.srtp_context.master_salt_size_bytes = salt_size;
     return SDP_SUCCESS;
 
 }
 
 
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_main.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_main.c
@@ -163,18 +163,16 @@ const sdp_attrarray_t sdp_attr[SDP_MAX_A
     {"ice-ufrag", sizeof("ice-ufrag"),
       sdp_parse_attr_ice_attr, sdp_build_attr_ice_attr },
     {"ice-pwd", sizeof("ice-pwd"),
       sdp_parse_attr_ice_attr, sdp_build_attr_ice_attr},
     {"rtcp-mux", sizeof("rtcp-mux"),
       sdp_parse_attr_rtcp_mux_attr, sdp_build_attr_rtcp_mux_attr},
     {"fingerprint", sizeof("fingerprint"),
       sdp_parse_attr_fingerprint_attr, sdp_build_attr_simple_string},
-    {"identity", sizeof("identity"),
-      sdp_parse_attr_simple_string, sdp_build_attr_simple_string},
     {"maxptime", sizeof("maxptime"),
       sdp_parse_attr_simple_u32, sdp_build_attr_simple_u32},
     {"rtcp-fb", sizeof("rtcp-fb"),
       sdp_parse_attr_rtcp_fb, sdp_build_attr_rtcp_fb},
     {"setup", sizeof("setup"),
       sdp_parse_attr_setup, sdp_build_attr_setup},
     {"connection", sizeof("connection"),
       sdp_parse_attr_connection, sdp_build_attr_connection},
--- a/media/webrtc/signaling/src/sipcc/include/ccsdp.h
+++ b/media/webrtc/signaling/src/sipcc/include/ccsdp.h
@@ -241,17 +241,16 @@ typedef enum {
     SDP_ATTR_ICE_UFRAG,
     SDP_ATTR_ICE_PWD,
     SDP_ATTR_RTCP_MUX,
     SDP_ATTR_DTLS_FINGERPRINT,
     SDP_ATTR_MAXPTIME,
     SDP_ATTR_RTCP_FB,  /* RFC 4585 */
     SDP_ATTR_SETUP,
     SDP_ATTR_CONNECTION,
-    SDP_ATTR_IDENTITY,
     SDP_MAX_ATTR_TYPES,
     SDP_ATTR_INVALID
 } sdp_attr_e;
 
 /* This is here so that it can be used in the VcmSIPCCBinding interface */
 typedef enum {
     SDP_SETUP_NOT_FOUND = -1,
     SDP_SETUP_ACTIVE = 0,
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -238,21 +238,16 @@ pref("media.peerconnection.enabled", tru
 pref("media.peerconnection.video.enabled", true);
 pref("media.navigator.video.max_fs", 0); // unrestricted
 pref("media.navigator.video.max_fr", 0); // unrestricted
 #endif
 pref("media.navigator.permission.disabled", false);
 pref("media.peerconnection.default_iceservers", "[{\"url\": \"stun:stun.services.mozilla.com\"}]");
 pref("media.peerconnection.trickle_ice", true);
 pref("media.peerconnection.use_document_iceservers", true);
-// Do not enable identity before ensuring that the UX cannot be spoofed
-// see Bug 884573 for details
-// Do not enable identity before fixing domain comparison: see Bug 958741
-pref("media.peerconnection.identity.enabled", false);
-pref("media.peerconnection.identity.timeout", 5000);
 // These values (aec, agc, and noice) are from media/webrtc/trunk/webrtc/common_types.h
 // kXxxUnchanged = 0, kXxxDefault = 1, and higher values are specific to each 
 // setting (for Xxx = Ec, Agc, or Ns).  Defaults are all set to kXxxDefault here.
 pref("media.peerconnection.turn.disable", false);
 pref("media.peerconnection.aec_enabled", true);
 pref("media.peerconnection.aec", 1);
 pref("media.peerconnection.agc_enabled", false);
 pref("media.peerconnection.agc", 1);
new file mode 100644
--- /dev/null
+++ b/toolkit/identity/tests/mochitest/moz.build
@@ -0,0 +1,6 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
--- a/toolkit/identity/tests/moz.build
+++ b/toolkit/identity/tests/moz.build
@@ -1,9 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DIRS += ['chrome']
+DIRS += ['chrome', 'mochitest']
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']