gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, gnutls_3_0_x, updated. gnutls_3_0_1-90-g2ab3849


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_3_0_x, updated. gnutls_3_0_1-90-g2ab3849
Date: Tue, 06 Sep 2011 14:27:44 +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=2ab3849694942780d9bb7e736ff09b47b410fcdf

The branch, gnutls_3_0_x has been updated
       via  2ab3849694942780d9bb7e736ff09b47b410fcdf (commit)
       via  3eb56adf2a2307368489fa8bc48f325e224da4e8 (commit)
      from  0f4a6959907369eb7f4c067a6dc50d37d1f91cc7 (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 2ab3849694942780d9bb7e736ff09b47b410fcdf
Merge: 0f4a695 3eb56ad
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Sep 6 16:27:50 2011 +0200

    Merge branch 'master' into gnutls_3_0_x

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

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

diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index 16c0cf8..b336795 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -1480,8 +1480,8 @@ gnutls_certificate_set_x509_trust_file 
(gnutls_certificate_credentials_t cred,
                                         gnutls_x509_crt_fmt_t type)
 {
   int ret;
+  gnutls_datum_t cas;
   size_t size;
-  char *data;
 
 #ifdef ENABLE_PKCS11
   if (strncmp (cafile, "pkcs11:", 7) == 0)
@@ -1490,19 +1490,18 @@ gnutls_certificate_set_x509_trust_file 
(gnutls_certificate_credentials_t cred,
     }
 #endif
 
-  data = read_binary_file (cafile, &size);
-  if (data == NULL)
+  cas.data = read_binary_file (cafile, &size);
+  if (cas.data == NULL)
     {
       gnutls_assert ();
       return GNUTLS_E_FILE_ERROR;
     }
 
-  if (type == GNUTLS_X509_FMT_DER)
-    ret = parse_der_ca_mem (cred, data, size);
-  else
-    ret = parse_pem_ca_mem (cred, data, size);
+  cas.size = size;
 
-  free (data);
+  ret = gnutls_certificate_set_x509_trust_mem(cred, &cas, type);
+
+  free (cas.data);
 
   if (ret < 0)
     {


hooks/post-receive
-- 
GNU gnutls



reply via email to

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