Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
1c1bc089 by wurstsalat at 2025-11-06T22:52:10+01:00
fix: Certificate dialog: Catch error when trying to get serial number

Fixes #12519

- - - - -


1 changed file:

- gajim/gtk/preference/certificate.py


Changes:

=====================================
gajim/gtk/preference/certificate.py
=====================================
@@ -95,7 +95,11 @@ def __init__(self, account: str | None, certificate: 
Gio.TlsCertificate) -> None
             log.info("Certificate does not have extension: %s", err)
             self._it_subject_alt_names = "-"
 
-        serial_bytes = format_bytes_as_hex(int_to_bytes(cert.serial_number), 2)
+        try:
+            serial_bytes = 
format_bytes_as_hex(int_to_bytes(cert.serial_number), 2)
+        except Exception:
+            log.exception("Error while trying to get serial number of 
certificate")
+            serial_bytes = ""
         self._it_serial_number = serial_bytes
 
         self._ib_common_name = "-"



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/1c1bc08910b37fa627a9917afc89339863b2dbf8

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/1c1bc08910b37fa627a9917afc89339863b2dbf8
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to