fix libgnunetpq for RSA encoding
authorChristian Grothoff <christian@grothoff.org>
Sat, 7 Dec 2019 14:06:54 +0000 (15:06 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sat, 7 Dec 2019 14:06:54 +0000 (15:06 +0100)
src/pq/pq_query_helper.c
src/util/crypto_rsa.c

index 3bc84082da97c2ed16f6392c4972fdf55d2c037f..34de97eb34211ecef02071c11162d13784a5c9a0 100644 (file)
@@ -304,7 +304,7 @@ qconv_rsa_public_key (void *cls,
                                                   &buf);
   scratch[0] = buf;
   param_values[0] = (void *) buf;
-  param_lengths[0] = buf_size - 1; /* DB doesn't like the trailing \0 */
+  param_lengths[0] = buf_size;
   param_formats[0] = 1;
   return 1;
 }
index 2ac4fcf8a02deb9af1c5cc214a0a9e5a3e863199..5bea87793ab2e253d3755e20ce8a523ee3a2d694 100644 (file)
@@ -356,7 +356,6 @@ GNUNET_CRYPTO_rsa_public_key_encode (const struct
   struct GNUNET_CRYPTO_RsaPublicKeyHeaderP hdr;
   int ret;
 
-/* SEE #5398 / #5968 */
   ret = key_from_sexp (ne, key->sexp, "public-key", "ne");
   if (0 != ret)
     ret = key_from_sexp (ne, key->sexp, "rsa", "ne");
@@ -366,7 +365,6 @@ GNUNET_CRYPTO_rsa_public_key_encode (const struct
     *buffer = NULL;
     return 0;
   }
-
   gcry_mpi_print (GCRYMPI_FMT_USG,
                   NULL,
                   0,