[gnutls-devel] Guile-GnuTLS | year 2038 problem in x509-certificate-*-time (#32)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Sun Mar 2 11:20:19 CET 2025
Dariqq commented: https://gitlab.com/gnutls/guile/-/issues/32#note_2374215747
This might not be a problem with guile-gnutls but rather with gnutls itself as the `time_t` value returned by `gnutls_x509_crt_get_expiration_time` is already negative, and `scm_from_int` just converts that to `SCM`. Trying to use the `set-*!` variants with a big or small enough time value leads to a gnutls exception:
```scm
(use-modules (gnutls))
(let ((cert (make-x509-certificate))
(expiration (expt 2 31)))
(set-x509-certificate-expiration-time! cert expiration))
;; In procedure raise exception:
;; Value out of range -2147483648 to< 2147483647: 2147483648
```
Which are `-2^31` and `2^31 - 1` and
Not sure where things get truncated to 32bits. I'll report to them
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/guile/-/issues/32#note_2374215747
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20250302/50abb70e/attachment.html>
More information about the Gnutls-devel
mailing list