aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2021-12-03 16:16:19 +0100
committerChristian Grothoff <grothoff@gnunet.org>2021-12-03 16:16:19 +0100
commitec45eaae1826cc607472b0e61da1bb940534eea4 (patch)
treed4af1b066958e26c40d30331184a15979ab8761b
parentdfe245814ce868073f26b6ad5f05a24b9d99c7b4 (diff)
more logging
-rw-r--r--src/util/crypto_helper_rsa.c18
-rw-r--r--src/util/taler-exchange-secmod-rsa.c5
2 files changed, 22 insertions, 1 deletions
diff --git a/src/util/crypto_helper_rsa.c b/src/util/crypto_helper_rsa.c
index 85741d5e5..3138ebf3e 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 43109b5a4..3b06a56ed 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;
}