[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, gnutls_2_10_x, updated. gnutls_2_10_1-6-gb7328f
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, gnutls_2_10_x, updated. gnutls_2_10_1-6-gb7328f7 |
Date: |
Fri, 10 Sep 2010 13: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=b7328f7893cf950218819c955ac5a9e422bac827
The branch, gnutls_2_10_x has been updated
via b7328f7893cf950218819c955ac5a9e422bac827 (commit)
from 1dca51d7c333578957c5247e613198f232557158 (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 b7328f7893cf950218819c955ac5a9e422bac827
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Fri Sep 10 15:25:47 2010 +0200
Be liberal in the PEM decoding. That is spaces and tabs are being skipped.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 +++
lib/x509_b64.c | 12 ++++--------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index 36bcd3c..ae12a69 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ See the end for copying conditions.
* Version 2.10.2 (unreleased)
+** libgnutls: Is now more liberal in the PEM decoding. That is spaces and
+tabs are being skipped.
+
** libgnutls: Renamed NULL MAC to MAC-NULL to prevent clash with NULL
cipher. This prevented the usage of the TLS ciphersuites with NULL
cipher.
diff --git a/lib/x509_b64.c b/lib/x509_b64.c
index 767dbd8..c9bea30 100644
--- a/lib/x509_b64.c
+++ b/lib/x509_b64.c
@@ -414,7 +414,7 @@ cpydata (const uint8_t * data, int data_size, uint8_t **
result)
for (j = i = 0; i < data_size; i++)
{
- if (data[i] == '\n' || data[i] == '\r')
+ if (data[i] == '\n' || data[i] == '\r' || data[i] == ' ' || data[i] ==
'\t')
continue;
(*result)[j] = data[i];
j++;
@@ -427,15 +427,14 @@ cpydata (const uint8_t * data, int data_size, uint8_t **
result)
*
* The result_size is the return value
*/
-#define ENDSTR "-----\n"
-#define ENDSTR2 "-----\r"
+#define ENDSTR "-----"
int
_gnutls_fbase64_decode (const char *header, const opaque * data,
size_t data_size, uint8_t ** result)
{
int ret;
static const char top[] = "-----BEGIN ";
- static const char bottom[] = "\n-----END ";
+ static const char bottom[] = "-----END ";
uint8_t *rdata;
int rdata_size;
uint8_t *kdata;
@@ -463,13 +462,10 @@ _gnutls_fbase64_decode (const char *header, const opaque
* data,
return GNUTLS_E_BASE64_DECODING_ERROR;
}
- kdata = memmem (rdata, data_size, ENDSTR, sizeof (ENDSTR) - 1);
+ kdata = memmem (rdata+1, data_size-1, ENDSTR, sizeof (ENDSTR) - 1);
/* allow CR as well.
*/
if (kdata == NULL)
- kdata = memmem (rdata, data_size, ENDSTR2, sizeof (ENDSTR2) - 1);
-
- if (kdata == NULL)
{
gnutls_assert ();
_gnutls_x509_log ("Could not find '%s'\n", ENDSTR);
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, gnutls_2_10_x, updated. gnutls_2_10_1-6-gb7328f7,
Nikos Mavrogiannopoulos <=