150 |
150 |
151 @param txt text to be displayed (string) |
151 @param txt text to be displayed (string) |
152 @return prepared text (string) |
152 @return prepared text (string) |
153 """ |
153 """ |
154 if txt is None or txt == "": |
154 if txt is None or txt == "": |
155 return self.trUtf8("<not part of the certificate>") |
155 return self.tr("<not part of the certificate>") |
156 |
156 |
157 return Utilities.decodeString(txt) |
157 return Utilities.decodeString(txt) |
158 |
158 |
159 def __serialNumber(self, cert): |
159 def __serialNumber(self, cert): |
160 """ |
160 """ |
163 @param cert reference to the SSL certificate (QSslCertificate) |
163 @param cert reference to the SSL certificate (QSslCertificate) |
164 @return formated serial number (string) |
164 @return formated serial number (string) |
165 """ |
165 """ |
166 serial = cert.serialNumber() |
166 serial = cert.serialNumber() |
167 if serial == "": |
167 if serial == "": |
168 return self.trUtf8("<not part of the certificate>") |
168 return self.tr("<not part of the certificate>") |
169 |
169 |
170 if ':' in serial: |
170 if ':' in serial: |
171 return str(serial, encoding="ascii").upper() |
171 return str(serial, encoding="ascii").upper() |
172 else: |
172 else: |
173 hexString = hex(int(serial))[2:] |
173 hexString = hex(int(serial))[2:] |