178 self.__browser.url().scheme() == "https" and \ |
178 self.__browser.url().scheme() == "https" and \ |
179 QSslCertificate is not None: |
179 QSslCertificate is not None: |
180 sslInfo = self.__browser.page().getSslInfo() |
180 sslInfo = self.__browser.page().getSslInfo() |
181 if sslInfo is not None: |
181 if sslInfo is not None: |
182 if qVersion() >= "5.0.0": |
182 if qVersion() >= "5.0.0": |
183 org = Utilities.html_encode(Utilities.decodeString( |
183 org = Utilities.decodeString( |
184 ", ".join(sslInfo.subjectInfo(QSslCertificate.Organization)))) |
184 ", ".join(sslInfo.subjectInfo(QSslCertificate.Organization))) |
185 else: |
185 else: |
186 org = Utilities.html_encode(Utilities.decodeString( |
186 org = Utilities.decodeString( |
187 sslInfo.subjectInfo(QSslCertificate.Organization))) |
187 sslInfo.subjectInfo(QSslCertificate.Organization)) |
188 if org == "": |
188 if org == "": |
189 if qVersion() >= "5.0.0": |
189 if qVersion() >= "5.0.0": |
190 cn = Utilities.html_encode(Utilities.decodeString( |
190 cn = Utilities.decodeString(", ".join( |
191 ", ".join( |
191 sslInfo.subjectInfo(QSslCertificate.CommonName))) |
192 sslInfo.subjectInfo(QSslCertificate.CommonName)))) |
|
193 else: |
192 else: |
194 cn = Utilities.html_encode(Utilities.decodeString( |
193 cn = Utilities.decodeString( |
195 sslInfo.subjectInfo(QSslCertificate.CommonName))) |
194 sslInfo.subjectInfo(QSslCertificate.CommonName)) |
196 if cn != "": |
195 if cn != "": |
197 org = cn.split(".", 1)[1] |
196 org = cn.split(".", 1)[1] |
198 if org == "": |
197 if org == "": |
199 org = self.trUtf8("Unknown") |
198 org = self.trUtf8("Unknown") |
200 self.__sslLabel.setText(" {0} ".format(org)) |
199 self.__sslLabel.setText(" {0} ".format(org)) |