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

"Nikos Mavrogiannopoulos" <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gnutls.cvs
Message-ID <[email protected]>
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 <[email protected]>
Date:   Thu May 31 09:16:25 2012 +0200

    documented behavior.

commit ca40a6fe02654c519cf03d8ab3cbb1cf4b429b98
Author: Nikos Mavrogiannopoulos <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.