15 try: |
15 try: |
16 from PyQt4.QtNetwork import QSsl, QSslCertificate, QSslConfiguration, QSslSocket |
16 from PyQt4.QtNetwork import QSsl, QSslCertificate, QSslConfiguration, QSslSocket |
17 SSL_AVAILABLE = True |
17 SSL_AVAILABLE = True |
18 except ImportError: |
18 except ImportError: |
19 SSL_AVAILABLE = False |
19 SSL_AVAILABLE = False |
|
20 |
|
21 from E5Gui import E5MessageBox |
20 |
22 |
21 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \ |
23 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \ |
22 proxyAuthenticationRequired |
24 proxyAuthenticationRequired |
23 |
25 |
24 from UI.AuthenticationDialog import AuthenticationDialog |
26 from UI.AuthenticationDialog import AuthenticationDialog |
215 if ret == QMessageBox.Yes: |
217 if ret == QMessageBox.Yes: |
216 if len(caNew) > 0: |
218 if len(caNew) > 0: |
217 certinfos = [] |
219 certinfos = [] |
218 for cert in caNew: |
220 for cert in caNew: |
219 certinfos.append(self.__certToString(cert)) |
221 certinfos.append(self.__certToString(cert)) |
220 ret = QMessageBox.question(None, |
222 ret = E5MessageBox.question(None, |
221 self.trUtf8("Certificates"), |
223 self.trUtf8("Certificates"), |
222 self.trUtf8("""<p>Certificates:<br/>{0}<br/>""" |
224 self.trUtf8("""<p>Certificates:<br/>{0}<br/>""" |
223 """Do you want to accept all these certificates?</p>""")\ |
225 """Do you want to accept all these certificates?</p>""")\ |
224 .format("".join(certinfos)), |
226 .format("".join(certinfos)), |
225 QMessageBox.StandardButtons(\ |
227 QMessageBox.StandardButtons(\ |