gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, new, updated. gnutls_2_9_10-142-gca6a4d2


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, new, updated. gnutls_2_9_10-142-gca6a4d2
Date: Sat, 29 May 2010 00:14:18 +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=ca6a4d2da3bb615fa3c0b8d42509009d14869895

The branch, new has been updated
       via  ca6a4d2da3bb615fa3c0b8d42509009d14869895 (commit)
      from  028401136e9dbd6ac5ea294765bd07e01adc31b1 (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 ca6a4d2da3bb615fa3c0b8d42509009d14869895
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat May 29 02:14:07 2010 +0200

    Corrected certificate callback.

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

Summary of changes:
 src/cli.c |   69 ++++++++++++++++++++++++++++++-------------------------------
 1 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/src/cli.c b/src/cli.c
index fd9a4e0..1c3f64c 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -430,7 +430,7 @@ cert_callback (gnutls_session_t session,
       gnutls_sign_algorithm_t cert_algo, req_algo;
       int i, match = 0;
 
-      if (x509_crt[0] != NULL)
+      if (x509_crt_size > 0)
        {
          ret = gnutls_x509_crt_get_signature_algorithm (x509_crt[0]);
          if (ret < 0)
@@ -467,26 +467,23 @@ cert_callback (gnutls_session_t session,
                ("- Could not find a suitable certificate to send to server\n");
              return -1;
            }
-       }
 
-      if (x509_key != NULL)
-       {
-         st->key.x509 = x509_key;
-         st->key_type = GNUTLS_PRIVKEY_X509;
-       }
-      else if (pkcs11_key != NULL)
-       {
-         st->key.pkcs11 = pkcs11_key;
-         st->key_type = GNUTLS_PRIVKEY_PKCS11;
-       }
-      else
-       {
-         printf ("- Could not find a suitable key to send to server\n");
-         return -1;
-       }
+          if (x509_key != NULL)
+            {
+             st->key.x509 = x509_key;
+             st->key_type = GNUTLS_PRIVKEY_X509;
+            }
+          else if (pkcs11_key != NULL)
+            {
+              st->key.pkcs11 = pkcs11_key;
+              st->key_type = GNUTLS_PRIVKEY_PKCS11;
+            }
+          else
+            {
+              printf ("- Could not find a suitable key to send to server\n");
+              return -1;
+            }
 
-      if (x509_crt != NULL)
-       {
          st->ncerts = x509_crt_size;
 
          st->cert.x509 = x509_crt;
@@ -495,27 +492,29 @@ cert_callback (gnutls_session_t session,
 
          return 0;
        }
+
     }
   else if (st->cert_type == GNUTLS_CRT_OPENPGP)
     {
-      if (pgp_key != NULL)
-       {
-         st->key.pgp = pgp_key;
-         st->key_type = GNUTLS_PRIVKEY_OPENPGP;
-       }
-      else if (pkcs11_key != NULL)
-       {
-         st->key.pkcs11 = pkcs11_key;
-         st->key_type = GNUTLS_PRIVKEY_PKCS11;
-       }
-      else
-       {
-         printf ("- Could not find a suitable key to send to server\n");
-         return -1;
-       }
-
       if (pgp_crt != NULL)
        {
+
+          if (pgp_key != NULL)
+            {
+              st->key.pgp = pgp_key;
+              st->key_type = GNUTLS_PRIVKEY_OPENPGP;
+            }
+          else if (pkcs11_key != NULL)
+            {
+              st->key.pkcs11 = pkcs11_key;
+              st->key_type = GNUTLS_PRIVKEY_PKCS11;
+            }
+          else
+            {
+              printf ("- Could not find a suitable key to send to server\n");
+              return -1;
+            }
+
          st->ncerts = 1;
 
          st->cert.pgp = pgp_crt;


hooks/post-receive
-- 
GNU gnutls



reply via email to

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