gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_18-95-gaec3ba6


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_18-95-gaec3ba6
Date: Thu, 31 May 2012 07:16:46 +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=aec3ba6b7904d67d0e1a217bcbeaf6a7f04be0f7

The branch, master has been updated
       via  aec3ba6b7904d67d0e1a217bcbeaf6a7f04be0f7 (commit)
       via  ca40a6fe02654c519cf03d8ab3cbb1cf4b429b98 (commit)
      from  734be60f2d3118ea8d25d0d8579e75081d364292 (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 aec3ba6b7904d67d0e1a217bcbeaf6a7f04be0f7
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu May 31 09:16:25 2012 +0200

    documented behavior.

commit ca40a6fe02654c519cf03d8ab3cbb1cf4b429b98
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu May 31 09:16:16 2012 +0200

    Do not crash if password is null and GNUTLS_PKCS_PLAIN is not specified.

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

Summary of changes:
 lib/x509/privkey.c       |    5 +++--
 lib/x509/privkey_pkcs8.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 5f9496b..b777caa 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -421,8 +421,9 @@ error:
  * native #gnutls_x509_privkey_t format. The output will be stored in
  * @key .
  *
- * If the key is PEM encoded it should have a header of "RSA PRIVATE
- * KEY", or "DSA PRIVATE KEY".
+ * If the key is PEM encoded it should have a header that contains "PRIVATE
+ * KEY". Note that this function falls back to PKCS #8 decoding without
+ * password, if the default format fails to import.
  *
  * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
  *   negative error value.
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index dc0be38..b442956 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -1228,7 +1228,7 @@ gnutls_x509_privkey_import_pkcs8 (gnutls_x509_privkey_t 
key,
       need_free = 1;
     }
 
-  if (flags & GNUTLS_PKCS_PLAIN)
+  if (password == NULL || (flags & GNUTLS_PKCS_PLAIN))
     {
       result = decode_private_key_info (&_data, key);
     }


hooks/post-receive
-- 
GNU gnutls



reply via email to

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