eric6/E5Network/E5SslCertificatesInfoWidget.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/E5Network/E5SslCertificatesInfoWidget.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/E5Network/E5SslCertificatesInfoWidget.py	Tue Mar 02 17:17:09 2021 +0100
@@ -49,10 +49,12 @@
             self.__chain = certificateChain[:]
             
             for cert in self.__chain:
-                name = ", ".join(cert.subjectInfo(QSslCertificate.CommonName))
+                name = ", ".join(cert.subjectInfo(
+                    QSslCertificate.SubjectInfo.CommonName))
                 if not name:
                     name = ", ".join(
-                        cert.subjectInfo(QSslCertificate.Organization))
+                        cert.subjectInfo(
+                            QSslCertificate.SubjectInfo.Organization))
                 if not name:
                     name = cert.serialNumber()
                 self.chainComboBox.addItem(name)
@@ -90,33 +92,36 @@
             
             self.subjectCommonNameLabel.setText(self.__certificateString(
                 ", ".join(certificate.subjectInfo(
-                    QSslCertificate.CommonName))))
+                    QSslCertificate.SubjectInfo.CommonName))))
             self.subjectOrganizationLabel.setText(self.__certificateString(
                 ", ".join(certificate.subjectInfo(
-                    QSslCertificate.Organization))))
+                    QSslCertificate.SubjectInfo.Organization))))
             self.subjectOrganizationalUnitLabel.setText(
                 self.__certificateString(", ".join(
                     certificate.subjectInfo(
-                        QSslCertificate.OrganizationalUnitName))))
+                        QSslCertificate.SubjectInfo.OrganizationalUnitName))))
             self.issuerCommonNameLabel.setText(self.__certificateString(
-                ", ".join(certificate.issuerInfo(QSslCertificate.CommonName))))
+                ", ".join(certificate.issuerInfo(
+                    QSslCertificate.SubjectInfo.CommonName))))
             self.issuerOrganizationLabel.setText(self.__certificateString(
                 ", ".join(certificate.issuerInfo(
-                    QSslCertificate.Organization))))
+                    QSslCertificate.SubjectInfo.Organization))))
             self.issuerOrganizationalUnitLabel.setText(
                 self.__certificateString(", ".join(
                     certificate.issuerInfo(
-                        QSslCertificate.OrganizationalUnitName))))
+                        QSslCertificate.SubjectInfo.OrganizationalUnitName))))
             self.serialNumberLabel.setText(self.__serialNumber(certificate))
             self.effectiveLabel.setText(
                 certificate.effectiveDate().toString("yyyy-MM-dd"))
             self.expiresLabel.setText(
                 certificate.expiryDate().toString("yyyy-MM-dd"))
             self.sha1Label.setText(self.__formatHexString(
-                str(certificate.digest(QCryptographicHash.Sha1).toHex(),
+                str(certificate.digest(
+                    QCryptographicHash.Algorithm.Sha1).toHex(),
                     encoding="ascii")))
             self.md5Label.setText(self.__formatHexString(
-                str(certificate.digest(QCryptographicHash.Md5).toHex(),
+                str(certificate.digest(
+                    QCryptographicHash.Algorithm.Md5).toHex(),
                     encoding="ascii")))
             
             if certificate.isBlacklisted():

eric ide

mercurial