blob: ba7f179f118078ab29cb5e42117920f48c279d0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
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))
"""
|