12 import platform |
12 import platform |
13 |
13 |
14 from PyQt6.QtCore import QObject, QByteArray |
14 from PyQt6.QtCore import QObject, QByteArray |
15 from PyQt6.QtNetwork import QSslCertificate, QSslConfiguration, QSslError, QSsl |
15 from PyQt6.QtNetwork import QSslCertificate, QSslConfiguration, QSslError, QSsl |
16 |
16 |
17 from E5Gui import E5MessageBox |
17 from E5Gui import EricMessageBox |
18 |
18 |
19 import Preferences |
19 import Preferences |
20 import Utilities |
20 import Utilities |
21 import Globals |
21 import Globals |
22 |
22 |
143 caNew.append(cert) |
143 caNew.append(cert) |
144 if not errorStrings: |
144 if not errorStrings: |
145 return EricSslErrorState.SYSTEM_IGNORED, False |
145 return EricSslErrorState.SYSTEM_IGNORED, False |
146 |
146 |
147 errorString = '.</li><li>'.join(errorStrings) |
147 errorString = '.</li><li>'.join(errorStrings) |
148 ret = E5MessageBox.yesNo( |
148 ret = EricMessageBox.yesNo( |
149 None, |
149 None, |
150 self.tr("SSL Errors"), |
150 self.tr("SSL Errors"), |
151 self.tr("""<p>SSL Errors for <br /><b>{0}</b>""" |
151 self.tr("""<p>SSL Errors for <br /><b>{0}</b>""" |
152 """<ul><li>{1}</li></ul></p>""" |
152 """<ul><li>{1}</li></ul></p>""" |
153 """<p>Do you want to ignore these errors?</p>""") |
153 """<p>Do you want to ignore these errors?</p>""") |
154 .format(server, errorString), |
154 .format(server, errorString), |
155 icon=E5MessageBox.Warning) |
155 icon=EricMessageBox.Warning) |
156 |
156 |
157 if ret: |
157 if ret: |
158 caRet = False |
158 caRet = False |
159 if len(caNew) > 0: |
159 if len(caNew) > 0: |
160 certinfos = [] |
160 certinfos = [] |
161 for cert in caNew: |
161 for cert in caNew: |
162 certinfos.append(self.__certToString(cert)) |
162 certinfos.append(self.__certToString(cert)) |
163 caRet = E5MessageBox.yesNo( |
163 caRet = EricMessageBox.yesNo( |
164 None, |
164 None, |
165 self.tr("Certificates"), |
165 self.tr("Certificates"), |
166 self.tr( |
166 self.tr( |
167 """<p>Certificates:<br/>{0}<br/>""" |
167 """<p>Certificates:<br/>{0}<br/>""" |
168 """Do you want to accept all these certificates?""" |
168 """Do you want to accept all these certificates?""" |