[SCM] GNU gnutls branch, master, updated. gnutls_3_0_18-188-ged3f249

"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=ed3f249f2ac05465b6adaab68c67a1d4c396ef61

The branch, master has been updated
       via  ed3f249f2ac05465b6adaab68c67a1d4c396ef61 (commit)
       via  b3537a1c27b39e742dc68ff55d7e823165543331 (commit)
      from  2277e84484253cefb44b922d31f922971760a0e3 (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 ed3f249f2ac05465b6adaab68c67a1d4c396ef61
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Mon Jul 2 19:50:03 2012 +0200

    gnutls_x509_privkey_import_openssl() works only with PEM files.

commit b3537a1c27b39e742dc68ff55d7e823165543331
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Mon Jul 2 19:48:35 2012 +0200

    comment put in context

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

Summary of changes:
 lib/includes/gnutls/x509.h |    2 +-
 lib/x509/privkey.c         |    2 +-
 lib/x509/privkey_openssl.c |    8 +++-----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h
index a1947ff..5923aca 100644
--- a/lib/includes/gnutls/x509.h
+++ b/lib/includes/gnutls/x509.h
@@ -719,7 +719,7 @@ extern "C"
                                         const char *password,
                                         unsigned int flags);
   int gnutls_x509_privkey_import_openssl (gnutls_x509_privkey_t key,
-                                          const gnutls_datum_t *data, gnutls_x509_crt_fmt_t format, 
+                                          const gnutls_datum_t *data, 
                                           const char* password);
 
   int gnutls_x509_privkey_import2 (gnutls_x509_privkey_t key,
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 8c68ef2..26e1332 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -608,7 +608,7 @@ gnutls_x509_privkey_import2 (gnutls_x509_privkey_t key,
           if (format == GNUTLS_X509_FMT_PEM)
             {
               int err;
-              err = gnutls_x509_privkey_import_openssl(key, data, format, password);
+              err = gnutls_x509_privkey_import_openssl(key, data, password);
               if (err < 0)
                 {
                   if (err == GNUTLS_E_DECRYPTION_FAILED) ret = err;
diff --git a/lib/x509/privkey_openssl.c b/lib/x509/privkey_openssl.c
index 7db3cdd..6ef1410 100644
--- a/lib/x509/privkey_openssl.c
+++ b/lib/x509/privkey_openssl.c
@@ -105,7 +105,6 @@ static const struct pem_cipher {
  * gnutls_x509_privkey_import_openssl:
  * @key: The structure to store the parsed key
  * @data: The DER or PEM encoded key.
- * @format: Only PEM is supported
  * @password: the password to decrypt the key (if it is encrypted).
  *
  * This function will convert the given PEM encrypted to 
@@ -122,7 +121,7 @@ static const struct pem_cipher {
  **/
 int
 gnutls_x509_privkey_import_openssl (gnutls_x509_privkey_t key,
-                                    const gnutls_datum_t *data, gnutls_x509_crt_fmt_t format, const char* password)
+                                    const gnutls_datum_t *data, const char* password)
 {
   gnutls_cipher_hd_t handle;
   gnutls_cipher_algorithm_t cipher = GNUTLS_CIPHER_UNKNOWN;
@@ -264,9 +263,8 @@ gnutls_x509_privkey_import_openssl (gnutls_x509_privkey_t key,
           goto out;
         }
 
-      /* We have to strip any padding for GnuTLS to accept it.
-         So a bit more ASN.1 parsing for us.
-         FIXME: Consolidate with similar code in gnutls_tpm.c */
+      /* We have to strip any padding to accept it.
+         So a bit more ASN.1 parsing for us.*/
       if (key_data[0] == 0x30)
         {
           gnutls_datum_t key_datum;


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.