* @author Christian Grothoff
*/
#include "platform.h"
-#include <gnunet/gnunet_util_lib.h>
+#include "gnunet_util_lib.h"
#include "gnunet_pq_lib.h"
}
+/**
+ * Generate query parameter for a string.
+ *
+ * @param ptr pointer to the string query parameter to pass
+ */
+struct GNUNET_PQ_QueryParam
+GNUNET_PQ_query_param_string (const char *ptr)
+{
+ return GNUNET_PQ_query_param_fixed_size (ptr, strlen (ptr));
+}
+
+
/**
* Function called to convert input argument into SQL parameters.
*
* @param scratch_length number of entries left in @a scratch
* @return -1 on error, number of offsets used in @a scratch otherwise
*/
-static int
+static int
qconv_rsa_public_key (void *cls,
const void *data,
size_t data_len,
void *scratch[],
unsigned int scratch_length)
{
- const struct GNUNET_CRYPTO_rsa_PublicKey *rsa = data;
+ const struct GNUNET_CRYPTO_RsaPublicKey *rsa = data;
char *buf;
size_t buf_size;
* @return array entry for the query parameters to use
*/
struct GNUNET_PQ_QueryParam
-GNUNET_PQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_rsa_PublicKey *x)
+GNUNET_PQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x)
{
struct GNUNET_PQ_QueryParam res =
{ &qconv_rsa_public_key, NULL, (x), 0, 1 };
void *scratch[],
unsigned int scratch_length)
{
- const struct GNUNET_CRYPTO_rsa_Signature *sig = data;
+ const struct GNUNET_CRYPTO_RsaSignature *sig = data;
char *buf;
size_t buf_size;
* @return array entry for the query parameters to use
*/
struct GNUNET_PQ_QueryParam
-GNUNET_PQ_query_param_rsa_signature (const struct GNUNET_CRYPTO_rsa_Signature *x)
+GNUNET_PQ_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x)
{
struct GNUNET_PQ_QueryParam res =
{ &qconv_rsa_signature, NULL, (x), 0, 1 };