gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (e9e57dcf5 -> 76714e1b3)


From: gnunet
Subject: [taler-exchange] branch master updated (e9e57dcf5 -> 76714e1b3)
Date: Thu, 18 Apr 2024 08:47:47 +0200

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

christian-blaettler pushed a change to branch master
in repository exchange.

    from e9e57dcf5 allow x-taler-bank with paht (fixes #8739)
     new 8fe81d1ce gitignore
     new b8ccad96c move query & result helpers to gnunet
     new 76714e1b3 bump gana

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                 |   2 +
 contrib/gana               |   2 +-
 src/include/taler_pq_lib.h |  25 ------
 src/pq/pq_query_helper.c   | 200 ---------------------------------------------
 src/pq/pq_result_helper.c  |   5 --
 5 files changed, 3 insertions(+), 231 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6bdf30ae5..bda987c5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,3 +171,5 @@ contrib/tos/conf.py
 contrib/pp/conf.py
 src/auditordb/test_auditordb_checkpoints-postgres
 src/auditordb/test_auditordb_checkpoints_postgres
+/.cache
+/compile_commands.json
diff --git a/contrib/gana b/contrib/gana
index 63ab2f3c9..41a6b138a 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 63ab2f3c99c86334cc433450d7b99375ebf9d6b1
+Subproject commit 41a6b138a8b62766749a34449ac18bf7cedf9639
diff --git a/src/include/taler_pq_lib.h b/src/include/taler_pq_lib.h
index 6fae8562a..f45de61d9 100644
--- a/src/include/taler_pq_lib.h
+++ b/src/include/taler_pq_lib.h
@@ -422,31 +422,6 @@ TALER_PQ_result_spec_array_amount (
   struct TALER_Amount **amounts);
 
 
-/**
- * Blind sign public key expected.
- *
- * @param name name of the field in the table
- * @param[out] public_key where to store the denomination signature
- * @return array entry for the result specification to use
- */
-struct GNUNET_PQ_ResultSpec
-TALER_PQ_result_spec_blind_sign_pub (
-  const char *name,
-  struct GNUNET_CRYPTO_BlindSignPublicKey *public_key);
-
-
-/**
- * Blind sign private key expected.
- *
- * @param name name of the field in the table
- * @param[out] private_key where to store the denomination signature
- * @return array entry for the result specification to use
- */
-struct GNUNET_PQ_ResultSpec
-TALER_PQ_result_spec_blind_sign_priv (
-  const char *name,
-  struct GNUNET_CRYPTO_BlindSignPrivateKey *private_key);
-
 #endif  /* TALER_PQ_LIB_H_ */
 
 /* end of include/taler_pq_lib.h */
diff --git a/src/pq/pq_query_helper.c b/src/pq/pq_query_helper.c
index d25b3223e..b1dfd4cf1 100644
--- a/src/pq/pq_query_helper.c
+++ b/src/pq/pq_query_helper.c
@@ -1336,204 +1336,4 @@ TALER_PQ_query_param_array_amount_with_currency (
 }
 
 
-/**
- * Function called to convert input argument into SQL parameters.
- *
- * @param cls closure
- * @param data pointer to input argument
- * @param data_len number of bytes in @a data (if applicable)
- * @param[out] param_values SQL data to set
- * @param[out] param_lengths SQL length data to set
- * @param[out] param_formats SQL format data to set
- * @param param_length number of entries available in the @a param_values, @a 
param_lengths and @a param_formats arrays
- * @param[out] scratch buffer for dynamic allocations (to be done via 
#GNUNET_malloc()
- * @param scratch_length number of entries left in @a scratch
- * @return -1 on error, number of offsets used in @a scratch otherwise
- */
-static int
-qconv_blind_sign_pub (void *cls,
-                      const void *data,
-                      size_t data_len,
-                      void *param_values[],
-                      int param_lengths[],
-                      int param_formats[],
-                      unsigned int param_length,
-                      void *scratch[],
-                      unsigned int scratch_length)
-{
-  const struct GNUNET_CRYPTO_BlindSignPublicKey *public_key = data;
-  size_t tlen;
-  size_t len;
-  uint32_t be;
-  char *buf;
-  void *tbuf;
-
-  (void) cls;
-  (void) data_len;
-  GNUNET_assert (1 == param_length);
-  GNUNET_assert (scratch_length > 0);
-  GNUNET_break (NULL == cls);
-  be = htonl ((uint32_t) public_key->cipher);
-  switch (public_key->cipher)
-  {
-  case GNUNET_CRYPTO_BSA_RSA:
-    tlen = GNUNET_CRYPTO_rsa_public_key_encode (
-      public_key->details.rsa_public_key,
-      &tbuf);
-    break;
-  case GNUNET_CRYPTO_BSA_CS:
-    tlen = sizeof (public_key->details.cs_public_key);
-    break;
-  default:
-    GNUNET_assert (0);
-  }
-  len = tlen + sizeof (be);
-  buf = GNUNET_malloc (len);
-  GNUNET_memcpy (buf,
-                 &be,
-                 sizeof (be));
-  switch (public_key->cipher)
-  {
-  case GNUNET_CRYPTO_BSA_RSA:
-    GNUNET_memcpy (&buf[sizeof (be)],
-                   tbuf,
-                   tlen);
-    GNUNET_free (tbuf);
-    break;
-  case GNUNET_CRYPTO_BSA_CS:
-    GNUNET_memcpy (&buf[sizeof (be)],
-                   &public_key->details.cs_public_key,
-                   tlen);
-    break;
-  default:
-    GNUNET_assert (0);
-  }
-
-  scratch[0] = buf;
-  param_values[0] = (void *) buf;
-  param_lengths[0] = len;
-  param_formats[0] = 1;
-  return 1;
-}
-
-
-/**
- * Generate query parameter for a blind sign public key of variable size.
- *
- * @param public_key pointer to the query parameter to pass
- */
-struct GNUNET_PQ_QueryParam
-TALER_PQ_query_param_blind_sign_pub (
-  const struct GNUNET_CRYPTO_BlindSignPublicKey *public_key)
-{
-  struct GNUNET_PQ_QueryParam res = {
-    .conv = &qconv_blind_sign_pub,
-    .data = public_key,
-    .num_params = 1
-  };
-
-  return res;
-}
-
-
-/**
- * Function called to convert input argument into SQL parameters.
- *
- * @param cls closure
- * @param data pointer to input argument
- * @param data_len number of bytes in @a data (if applicable)
- * @param[out] param_values SQL data to set
- * @param[out] param_lengths SQL length data to set
- * @param[out] param_formats SQL format data to set
- * @param param_length number of entries available in the @a param_values, @a 
param_lengths and @a param_formats arrays
- * @param[out] scratch buffer for dynamic allocations (to be done via 
#GNUNET_malloc()
- * @param scratch_length number of entries left in @a scratch
- * @return -1 on error, number of offsets used in @a scratch otherwise
- */
-static int
-qconv_blind_sign_priv (void *cls,
-                       const void *data,
-                       size_t data_len,
-                       void *param_values[],
-                       int param_lengths[],
-                       int param_formats[],
-                       unsigned int param_length,
-                       void *scratch[],
-                       unsigned int scratch_length)
-{
-  const struct GNUNET_CRYPTO_BlindSignPrivateKey *private_key = data;
-  size_t tlen;
-  size_t len;
-  uint32_t be;
-  char *buf;
-  void *tbuf;
-
-  (void) cls;
-  (void) data_len;
-  GNUNET_assert (1 == param_length);
-  GNUNET_assert (scratch_length > 0);
-  GNUNET_break (NULL == cls);
-  be = htonl ((uint32_t) private_key->cipher);
-  switch (private_key->cipher)
-  {
-  case GNUNET_CRYPTO_BSA_RSA:
-    tlen = GNUNET_CRYPTO_rsa_private_key_encode (
-      private_key->details.rsa_private_key,
-      &tbuf);
-    break;
-  case GNUNET_CRYPTO_BSA_CS:
-    tlen = sizeof (private_key->details.cs_private_key);
-    break;
-  default:
-    GNUNET_assert (0);
-  }
-  len = tlen + sizeof (be);
-  buf = GNUNET_malloc (len);
-  GNUNET_memcpy (buf,
-                 &be,
-                 sizeof (be));
-  switch (private_key->cipher)
-  {
-  case GNUNET_CRYPTO_BSA_RSA:
-    GNUNET_memcpy (&buf[sizeof (be)],
-                   tbuf,
-                   tlen);
-    GNUNET_free (tbuf);
-    break;
-  case GNUNET_CRYPTO_BSA_CS:
-    GNUNET_memcpy (&buf[sizeof (be)],
-                   &private_key->details.cs_private_key,
-                   tlen);
-    break;
-  default:
-    GNUNET_assert (0);
-  }
-
-  scratch[0] = buf;
-  param_values[0] = (void *) buf;
-  param_lengths[0] = len;
-  param_formats[0] = 1;
-  return 1;
-}
-
-
-/**
- * Generate query parameter for a blind sign private key of variable size.
- *
- * @param private_key pointer to the query parameter to pass
- */
-struct GNUNET_PQ_QueryParam
-TALER_PQ_query_param_blind_sign_priv (
-  const struct GNUNET_CRYPTO_BlindSignPrivateKey *private_key)
-{
-  struct GNUNET_PQ_QueryParam res = {
-    .conv = &qconv_blind_sign_priv,
-    .data = private_key,
-    .num_params = 1
-  };
-
-  return res;
-}
-
-
 /* end of pq/pq_query_helper.c */
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index e81c78302..384200cfb 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -1544,8 +1544,6 @@ TALER_PQ_result_spec_array_amount (
     .cls = info,
   };
   return res;
-
-
 }
 
 
@@ -1574,9 +1572,6 @@ TALER_PQ_result_spec_array_hash_code (
     .cls = info,
   };
   return res;
-
-
 }
 
-
 /* end of pq_result_helper.c */

-- 
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]