gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_17-2-gb890833


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_17-2-gb890833
Date: Sat, 17 Mar 2012 12:28:12 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=b89083385bc30c2dce2516a5c98e544fb6eadc9b

The branch, master has been updated
       via  b89083385bc30c2dce2516a5c98e544fb6eadc9b (commit)
      from  3043f8631aaa0514e361395bceca1eec5a0d2fa6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b89083385bc30c2dce2516a5c98e544fb6eadc9b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Mar 17 13:25:50 2012 +0100

    Applied patch to cast days to (time_t) before converting it to
    seconds to prevent a Y2K38 bug. Patch by Robert Millan.

-----------------------------------------------------------------------

Summary of changes:
 NEWS           |    9 +++++++++
 src/certtool.c |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 490660d..e212072 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,15 @@ GnuTLS NEWS -- History of user-visible changes.                
-*- outline -*-
 Copyright (C) 2000-2012 Free Software Foundation, Inc.
 See the end for copying conditions.
 
+* Version 3.0.18 (unreleased)
+
+** certtool: Avoid a Y2K38 bug when generating certificates.
+Patch by Robert Millan.
+
+** API and ABI modifications:
+No changes since last version.
+
+
 * Version 3.0.17 (released 2012-03-17)
 
 ** command line apps: Always link with local libopts.
diff --git a/src/certtool.c b/src/certtool.c
index df23033..0c4ed9a 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -417,7 +417,7 @@ generate_certificate (gnutls_privkey_t * ret_key,
 
   result =
     gnutls_x509_crt_set_expiration_time (crt,
-                                         time (NULL) + days * 24 * 60 * 60);
+                                         time (NULL) + ((time_t) days) * 24 * 
60 * 60);
   if (result < 0)
     error (EXIT_FAILURE, 0, "set_expiration: %s", gnutls_strerror (result));
 
@@ -933,7 +933,7 @@ update_signed_certificate (common_info_st * cinfo)
   days = get_days ();
 
   result =
-    gnutls_x509_crt_set_expiration_time (crt, tim + days * 24 * 60 * 60);
+    gnutls_x509_crt_set_expiration_time (crt, tim + ((time_t) days) * 24 * 60 
* 60);
   if (result < 0)
     error (EXIT_FAILURE, 0, "set_expiration: %s", gnutls_strerror (result));
 


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]