diff options
Diffstat (limited to 'src/namestore/plugin_namestore_sqlite.c')
-rw-r--r-- | src/namestore/plugin_namestore_sqlite.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index f0deb7fa9..f0b801d1e 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -450,12 +450,12 @@ namestore_sqlite_remove_records (void *cls, | |||
450 | */ | 450 | */ |
451 | static int | 451 | static int |
452 | namestore_sqlite_put_records (void *cls, | 452 | namestore_sqlite_put_records (void *cls, |
453 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 453 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
454 | struct GNUNET_TIME_Absolute expire, | 454 | struct GNUNET_TIME_Absolute expire, |
455 | const char *name, | 455 | const char *name, |
456 | unsigned int rd_count, | 456 | unsigned int rd_count, |
457 | const struct GNUNET_NAMESTORE_RecordData *rd, | 457 | const struct GNUNET_NAMESTORE_RecordData *rd, |
458 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 458 | const struct GNUNET_CRYPTO_EccSignature *signature) |
459 | { | 459 | { |
460 | struct Plugin *plugin = cls; | 460 | struct Plugin *plugin = cls; |
461 | int n; | 461 | int n; |
@@ -467,7 +467,7 @@ namestore_sqlite_put_records (void *cls, | |||
467 | size_t data_size; | 467 | size_t data_size; |
468 | unsigned int i; | 468 | unsigned int i; |
469 | 469 | ||
470 | GNUNET_CRYPTO_short_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone); | 470 | GNUNET_CRYPTO_short_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &zone); |
471 | (void) namestore_sqlite_remove_records (plugin, &zone, name); | 471 | (void) namestore_sqlite_remove_records (plugin, &zone, name); |
472 | name_len = strlen (name); | 472 | name_len = strlen (name); |
473 | GNUNET_CRYPTO_short_hash (name, name_len, &nh); | 473 | GNUNET_CRYPTO_short_hash (name, name_len, &nh); |
@@ -497,12 +497,12 @@ namestore_sqlite_put_records (void *cls, | |||
497 | GNUNET_break (0); | 497 | GNUNET_break (0); |
498 | return GNUNET_SYSERR; | 498 | return GNUNET_SYSERR; |
499 | } | 499 | } |
500 | if ((SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 1, zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), SQLITE_STATIC)) || | 500 | if ((SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 1, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), SQLITE_STATIC)) || |
501 | (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, SQLITE_STATIC)) || | 501 | (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, SQLITE_STATIC)) || |
502 | (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) || | 502 | (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) || |
503 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, data_size, SQLITE_STATIC)) || | 503 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, data_size, SQLITE_STATIC)) || |
504 | (SQLITE_OK != sqlite3_bind_int64 (plugin->put_records, 5, expire.abs_value)) || | 504 | (SQLITE_OK != sqlite3_bind_int64 (plugin->put_records, 5, expire.abs_value)) || |
505 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 6, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature), SQLITE_STATIC)) || | 505 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 6, signature, sizeof (struct GNUNET_CRYPTO_EccSignature), SQLITE_STATIC)) || |
506 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 7, &zone_delegation, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || | 506 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 7, &zone_delegation, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || |
507 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 8, &zone, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || | 507 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 8, &zone, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || |
508 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 9, &nh, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || | 508 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 9, &nh, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || |
@@ -560,8 +560,8 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
560 | int sret; | 560 | int sret; |
561 | unsigned int record_count; | 561 | unsigned int record_count; |
562 | size_t data_size; | 562 | size_t data_size; |
563 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key; | 563 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key; |
564 | const struct GNUNET_CRYPTO_RsaSignature *sig; | 564 | const struct GNUNET_CRYPTO_EccSignature *sig; |
565 | struct GNUNET_TIME_Absolute expiration; | 565 | struct GNUNET_TIME_Absolute expiration; |
566 | const char *data; | 566 | const char *data; |
567 | const char *name; | 567 | const char *name; |
@@ -578,8 +578,8 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
578 | expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4); | 578 | expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4); |
579 | sig = sqlite3_column_blob (stmt, 5); | 579 | sig = sqlite3_column_blob (stmt, 5); |
580 | 580 | ||
581 | if ( (sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) != sqlite3_column_bytes (stmt, 0)) || | 581 | if ( (sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) != sqlite3_column_bytes (stmt, 0)) || |
582 | (sizeof (struct GNUNET_CRYPTO_RsaSignature) != sqlite3_column_bytes (stmt, 5)) ) | 582 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != sqlite3_column_bytes (stmt, 5)) ) |
583 | { | 583 | { |
584 | GNUNET_break (0); | 584 | GNUNET_break (0); |
585 | ret = GNUNET_SYSERR; | 585 | ret = GNUNET_SYSERR; |