src/eric7/EricNetwork/EricSslCertificateSelectionDialog.py

branch
eric7
changeset 10928
46651e194fbe
parent 10923
9b0dee552ccc
child 11006
a671918232f3
equal deleted inserted replaced
10927:ce599998be7d 10928:46651e194fbe
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem 13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem
14 14
15 with contextlib.suppress(ImportError): 15 with contextlib.suppress(ImportError):
16 from PyQt6.QtNetwork import QSslCertificate 16 from PyQt6.QtNetwork import QSslCertificate
17 17
18 from eric7 import Utilities 18 from eric7 import EricUtilities
19 from eric7.EricGui import EricPixmapCache 19 from eric7.EricGui import EricPixmapCache
20 20
21 from .Ui_EricSslCertificateSelectionDialog import Ui_EricSslCertificateSelectionDialog 21 from .Ui_EricSslCertificateSelectionDialog import Ui_EricSslCertificateSelectionDialog
22 22
23 23
68 68
69 @param cert certificate to insert 69 @param cert certificate to insert
70 @type QSslCertificate 70 @type QSslCertificate
71 """ 71 """
72 # step 1: extract the info to be shown 72 # step 1: extract the info to be shown
73 organisation = Utilities.decodeString( 73 organisation = EricUtilities.decodeString(
74 ", ".join(cert.subjectInfo(QSslCertificate.SubjectInfo.Organization)) 74 ", ".join(cert.subjectInfo(QSslCertificate.SubjectInfo.Organization))
75 ) 75 )
76 commonName = Utilities.decodeString( 76 commonName = EricUtilities.decodeString(
77 ", ".join(cert.subjectInfo(QSslCertificate.SubjectInfo.CommonName)) 77 ", ".join(cert.subjectInfo(QSslCertificate.SubjectInfo.CommonName))
78 ) 78 )
79 if organisation is None or organisation == "": 79 if organisation is None or organisation == "":
80 organisation = self.tr("(Unknown)") 80 organisation = self.tr("(Unknown)")
81 if commonName is None or commonName == "": 81 if commonName is None or commonName == "":

eric ide

mercurial