gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: more logging


From: gnunet
Subject: [taler-exchange] branch master updated: more logging
Date: Fri, 03 Dec 2021 16:16:23 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new ec45eaae more logging
ec45eaae is described below

commit ec45eaae1826cc607472b0e61da1bb940534eea4
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Fri Dec 3 16:16:19 2021 +0100

    more logging
---
 src/util/crypto_helper_rsa.c         | 18 +++++++++++++++++-
 src/util/taler-exchange-secmod-rsa.c |  5 +++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/util/crypto_helper_rsa.c b/src/util/crypto_helper_rsa.c
index 85741d5e..3138ebf3 100644
--- a/src/util/crypto_helper_rsa.c
+++ b/src/util/crypto_helper_rsa.c
@@ -83,6 +83,8 @@ try_connect (struct TALER_CRYPTO_RsaDenominationHelper *dh)
 {
   if (-1 != dh->sock)
     return GNUNET_OK;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Establishing connection!\n");
   dh->sock = socket (AF_UNIX,
                      SOCK_STREAM,
                      0);
@@ -103,6 +105,7 @@ try_connect (struct TALER_CRYPTO_RsaDenominationHelper *dh)
     do_disconnect (dh);
     return GNUNET_SYSERR;
   }
+  TALER_CRYPTO_helper_rsa_poll (dh);
   return GNUNET_OK;
 }
 
@@ -153,7 +156,6 @@ TALER_CRYPTO_helper_rsa_connect (
     TALER_CRYPTO_helper_rsa_disconnect (dh);
     return NULL;
   }
-  TALER_CRYPTO_helper_rsa_poll (dh);
   return dh;
 }
 
@@ -397,6 +399,8 @@ TALER_CRYPTO_helper_rsa_sign (
     .cipher = TALER_DENOMINATION_INVALID
   };
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Starting signature process\n");
   if (GNUNET_OK !=
       try_connect (dh))
   {
@@ -406,6 +410,8 @@ TALER_CRYPTO_helper_rsa_sign (
     return ds;
   }
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Requesting signature\n");
   {
     char buf[sizeof (struct TALER_CRYPTO_SignRequest) + msg_size];
     struct TALER_CRYPTO_SignRequest *sr
@@ -431,6 +437,8 @@ TALER_CRYPTO_helper_rsa_sign (
     }
   }
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Awaiting reply\n");
   {
     char buf[UINT16_MAX];
     size_t off = 0;
@@ -512,6 +520,8 @@ more:
             *ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG;
             goto end;
           }
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                      "Received signature\n");
           *ec = TALER_EC_NONE;
           finished = true;
           ds.cipher = TALER_DENOMINATION_RSA;
@@ -531,10 +541,14 @@ more:
             (const struct TALER_CRYPTO_SignFailure *) buf;
 
           *ec = (enum TALER_ErrorCode) ntohl (sf->ec);
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                      "Signing failed!\n");
           finished = true;
           break;
         }
       case TALER_HELPER_RSA_MT_AVAIL:
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                    "Received new key!\n");
         if (GNUNET_OK !=
             handle_mt_avail (dh,
                              hdr))
@@ -546,6 +560,8 @@ more:
         }
         break; /* while(1) loop ensures we recvfrom() again */
       case TALER_HELPER_RSA_MT_PURGE:
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                    "Received revocation!\n");
         if (GNUNET_OK !=
             handle_mt_purge (dh,
                              hdr))
diff --git a/src/util/taler-exchange-secmod-rsa.c 
b/src/util/taler-exchange-secmod-rsa.c
index 43109b5a..3b06a56e 100644
--- a/src/util/taler-exchange-secmod-rsa.c
+++ b/src/util/taler-exchange-secmod-rsa.c
@@ -388,6 +388,11 @@ handle_sign_request (struct TES_Client *client,
                   GNUNET_YES));
     ret = TES_transmit (client->csock,
                         &sr->header);
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Sent RSA signature after %s\n",
+                GNUNET_STRINGS_relative_time_to_string (
+                  GNUNET_TIME_absolute_get_duration (now),
+                  GNUNET_YES));
     GNUNET_free (sr);
     return ret;
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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