Bug 954534 - Use Firefox untrusted cert dialog for "SSL Handshake failed" errors: instantbird/ part, r=florian.
This commit is contained in:
Родитель
7c994c36f0
Коммит
dedf7de3d7
|
@ -6,7 +6,9 @@
|
|||
|
||||
<!DOCTYPE bindings [
|
||||
<!ENTITY % accountsDTD SYSTEM "chrome://instantbird/locale/accounts.dtd">
|
||||
<!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
|
||||
%accountsDTD;
|
||||
%certManagerDTD;
|
||||
]>
|
||||
|
||||
<bindings id="accountBindings"
|
||||
|
@ -25,7 +27,7 @@
|
|||
</xul:stack>
|
||||
<xul:spacer flex="1"/>
|
||||
</xul:vbox>
|
||||
<xul:vbox flex="1">
|
||||
<xul:vbox flex="1" align="start">
|
||||
<xul:label xbl:inherits="value=name" crop="end" class="accountName"/>
|
||||
<xul:label class="connecting" crop="end" anonid="connecting" value="&account.connecting;"/>
|
||||
<xul:label class="connected" crop="end" anonid="connected"/>
|
||||
|
@ -33,6 +35,10 @@
|
|||
<xul:label class="disconnected" crop="end" value="&account.disconnected;"/>
|
||||
<xul:description class="error" anonid="error"/>
|
||||
<xul:description class="error" anonid="reconnect"/>
|
||||
<xul:label class="addException text-link"
|
||||
onclick="gAccountManager.addException()"
|
||||
value="&certmgr.addException.label;"
|
||||
accesskey="&certmgr.addException.accesskey;"/>
|
||||
<xul:spacer flex="1"/>
|
||||
</xul:vbox>
|
||||
<xul:checkbox label="&account.autoSignOn.label;" dir="reverse"
|
||||
|
@ -63,8 +69,10 @@
|
|||
state = "disconnected";
|
||||
if (this._account.connectionErrorReason != Ci.prplIAccount.NO_ERROR)
|
||||
this.updateConnectionError();
|
||||
else
|
||||
else {
|
||||
this.removeAttribute("error");
|
||||
this.removeAttribute("certError");
|
||||
}
|
||||
} else if (this._account.connecting) {
|
||||
state = "connecting";
|
||||
this.updateConnectionState();
|
||||
|
@ -91,6 +99,8 @@
|
|||
progress.setAttribute("value", text);
|
||||
if (this.reconnectUpdateInterval)
|
||||
this._cancelReconnectTimer();
|
||||
|
||||
this.removeAttribute("certError");
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -117,6 +127,10 @@
|
|||
text = bundle.getFormattedString(key, [text]);
|
||||
|
||||
this.setAttribute("error", "true");
|
||||
if ((Ci.imIAccount.ERROR_CERT_NOT_PROVIDED <= errorReason &&
|
||||
errorReason <= Ci.imIAccount.ERROR_CERT_OTHER_ERROR) &&
|
||||
account.prplAccount.connectionTarget)
|
||||
this.setAttribute("certError", "true");
|
||||
var error = document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"error");
|
||||
error.textContent = text;
|
||||
|
|
|
@ -24,6 +24,8 @@ richlistitem[error="true"] .disconnected,
|
|||
richlistitem[selected="true"]:not([state="disconnected"]) .connectButton,
|
||||
richlistitem[selected="true"][state="disconnected"] .disconnectButton,
|
||||
richlistitem[selected="true"][state="disconnecting"] .disconnectButton,
|
||||
richlistitem[selected="true"]:not([certError="true"]) .addException,
|
||||
richlistitem:not([selected="true"]) .addException,
|
||||
richlistitem:not([selected="true"]) .autoSignOn,
|
||||
richlistitem:not([reconnectPending="true"]) description[anonid="reconnect"]
|
||||
{
|
||||
|
|
|
@ -207,6 +207,20 @@ var gAccountManager = {
|
|||
account.disconnect();
|
||||
}
|
||||
},
|
||||
addException: function am_addException() {
|
||||
let account = this.accountList.selectedItem.account;
|
||||
if (!account.disconnected || !account.prplAccount.connectionTarget)
|
||||
return;
|
||||
|
||||
// Open the Gecko SSL exception dialog.
|
||||
let params = {exceptionAdded: false, prefetchCert: true,
|
||||
location: account.prplAccount.connectionTarget};
|
||||
window.openDialog("chrome://pippki/content/exceptionDialog.xul", "",
|
||||
"chrome,centerscreen,modal", params);
|
||||
// Reconnect the account if an exception was added.
|
||||
if (params.exceptionAdded)
|
||||
account.connect();
|
||||
},
|
||||
copyDebugLog: function am_copyDebugLog() {
|
||||
let account = this.accountList.selectedItem.account;
|
||||
let text = account.getDebugMessages().map(function(dbgMsg) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче