[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_3_0_2-16-g3eb56ad
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_3_0_2-16-g3eb56ad |
Date: |
Tue, 06 Sep 2011 14:27:34 +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=3eb56adf2a2307368489fa8bc48f325e224da4e8
The branch, master has been updated
via 3eb56adf2a2307368489fa8bc48f325e224da4e8 (commit)
from b40785d940c460680347a886aabe6adace6b0861 (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 3eb56adf2a2307368489fa8bc48f325e224da4e8
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Tue Sep 6 16:27:29 2011 +0200
simplified gnutls_certificate_set_x509_trust_file. It uses
gnutls_certificate_set_x509_trust_mem.
-----------------------------------------------------------------------
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_3_0_2-16-g3eb56ad,
Nikos Mavrogiannopoulos <=