[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_2_99_1-81-g4a03cf1
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_99_1-81-g4a03cf1 |
Date: |
Sun, 22 May 2011 18:18:48 +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=4a03cf1e69fb80859705a3652ddfe9646f00a58f
The branch, master has been updated
via 4a03cf1e69fb80859705a3652ddfe9646f00a58f (commit)
from b295a423e6e046c98ebb2a5c28c429e579c23e05 (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 4a03cf1e69fb80859705a3652ddfe9646f00a58f
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sun May 22 20:18:12 2011 +0200
Decode PEM ECC private keys.
-----------------------------------------------------------------------
Summary of changes:
lib/x509/privkey.c | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 060068f..d4cccdd 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -472,16 +472,25 @@ gnutls_x509_privkey_import (gnutls_x509_privkey_t key,
result =
_gnutls_fbase64_decode (PEM_KEY_DSA, data->data, data->size,
&out);
- if (result <= 0)
- {
- if (result == 0)
- result = GNUTLS_E_INTERNAL_ERROR;
- gnutls_assert ();
- goto failover;
- }
+ if (result >= 0)
+ key->pk_algorithm = GNUTLS_PK_DSA;
- key->pk_algorithm = GNUTLS_PK_DSA;
+ if (result == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
+ {
+ /* try for the second header */
+ result =
+ _gnutls_fbase64_decode (PEM_KEY_ECC, data->data, data->size,
+ &out);
+ if (result >= 0)
+ key->pk_algorithm = GNUTLS_PK_ECC;
+ }
+ }
+
+ if (result < 0)
+ {
+ gnutls_assert ();
+ goto failover;
}
_data.data = out;
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_99_1-81-g4a03cf1,
Nikos Mavrogiannopoulos <=