12 from PyQt6.QtCore import ( |
12 from PyQt6.QtCore import ( |
13 pyqtSlot, Qt, QByteArray, QFile, QFileInfo, QIODevice |
13 pyqtSlot, Qt, QByteArray, QFile, QFileInfo, QIODevice |
14 ) |
14 ) |
15 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem |
15 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem |
16 with contextlib.suppress(ImportError): |
16 with contextlib.suppress(ImportError): |
17 from PyQt6.QtNetwork import ( |
17 from PyQt6.QtNetwork import QSslCertificate, QSslConfiguration, QSsl |
18 QSslCertificate, QSslSocket, QSslConfiguration, QSsl |
|
19 ) |
|
20 |
18 |
21 from EricWidgets import EricMessageBox, EricFileDialog |
19 from EricWidgets import EricMessageBox, EricFileDialog |
22 |
20 |
23 from .Ui_EricSslCertificatesDialog import Ui_EricSslCertificatesDialog |
21 from .Ui_EricSslCertificatesDialog import Ui_EricSslCertificatesDialog |
24 |
22 |
269 @return list of system certificates (list of QSslCertificate) |
267 @return list of system certificates (list of QSslCertificate) |
270 """ |
268 """ |
271 caList = QSslCertificate.fromData(Globals.toByteArray( |
269 caList = QSslCertificate.fromData(Globals.toByteArray( |
272 Preferences.getSettings().value("Help/SystemCertificates"))) |
270 Preferences.getSettings().value("Help/SystemCertificates"))) |
273 if not caList: |
271 if not caList: |
274 caList = QSslSocket.systemCaCertificates() |
272 caList = QSslConfiguration.systemCaCertificates() |
275 return caList |
273 return caList |
276 |
274 |
277 def __populateCaCertificatesTree(self): |
275 def __populateCaCertificatesTree(self): |
278 """ |
276 """ |
279 Private slot to populate the CA certificates tree. |
277 Private slot to populate the CA certificates tree. |