[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnutls-dev] GnuTLS 2.0.0
From: |
Ludovic Courtès |
Subject: |
Re: [gnutls-dev] GnuTLS 2.0.0 |
Date: |
Tue, 04 Sep 2007 14:28:55 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
Simon Josefsson <address@hidden> writes:
> We are pleased to announce a new stable GnuTLS release: Version 2.0.0.
I am "pleased" to report the first bug. ;-)
"make check" was failing on `x509-certificates.scm' because
`x509-certificate-dn-oid' was returning a bogus string. The issue is
that Guile bindings were assuming that `gnutls_x509_crt_get_dn_oid ()'
returned a null-terminated string, which is apparently not the case (we
should improve the documentation in that respect).
I'm surprised we did not catch it earlier, though.
Thanks,
Ludovic.
>From 207673f1346dc53702b20b23d93e305ada6cbcdd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ludovic=20Court=C3=A8s?= <address@hidden>
Date: Tue, 4 Sep 2007 14:27:40 +0200
Subject: [PATCH] Guile: Fix `x509-certificate-dn-oid' and related functions.
* guile/src/core.c (X509_CERTIFICATE_DN_OID_FUNCTION_BODY): Use
`scm_take_locale_stringn ()' instead of `scm_take_locale_string ()'.
* NEWS: Update.
---
NEWS | 4 ++++
guile/src/core.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/NEWS b/NEWS
index a5520f8..6dbe488 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,10 @@ Copyright (C) 2004, 2005, 2006, 2007 Simon Josefsson
Copyright (C) 2000, 2001, 2002, 2003, 2004 Nikos Mavroyanopoulos
See the end for copying conditions.
+* Version 2.0.1 (unreleased)
+
+** Guile: Fix `x509-certificate-dn-oid'
+
* Version 2.0.0 (released 2007-09-04)
** Included copy of Libtasn1 upgraded to version 1.1.
diff --git a/guile/src/core.c b/guile/src/core.c
index dc27d23..217cced 100644
--- a/guile/src/core.c
+++ b/guile/src/core.c
@@ -2380,7 +2380,8 @@ SCM_DEFINE (scm_gnutls_x509_certificate_issuer_dn,
if (c_oid_actual_len < c_oid_len)
\
c_oid = scm_realloc (c_oid, c_oid_actual_len); \
\
- result = scm_take_locale_string (c_oid); \
+ result = scm_take_locale_stringn (c_oid, \
+ c_oid_actual_len); \
} \
\
return result;
--
1.5.2.4