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_2_9_9-22-gfd40036


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_9-22-gfd40036
Date: Thu, 03 Dec 2009 14:06:22 +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=fd400367276404ec74ffccdd003511f4d29e40c2

The branch, master has been updated
       via  fd400367276404ec74ffccdd003511f4d29e40c2 (commit)
      from  3591ec0b3fd5f44e00e5beda9191509cfd4aeac3 (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 fd400367276404ec74ffccdd003511f4d29e40c2
Author: Simon Josefsson <address@hidden>
Date:   Thu Dec 3 15:06:19 2009 +0100

    Check return value from gnutls_x509_crt_get_key_usage.

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

Summary of changes:
 lib/gnutls_cert.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c
index 6e5dcef..a303a07 100644
--- a/lib/gnutls_cert.c
+++ b/lib/gnutls_cert.c
@@ -874,7 +874,14 @@ _gnutls_x509_crt_to_gcert (gnutls_cert * gcert,
 
   if (flags & CERT_ONLY_EXTENSIONS || flags == 0)
     {
-      gnutls_x509_crt_get_key_usage (cert, &gcert->key_usage, NULL);
+      ret = gnutls_x509_crt_get_key_usage (cert, &gcert->key_usage, NULL);
+      if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
+       gcert->key_usage = 0;
+      else if (ret < 0)
+       {
+         gnutls_assert ();
+         return ret;
+       }
       gcert->version = gnutls_x509_crt_get_version (cert);
     }
   gcert->subject_pk_algorithm = gnutls_x509_crt_get_pk_algorithm (cert, NULL);


hooks/post-receive
-- 
GNU gnutls




reply via email to

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