obj.test_server( obj.controller.view.server_prompt.value );
}
],
+ 'ssl_exception' : [
+ ['render'],
+ function(e) {
+ return function() {
+ try {
+ obj.controller.view.cmd_ssl_exception.setAttribute('hidden','true');
+ var x = new XMLHttpRequest();
+ x.open("GET",'chrome://pippki/content/exceptionDialog.xul',false);
+ x.send(null);
+ obj.controller.view.cmd_ssl_exception.setAttribute('hidden','false');
+ } catch(E) {
+ obj.controller.view.cmd_ssl_exception.setAttribute('hidden','true');
+ }
+ };
+ }
+ ],
+ 'cmd_ssl_exception' : [
+ ['command'],
+ function() {
+ window.openDialog(
+ 'chrome://pippki/content/exceptionDialog.xul',
+ '',
+ 'chrome,centerscreen,modal',
+ {
+ 'location' : 'https://' + obj.controller.view.server_prompt.value,
+ 'prefetchCert' : true
+ }
+ );
+ obj.test_server( obj.controller.view.server_prompt.value );
+ }
+ ],
'server_prompt' : [
['keypress'],
handle_keypress
return;
}
try {
- if ( ! url.match(/^http:\/\//) ) url = 'http://' + url;
+ if ( ! url.match(/^https:\/\//) ) url = 'https://' + url;
var x = new XMLHttpRequest();
dump('server url = ' + url + '\n');
x.open("GET",url,true);
<command id="cmd_js_console"/>
<command id="cmd_clear_cache"/>
<command id="cmd_test_server"/>
+ <command id="cmd_ssl_exception" hidden="true"/>
</commandset>
<keyset id="auth_keys">
<label value="Hostname" control="server_prompt" accesskey="H"/>
<vbox>
<textbox id="server_prompt"/>
- <button label="Re-Test Server" id="retest" accesskey="R" command="cmd_test_server"/>
+ <hbox>
+ <button label="Re-Test Server" id="retest" accesskey="R" command="cmd_test_server"/>
+ <button label="Add SSL Exception" id="ssl_exception" command="cmd_ssl_exception"/>
+ </hbox>
</vbox>
</row>
<row>