From cd91cd36477662acc429c20af2111fbc5ac880ec Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 11 Jun 2007 12:10:48 +0000 Subject: Popup fixes and added (incomplete) support for dialogs. --- (limited to 'securitydialogs.py') diff --git a/securitydialogs.py b/securitydialogs.py new file mode 100644 index 0000000..17670ba --- /dev/null +++ b/securitydialogs.py @@ -0,0 +1,36 @@ +import logging + +import xpcom +from xpcom import components +from xpcom.components import interfaces +from xpcom.server.factory import Factory + +class SecurityDialogs: + _com_interfaces_ = interfaces.nsIBadCertListener + + cid = '{267d2fc2-1810-11dc-8314-0800200c9a66}' + description = 'Sugar Security Dialogs' + + def __init__(self): + pass + + def confirmCertExpired(socketInfo, cert): + logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmCertExpired()') + return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True + + def confirmMismatchDomain(socketInfo, targetURL, cert): + logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmMismatchDomain()') + return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True + + def confirmUnknownIssuer(socketInfo, cert, certAddType): + logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmUnknownIssuer()') + return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True + + def notifyCrlNextupdate(socketInfo, targetURL, cert): + logging.debug('UNIMPLEMENTED: SecurityDialogs.notifyCrlNextupdate()') + +components.registrar.registerFactory(SecurityDialogs.cid, + SecurityDialogs.description, + '@mozilla.org/nsBadCertListener;1', + Factory(SecurityDialogs)) + -- cgit v0.9.1