94 results[0].buffer_type = MYSQL_TYPE_BLOB;
97 mysql_stmt_fetch_column (stmt,
123 void **ptr = (
void **) rs->
dst;
141 .dst = (
void *) (
dst),
142 .result_size = ptr_size,
172 results[0].buffer_type = MYSQL_TYPE_BLOB;
224 .dst = (
void *) (ptr),
225 .dst_size = ptr_size,
255 results[0].buffer_type = MYSQL_TYPE_BLOB;
298 results[0].buffer_type = MYSQL_TYPE_BLOB;
300 mysql_stmt_fetch_column (stmt,
315 "Results contains bogus public key value (fail to decode)\n");
389 results[0].buffer_type = MYSQL_TYPE_BLOB;
430 results[0].buffer_type = MYSQL_TYPE_BLOB;
432 mysql_stmt_fetch_column (stmt,
447 "Resuls contains bogus signature value (fails to decode)\n");
519 results[0].buffer_type = MYSQL_TYPE_BLOB;
553 *(
void **) rs->
dst = NULL;
560 results[0].buffer_type = MYSQL_TYPE_BLOB;
563 mysql_stmt_fetch_column (stmt,
651 results[0].buffer_type = MYSQL_TYPE_SHORT;
730 results[0].buffer_type = MYSQL_TYPE_LONG;
806 if (
sizeof(uint64_t) != rs->
dst_size)
811 results[0].buffer_type = MYSQL_TYPE_LONGLONG;
838 if (
sizeof(uint64_t) != rs->
dst_size)
struct GNUNET_IDENTITY_PrivateKey pk
Private key from command line option, or NULL.
static unsigned int results
Helper library to access a MySQL database.
struct GNUNET_CRYPTO_RsaSignature * GNUNET_CRYPTO_rsa_signature_decode(const void *buf, size_t buf_size)
Decode the signature from the data-format back to the "normal", internal format.
#define GNUNET_log(kind,...)
void GNUNET_CRYPTO_rsa_signature_free(struct GNUNET_CRYPTO_RsaSignature *sig)
Free memory occupied by signature.
void GNUNET_CRYPTO_rsa_public_key_free(struct GNUNET_CRYPTO_RsaPublicKey *key)
Free memory occupied by the public key.
struct GNUNET_CRYPTO_RsaPublicKey * GNUNET_CRYPTO_rsa_public_key_decode(const char *buf, size_t len)
Decode the public key from the data-format back to the "normal", internal format.
@ GNUNET_ERROR_TYPE_ERROR
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_absolute_time_nbo(struct GNUNET_TIME_AbsoluteNBO *at)
Absolute time in network byte order expected.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_uint16(uint16_t *u16)
uint16_t expected
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_absolute_time(struct GNUNET_TIME_Absolute *at)
Absolute time expected.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_variable_size(void **dst, size_t *ptr_size)
Variable-size result expected.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_string(char **dst)
0- terminated string exprected.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_rsa_signature(struct GNUNET_CRYPTO_RsaSignature **sig)
RSA signature expected.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_rsa_public_key(struct GNUNET_CRYPTO_RsaPublicKey **rsa)
RSA public key expected.
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_fixed_size(void *ptr, size_t ptr_size)
Fixed-size result expected.
#define GNUNET_MY_result_spec_auto_from_type(dst)
We expect a fixed-size result, with size determined by the type of * dst
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_uint32(uint32_t *u32)
uint32_t expected
struct GNUNET_MY_ResultSpec GNUNET_MY_result_spec_uint64(uint64_t *u64)
uint64_t expected.
static int pre_extract_rsa_public_key(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a Mysql database result at row row.
static int post_extract_rsa_signature(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a Mysql database result at row row.
static int pre_extract_varsize_blob(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
extract data from a Mysql database result at row row
static int post_extract_fixed_blob(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Check size of extracted fixed size data from a Mysql database result at row row.
static int post_extract_uint64(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Check size of extracted fixed-size data from a Mysql database.
static int post_extract_string(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Check size of extracted fixed size data from a Mysql database.
static int pre_extract_uint16(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a Postgres database result at row row.
static void clean_rsa_public_key(void *cls, struct GNUNET_MY_ResultSpec *rs)
Function called to clean up memory allocated by a GNUNET_MY_ResultConverter.
static int post_extract_rsa_public_key(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Check size of extracted fixed size data from a Mysql database result at row row.
static int post_extract_uint16(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Check size of extracted fixed size data from a Mysql database.
static int pre_extract_string(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a Mysql database result at row row.
static int pre_extract_fixed_blob(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a Mysql database result at row row.
static int post_extract_varsize_blob(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
extract data from a Mysql database result at row row
static int pre_extract_uint32(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a MYSQL database result at row row.
static void clean_rsa_signature(void *cls, struct GNUNET_MY_ResultSpec *rs)
Function called to clean up memory allocated by a GNUNET_MY_ResultConverter.
static void cleanup_varsize_blob(void *cls, struct GNUNET_MY_ResultSpec *rs)
extract data from a Mysql database result at row row
static int pre_extract_rsa_signature(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a Mysql database result at row row.
static int post_extract_uint32(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a MYSQL database result at row row.
static int pre_extract_uint64(void *cls, struct GNUNET_MY_ResultSpec *rs, MYSQL_STMT *stmt, unsigned int column, MYSQL_BIND *results)
Extract data from a MYSQL database result at row row.
static unsigned int size
Size of the "table".
The public information of an RSA key pair.
Information we pass to GNUNET_MY_extract_result() to initialize the arguments of the prepared stateme...
size_t dst_size
Allowed size for the data, 0 for variable-size (in this case, the type of dst is a void ** and we nee...
MYSQL_BOOL is_null
Memory for MySQL to notify us about NULL values.
unsigned int num_fields
How many fields does this result specification occupy in the result returned by MySQL.
void * dst
Destination for the data.
size_t * result_size
Where to store actual size of the result.
unsigned long mysql_bind_output_length
Location where we temporarily store the output buffer length from MySQL.
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Time for absolute times used by GNUnet, in microseconds.