functions to extract result values More...
#include "platform.h"
#include "gnunet_time_lib.h"
#include "gnunet_common.h"
#include "gnunet_util_lib.h"
#include "gnunet_pq_lib.h"
#include "pq.h"
Go to the source code of this file.
Data Structures | |
struct | array_result_cls |
Closure for the array result specifications. More... | |
Macros | |
#define | FAIL_IF(cond) |
#define | HANDLE_ELEMENT(typ, conv, access) |
#define | HANDLE_ARRAY(typ, conv, access) |
#define | DEREF(typ, conv) *(typ *) out = conv (*(typ *) in) |
#define | ACCESS_ABS(typ, conv) ((typ *) out)->abs_value_us = conv (*(uint64_t *) in) |
#define | ACCESS_REL(typ, conv) ((typ *) out)->rel_value_us = conv (*(uint64_t *) in) |
#define | ACCESS_TSTMP(typ, conv) ((typ *) out)->abs_time.abs_value_us = conv (*(uint64_t *) in) |
Functions | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_allow_null (struct GNUNET_PQ_ResultSpec rs, bool *is_null) |
Allow NULL value to be found in the database for the given value. | |
static void | clean_varsize_blob (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
static enum GNUNET_GenericReturnValue | extract_varsize_blob (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_variable_size (const char *name, void **dst, size_t *sptr) |
Variable-size result expected. | |
static enum GNUNET_GenericReturnValue | extract_fixed_blob (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_fixed_size (const char *name, void *dst, size_t dst_size) |
Fixed-size result expected. | |
static enum GNUNET_GenericReturnValue | extract_rsa_public_key (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_rsa_public_key (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_rsa_public_key (const char *name, struct GNUNET_CRYPTO_RsaPublicKey **rsa) |
RSA public key expected. | |
static enum GNUNET_GenericReturnValue | extract_rsa_signature (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_rsa_signature (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_rsa_signature (const char *name, struct GNUNET_CRYPTO_RsaSignature **sig) |
RSA signature expected. | |
static enum GNUNET_GenericReturnValue | extract_string (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_string (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_string (const char *name, char **dst) |
0-terminated string expected. | |
static enum GNUNET_GenericReturnValue | extract_bool (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_bool (const char *name, bool *dst) |
boolean expected. | |
static enum GNUNET_GenericReturnValue | extract_rel_time (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_relative_time (const char *name, struct GNUNET_TIME_Relative *rt) |
Relative time expected. | |
static enum GNUNET_GenericReturnValue | extract_abs_time (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_absolute_time (const char *name, struct GNUNET_TIME_Absolute *at) |
Absolute time expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_absolute_time_nbo (const char *name, struct GNUNET_TIME_AbsoluteNBO *at) |
Absolute time expected. | |
static enum GNUNET_GenericReturnValue | extract_timestamp (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_timestamp (const char *name, struct GNUNET_TIME_Timestamp *at) |
Timestamp expected. | |
static enum GNUNET_GenericReturnValue | extract_timestamp_nbo (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_timestamp_nbo (const char *name, struct GNUNET_TIME_TimestampNBO *at) |
Timestamp expected. | |
static enum GNUNET_GenericReturnValue | extract_uint16 (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_uint16 (const char *name, uint16_t *u16) |
uint16_t expected. | |
static enum GNUNET_GenericReturnValue | extract_uint32 (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_uint32 (const char *name, uint32_t *u32) |
uint32_t expected. | |
static enum GNUNET_GenericReturnValue | extract_uint64 (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_uint64 (const char *name, uint64_t *u64) |
uint64_t expected. | |
static enum GNUNET_GenericReturnValue | extract_int64 (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_int64 (const char *name, int64_t *i64) |
int64_t expected. | |
static enum GNUNET_GenericReturnValue | extract_array_generic (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result as array of a specific type from row row. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_allow_nulls (struct GNUNET_PQ_ResultSpec rs, bool **is_nulls) |
Allow NULL values in an array to be found in the database for the given value. | |
static void | array_cleanup (void *cls, void *rd) |
Cleanup of the data and closure of an array spec. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_bool (struct GNUNET_PQ_Context *db, const char *name, size_t *num, bool **dst) |
array of bool expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_uint16 (struct GNUNET_PQ_Context *db, const char *name, size_t *num, uint16_t **dst) |
array of uint16_t expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_uint32 (struct GNUNET_PQ_Context *db, const char *name, size_t *num, uint32_t **dst) |
array of uint32_t expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_uint64 (struct GNUNET_PQ_Context *db, const char *name, size_t *num, uint64_t **dst) |
array of uint64_t expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_abs_time (struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct GNUNET_TIME_Absolute **dst) |
array of absolute time expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_rel_time (struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct GNUNET_TIME_Relative **dst) |
array of relative time expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_timestamp (struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct GNUNET_TIME_Timestamp **dst) |
array of relative time expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_variable_size (struct GNUNET_PQ_Context *db, const char *name, size_t *num, size_t **sizes, void **dst) |
Array of variable-size result expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_fixed_size (struct GNUNET_PQ_Context *db, const char *name, size_t size, size_t *num, void **dst) |
Array of fixed-size result expected. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_array_string (struct GNUNET_PQ_Context *db, const char *name, size_t *num, char **dst) |
Array of 0-terminated strings expected. | |
static enum GNUNET_GenericReturnValue | extract_blind_sign_pub (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_blind_sign_pub (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_blind_sign_pub (const char *name, struct GNUNET_CRYPTO_BlindSignPublicKey **pub) |
Blind sign public key expected. | |
static enum GNUNET_GenericReturnValue | extract_blind_sign_priv (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_blind_sign_priv (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_blind_sign_priv (const char *name, struct GNUNET_CRYPTO_BlindSignPrivateKey **priv) |
Blind sign private key expected. | |
static enum GNUNET_GenericReturnValue | extract_blinded_sig (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_blinded_sig (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_blinded_sig (const char *name, struct GNUNET_CRYPTO_BlindedSignature **b_sig) |
Blinded signature expected. | |
static enum GNUNET_GenericReturnValue | extract_unblinded_sig (void *cls, PGresult *result, int row, const char *fname, size_t *dst_size, void *dst) |
Extract data from a Postgres database result at row row. | |
static void | clean_unblinded_sig (void *cls, void *rd) |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter. | |
struct GNUNET_PQ_ResultSpec | GNUNET_PQ_result_spec_unblinded_sig (const char *name, struct GNUNET_CRYPTO_UnblindedSignature **ub_sig) |
Unblinded signature expected. | |
functions to extract result values
Definition in file pq_result_helper.c.
#define FAIL_IF | ( | cond | ) |
#define HANDLE_ELEMENT | ( | typ, | |
conv, | |||
access | |||
) |
#define HANDLE_ARRAY | ( | typ, | |
conv, | |||
access | |||
) |
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_allow_null | ( | struct GNUNET_PQ_ResultSpec | rs, |
bool * | is_null | ||
) |
Allow NULL value to be found in the database for the given value.
rs | result spec entry to modify | |
[out] | is_null | location set to 'true' if the value was indeed NULL, set to 'false' if the value was non-NULL |
Definition at line 34 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::is_null, and GNUNET_PQ_ResultSpec::is_nullable.
Referenced by handle_results().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 54 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_free, and rd.
Referenced by GNUNET_PQ_result_spec_variable_size().
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 82 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_break, GNUNET_malloc, GNUNET_memcpy, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_variable_size().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_variable_size | ( | const char * | name, |
void ** | dst, | ||
size_t * | sptr | ||
) |
Variable-size result expected.
name | name of the field in the table | |
[out] | dst | where to store the result, allocated |
[out] | sptr | where to store the size of dst |
Definition at line 129 of file pq_result_helper.c.
References clean_varsize_blob(), GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst, extract_varsize_blob(), name, and res.
Referenced by extract_result_cb(), handle_results(), namecache_postgres_lookup_block(), parse_result_call_iterator(), and process_result().
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in] | dst_size | desired size, never NULL |
[out] | dst | where to store the result |
Definition at line 159 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_break, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_memcpy, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_fixed_size().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_fixed_size | ( | const char * | name, |
void * | dst, | ||
size_t | dst_size | ||
) |
Fixed-size result expected.
name | name of the field in the table | |
[out] | dst | where to store the result |
dst_size | number of bytes in dst |
Definition at line 212 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, extract_fixed_blob(), GNUNET_PQ_ResultSpec::fname, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 241 of file pq_result_helper.c.
References GNUNET_break, GNUNET_CRYPTO_rsa_public_key_decode(), GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, pk, res, and result.
Referenced by GNUNET_PQ_result_spec_rsa_public_key().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 294 of file pq_result_helper.c.
References GNUNET_CRYPTO_rsa_public_key_free(), pk, and rd.
Referenced by GNUNET_PQ_result_spec_rsa_public_key().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_rsa_public_key | ( | const char * | name, |
struct GNUNET_CRYPTO_RsaPublicKey ** | rsa | ||
) |
RSA public key expected.
name | name of the field in the table | |
[out] | rsa | where to store the result |
Definition at line 309 of file pq_result_helper.c.
References clean_rsa_public_key(), GNUNET_PQ_ResultSpec::conv, extract_rsa_public_key(), GNUNET_PQ_ResultSpec::fname, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 337 of file pq_result_helper.c.
References GNUNET_break, GNUNET_CRYPTO_rsa_signature_decode(), GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_rsa_signature().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 389 of file pq_result_helper.c.
References GNUNET_CRYPTO_rsa_signature_free(), and rd.
Referenced by GNUNET_PQ_result_spec_rsa_signature().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_rsa_signature | ( | const char * | name, |
struct GNUNET_CRYPTO_RsaSignature ** | sig | ||
) |
RSA signature expected.
name | name of the field in the table | |
[out] | sig | where to store the result; |
Definition at line 404 of file pq_result_helper.c.
References clean_rsa_signature(), GNUNET_PQ_ResultSpec::conv, extract_rsa_signature(), GNUNET_PQ_ResultSpec::fname, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 432 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::fname, GNUNET_break, GNUNET_NO, GNUNET_OK, GNUNET_strndup, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_string().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 484 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_free, and rd.
Referenced by GNUNET_PQ_result_spec_string().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_string | ( | const char * | name, |
char ** | dst | ||
) |
0-terminated string expected.
name | name of the field in the table | |
[out] | dst | where to store the result, allocated |
Definition at line 499 of file pq_result_helper.c.
References clean_string(), GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst, extract_string(), GNUNET_PQ_ResultSpec::fname, name, and res.
Referenced by check_patch_applied(), and parse_result_call_iterator().
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 527 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::fname, GNUNET_break, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_bool().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_bool | ( | const char * | name, |
bool * | dst | ||
) |
boolean expected.
name | name of the field in the table | |
[out] | dst | where to store the result |
Definition at line 570 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst, extract_bool(), GNUNET_PQ_ResultSpec::fname, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 597 of file pq_result_helper.c.
References GNUNET_assert, GNUNET_break, GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_SYSERR, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_TIME_Relative::rel_value_us, res, and result.
Referenced by GNUNET_PQ_result_spec_relative_time().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_relative_time | ( | const char * | name, |
struct GNUNET_TIME_Relative * | rt | ||
) |
Relative time expected.
name | name of the field in the table | |
[out] | rt | where to store the result |
Definition at line 646 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_rel_time(), name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 674 of file pq_result_helper.c.
References GNUNET_TIME_Absolute::abs_value_us, GNUNET_assert, GNUNET_break, GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_SYSERR, GNUNET_TIME_UNIT_FOREVER_ABS, res, and result.
Referenced by GNUNET_PQ_result_spec_absolute_time().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_absolute_time | ( | const char * | name, |
struct GNUNET_TIME_Absolute * | at | ||
) |
Absolute time expected.
name | name of the field in the table | |
[out] | at | where to store the result |
Definition at line 723 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_abs_time(), name, and res.
Referenced by extract_result_cb(), handle_results(), and process_result().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_absolute_time_nbo | ( | const char * | name, |
struct GNUNET_TIME_AbsoluteNBO * | at | ||
) |
Absolute time expected.
name | name of the field in the table | |
[out] | at | where to store the result |
Definition at line 738 of file pq_result_helper.c.
References GNUNET_PQ_result_spec_auto_from_type, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 763 of file pq_result_helper.c.
References GNUNET_TIME_Timestamp::abs_time, GNUNET_TIME_Absolute::abs_value_us, GNUNET_assert, GNUNET_break, GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_SYSERR, GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_SECONDS, res, and result.
Referenced by extract_timestamp_nbo(), and GNUNET_PQ_result_spec_timestamp().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_timestamp | ( | const char * | name, |
struct GNUNET_TIME_Timestamp * | t | ||
) |
Timestamp expected.
name | name of the field in the table | |
[out] | t | where to store the result |
Definition at line 824 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_timestamp(), name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 852 of file pq_result_helper.c.
References extract_timestamp(), GNUNET_OK, GNUNET_TIME_timestamp_hton(), result, and t.
Referenced by GNUNET_PQ_result_spec_timestamp_nbo().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_timestamp_nbo | ( | const char * | name, |
struct GNUNET_TIME_TimestampNBO * | tn | ||
) |
Timestamp expected.
name | name of the field in the table | |
[out] | tn | where to store the result |
Definition at line 877 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_timestamp_nbo(), name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 905 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_break, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_uint16().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_uint16 | ( | const char * | name, |
uint16_t * | u16 | ||
) |
uint16_t expected.
name | name of the field in the table | |
[out] | u16 | where to store the result |
Definition at line 951 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_uint16(), name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 979 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_break, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_uint32().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_uint32 | ( | const char * | name, |
uint32_t * | u32 | ||
) |
uint32_t expected.
name | name of the field in the table | |
[out] | u32 | where to store the result |
Definition at line 1025 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_uint32(), name, and res.
Referenced by extract_result_cb(), GNUNET_PQ_get_oid_by_name(), handle_results(), parse_result_call_iterator(), postgres_plugin_del(), and process_result().
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 1053 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_break, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_uint64().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_uint64 | ( | const char * | name, |
uint64_t * | u64 | ||
) |
uint64_t expected.
name | name of the field in the table | |
[out] | u64 | where to store the result |
Definition at line 1109 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_uint64(), name, and res.
Referenced by parse_result_call_iterator(), postgres_plugin_del(), postgres_plugin_estimate_size(), and process_result().
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 1137 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::dst, GNUNET_PQ_ResultSpec::dst_size, GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_break, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_SYSERR, res, and result.
Referenced by GNUNET_PQ_result_spec_int64().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_int64 | ( | const char * | name, |
int64_t * | i64 | ||
) |
int64_t expected.
name | name of the field in the table | |
[out] | i64 | where to store the result |
Definition at line 1193 of file pq_result_helper.c.
References GNUNET_PQ_ResultSpec::conv, GNUNET_PQ_ResultSpec::dst_size, extract_int64(), name, and res.
|
static |
Extract data from a Postgres database result as array of a specific type from row row.
The type information and optionally additional out-parameters are given in cls which is of type array_result_cls.
cls | closure of type array_result_cls | |
result | where to extract data from | |
row | row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 1255 of file pq_result_helper.c.
References ACCESS_ABS, ACCESS_REL, ACCESS_TSTMP, array_of_abs_time, array_of_bool, array_of_byte, array_of_rel_time, array_of_string, array_of_timestamp, array_of_uint16, array_of_uint32, array_of_uint64, data, DEREF, pq_array_header::dim, FAIL, FAIL_IF, GNUNET_assert, GNUNET_free, GNUNET_malloc, GNUNET_memcpy, GNUNET_new_array, GNUNET_ntohll(), GNUNET_OK, GNUNET_SYSERR, h, HANDLE_ARRAY, pq_array_header::has_nulls, info, INT_MAX, pq_array_header::lbound, ndim, pq_array_header::ndim, pq_array_header::oid, and result.
Referenced by GNUNET_PQ_result_spec_array_abs_time(), GNUNET_PQ_result_spec_array_allow_nulls(), GNUNET_PQ_result_spec_array_bool(), GNUNET_PQ_result_spec_array_fixed_size(), GNUNET_PQ_result_spec_array_rel_time(), GNUNET_PQ_result_spec_array_string(), GNUNET_PQ_result_spec_array_timestamp(), GNUNET_PQ_result_spec_array_uint16(), GNUNET_PQ_result_spec_array_uint32(), GNUNET_PQ_result_spec_array_uint64(), and GNUNET_PQ_result_spec_array_variable_size().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_allow_nulls | ( | struct GNUNET_PQ_ResultSpec | rs, |
bool ** | is_nulls | ||
) |
Allow NULL values in an array to be found in the database for the given value.
rs | result spec entry to modify, MUST be one for the array types | |
[out] | is_nulls | location where to put the array of bools, whose elements will be set to 'true' if the value was indeed NULL, or to 'false' if the value was non-NULL. This parameter MUST NOT be NULL itself. The length of the allocated array will be equal to the length of the result for the values in rs. |
Definition at line 1497 of file pq_result_helper.c.
References extract_array_generic(), GNUNET_assert, info, and array_result_cls::is_nulls.
|
static |
Cleanup of the data and closure of an array spec.
Definition at line 1518 of file pq_result_helper.c.
References array_of_byte, GNUNET_free, info, and rd.
Referenced by GNUNET_PQ_result_spec_array_abs_time(), GNUNET_PQ_result_spec_array_bool(), GNUNET_PQ_result_spec_array_fixed_size(), GNUNET_PQ_result_spec_array_rel_time(), GNUNET_PQ_result_spec_array_string(), GNUNET_PQ_result_spec_array_timestamp(), GNUNET_PQ_result_spec_array_uint16(), GNUNET_PQ_result_spec_array_uint32(), GNUNET_PQ_result_spec_array_uint64(), and GNUNET_PQ_result_spec_array_variable_size().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_bool | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
bool ** | bools | ||
) |
array of bool expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array bools. |
[out] | bools | pointer to where to store the result, an array of num bool's. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1540 of file pq_result_helper.c.
References array_cleanup(), array_of_bool, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_uint16 | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
uint16_t ** | dst | ||
) |
array of uint16_t expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array u16s. |
[out] | dst | pointer to where to store the an array of num uint16_t's. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1570 of file pq_result_helper.c.
References array_cleanup(), array_of_uint16, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_uint32 | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
uint32_t ** | dst | ||
) |
array of uint32_t expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array u32s. |
[out] | dst | pointer to where to store the array of num uint32_t's. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1600 of file pq_result_helper.c.
References array_cleanup(), array_of_uint32, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_uint64 | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
uint64_t ** | dst | ||
) |
array of uint64_t expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array u64s. |
[out] | dst | pointer to where to store the array of num uint64_t's. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1630 of file pq_result_helper.c.
References array_cleanup(), array_of_uint64, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_abs_time | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
struct GNUNET_TIME_Absolute ** | dst | ||
) |
array of absolute time expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array u64s. |
[out] | dst | pointer to where to store the array of num absolute time. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1658 of file pq_result_helper.c.
References array_cleanup(), array_of_abs_time, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_rel_time | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
struct GNUNET_TIME_Relative ** | dst | ||
) |
array of relative time expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array u64s. |
[out] | dst | pointer to where to store the array of num relate time. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1686 of file pq_result_helper.c.
References array_cleanup(), array_of_rel_time, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_timestamp | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
struct GNUNET_TIME_Timestamp ** | dst | ||
) |
array of relative time expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements in the array u64s. |
[out] | dst | pointer to where to store the array of num timestamps. Allocated by the function, MUST be freed with GNUNET_free. |
Definition at line 1716 of file pq_result_helper.c.
References array_cleanup(), array_of_timestamp, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_variable_size | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
size_t ** | sizes, | ||
void ** | dst | ||
) |
Array of variable-size result expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements |
[out] | sizes | where to store the num size's of byte-buffers in dst |
[out] | dst | where to store the continuous array of num byte-buffers , allocated |
Definition at line 1746 of file pq_result_helper.c.
References array_cleanup(), array_of_byte, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, res, and array_result_cls::sizes.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_fixed_size | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t | size, | ||
size_t * | num, | ||
void ** | dst | ||
) |
Array of fixed-size result expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
size | number of bytes expected in each element of dst | |
[out] | num | where to store the number of elements |
[out] | dst | where to store the results, an continuous array of fixed-size elements |
Definition at line 1778 of file pq_result_helper.c.
References array_cleanup(), array_of_byte, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, res, and size.
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_array_string | ( | struct GNUNET_PQ_Context * | db, |
const char * | name, | ||
size_t * | num, | ||
char ** | dst | ||
) |
Array of 0-terminated strings expected.
db | Database context, needed for OID lookup for the correct type | |
name | name of the field in the table | |
[out] | num | where to store the number of elements |
[out] | dst | where to store the allocated continuous array of num 0-terminated strings |
Definition at line 1810 of file pq_result_helper.c.
References array_cleanup(), array_of_string, GNUNET_PQ_ResultSpec::cls, GNUNET_PQ_ResultSpec::conv, db, GNUNET_PQ_ResultSpec::dst, extract_array_generic(), GNUNET_PQ_ResultSpec::fname, GNUNET_assert, GNUNET_new, GNUNET_OK, GNUNET_PQ_get_oid_by_name(), info, name, array_result_cls::num, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | the row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 1853 of file pq_result_helper.c.
References GNUNET_CRYPTO_BlindSignPublicKey::cipher, GNUNET_CRYPTO_BlindSignPublicKey::cs_public_key, GNUNET_CRYPTO_BlindSignPublicKey::details, GNUNET_break, GNUNET_CRYPTO_BSA_CS, GNUNET_CRYPTO_BSA_INVALID, GNUNET_CRYPTO_BSA_RSA, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_rsa_public_key_decode(), GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_CRYPTO_BlindSignPublicKey::pub_key_hash, GNUNET_CRYPTO_BlindSignPublicKey::rc, res, result, and GNUNET_CRYPTO_BlindSignPublicKey::rsa_public_key.
Referenced by GNUNET_PQ_result_spec_blind_sign_pub().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 1951 of file pq_result_helper.c.
References GNUNET_CRYPTO_blind_sign_pub_decref(), pub, and rd.
Referenced by GNUNET_PQ_result_spec_blind_sign_pub().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_blind_sign_pub | ( | const char * | name, |
struct GNUNET_CRYPTO_BlindSignPublicKey ** | public_key | ||
) |
Blind sign public key expected.
name | name of the field in the table | |
[out] | public_key | where to store the denomination signature |
Definition at line 1966 of file pq_result_helper.c.
References clean_blind_sign_pub(), GNUNET_PQ_ResultSpec::conv, extract_blind_sign_pub(), GNUNET_PQ_ResultSpec::fname, name, pub, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | the row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 1995 of file pq_result_helper.c.
References GNUNET_CRYPTO_BlindSignPrivateKey::cipher, GNUNET_CRYPTO_BlindSignPrivateKey::cs_private_key, GNUNET_CRYPTO_BlindSignPrivateKey::details, GNUNET_break, GNUNET_CRYPTO_BSA_CS, GNUNET_CRYPTO_BSA_INVALID, GNUNET_CRYPTO_BSA_RSA, GNUNET_CRYPTO_rsa_private_key_decode(), GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_CRYPTO_BlindSignPrivateKey::rc, res, result, and GNUNET_CRYPTO_BlindSignPrivateKey::rsa_private_key.
Referenced by GNUNET_PQ_result_spec_blind_sign_priv().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 2087 of file pq_result_helper.c.
References GNUNET_CRYPTO_blind_sign_priv_decref(), and rd.
Referenced by GNUNET_PQ_result_spec_blind_sign_priv().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_blind_sign_priv | ( | const char * | name, |
struct GNUNET_CRYPTO_BlindSignPrivateKey ** | private_key | ||
) |
Blind sign private key expected.
name | name of the field in the table | |
[out] | private_key | where to store the denomination signature |
Definition at line 2102 of file pq_result_helper.c.
References clean_blind_sign_priv(), GNUNET_PQ_ResultSpec::conv, extract_blind_sign_priv(), GNUNET_PQ_ResultSpec::fname, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | the row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 2131 of file pq_result_helper.c.
References GNUNET_CRYPTO_BlindedSignature::blinded_cs_answer, GNUNET_CRYPTO_BlindedSignature::blinded_rsa_signature, GNUNET_CRYPTO_BlindedSignature::cipher, GNUNET_CRYPTO_BlindedSignature::details, GNUNET_break, GNUNET_CRYPTO_BSA_CS, GNUNET_CRYPTO_BSA_INVALID, GNUNET_CRYPTO_BSA_RSA, GNUNET_CRYPTO_rsa_signature_decode(), GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_CRYPTO_BlindedSignature::rc, res, and result.
Referenced by GNUNET_PQ_result_spec_blinded_sig().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 2228 of file pq_result_helper.c.
References GNUNET_CRYPTO_blinded_sig_decref(), and rd.
Referenced by GNUNET_PQ_result_spec_blinded_sig().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_blinded_sig | ( | const char * | name, |
struct GNUNET_CRYPTO_BlindedSignature ** | b_sig | ||
) |
Blinded signature expected.
name | name of the field in the table | |
[out] | b_sig | where to store the blinded signature |
Definition at line 2239 of file pq_result_helper.c.
References clean_blinded_sig(), GNUNET_PQ_ResultSpec::conv, extract_blinded_sig(), GNUNET_PQ_ResultSpec::fname, name, and res.
|
static |
Extract data from a Postgres database result at row row.
cls | closure | |
result | where to extract data from | |
row | the row to extract data from | |
fname | name (or prefix) of the fields to extract from | |
[in,out] | dst_size | where to store size of result, may be NULL |
[out] | dst | where to store the result |
Definition at line 2268 of file pq_result_helper.c.
References GNUNET_CRYPTO_UnblindedSignature::cipher, GNUNET_CRYPTO_UnblindedSignature::cs_signature, GNUNET_CRYPTO_UnblindedSignature::details, GNUNET_break, GNUNET_CRYPTO_BSA_CS, GNUNET_CRYPTO_BSA_INVALID, GNUNET_CRYPTO_BSA_RSA, GNUNET_CRYPTO_rsa_signature_decode(), GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_CRYPTO_UnblindedSignature::rc, res, result, and GNUNET_CRYPTO_UnblindedSignature::rsa_signature.
Referenced by GNUNET_PQ_result_spec_unblinded_sig().
|
static |
Function called to clean up memory allocated by a GNUNET_PQ_ResultConverter.
cls | closure |
rd | result data to clean up |
Definition at line 2365 of file pq_result_helper.c.
References GNUNET_CRYPTO_unblinded_sig_decref(), and rd.
Referenced by GNUNET_PQ_result_spec_unblinded_sig().
struct GNUNET_PQ_ResultSpec GNUNET_PQ_result_spec_unblinded_sig | ( | const char * | name, |
struct GNUNET_CRYPTO_UnblindedSignature ** | ub_sig | ||
) |
Unblinded signature expected.
name | name of the field in the table | |
[out] | ub_sig | where to store the unblinded signature |
Definition at line 2376 of file pq_result_helper.c.
References clean_unblinded_sig(), GNUNET_PQ_ResultSpec::conv, extract_unblinded_sig(), GNUNET_PQ_ResultSpec::fname, name, and res.