aboutsummaryrefslogtreecommitdiff
path: root/src/psycstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/psycstore')
-rw-r--r--src/psycstore/plugin_psycstore_sqlite.c38
-rw-r--r--src/psycstore/psycstore.h8
-rw-r--r--src/psycstore/psycstore_api.c8
-rw-r--r--src/psycstore/test_plugin_psycstore.c8
-rw-r--r--src/psycstore/test_psycstore.c8
5 files changed, 35 insertions, 35 deletions
diff --git a/src/psycstore/plugin_psycstore_sqlite.c b/src/psycstore/plugin_psycstore_sqlite.c
index 750fdce16..d8006c4fc 100644
--- a/src/psycstore/plugin_psycstore_sqlite.c
+++ b/src/psycstore/plugin_psycstore_sqlite.c
@@ -609,7 +609,7 @@ database_shutdown (struct Plugin *plugin)
609 609
610static int 610static int
611channel_key_store (struct Plugin *plugin, 611channel_key_store (struct Plugin *plugin,
612 const struct GNUNET_CRYPTO_EccPublicKey *channel_key) 612 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key)
613{ 613{
614 sqlite3_stmt *stmt = plugin->insert_channel_key; 614 sqlite3_stmt *stmt = plugin->insert_channel_key;
615 615
@@ -638,7 +638,7 @@ channel_key_store (struct Plugin *plugin,
638 638
639static int 639static int
640slave_key_store (struct Plugin *plugin, 640slave_key_store (struct Plugin *plugin,
641 const struct GNUNET_CRYPTO_EccPublicKey *slave_key) 641 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key)
642{ 642{
643 sqlite3_stmt *stmt = plugin->insert_slave_key; 643 sqlite3_stmt *stmt = plugin->insert_slave_key;
644 644
@@ -676,8 +676,8 @@ slave_key_store (struct Plugin *plugin,
676 */ 676 */
677static int 677static int
678membership_store (void *cls, 678membership_store (void *cls,
679 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 679 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
680 const struct GNUNET_CRYPTO_EccPublicKey *slave_key, 680 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key,
681 int did_join, 681 int did_join,
682 uint64_t announced_at, 682 uint64_t announced_at,
683 uint64_t effective_since, 683 uint64_t effective_since,
@@ -736,8 +736,8 @@ membership_store (void *cls,
736 */ 736 */
737static int 737static int
738membership_test (void *cls, 738membership_test (void *cls,
739 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 739 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
740 const struct GNUNET_CRYPTO_EccPublicKey *slave_key, 740 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key,
741 uint64_t message_id) 741 uint64_t message_id)
742{ 742{
743 struct Plugin *plugin = cls; 743 struct Plugin *plugin = cls;
@@ -783,7 +783,7 @@ membership_test (void *cls,
783 */ 783 */
784static int 784static int
785fragment_store (void *cls, 785fragment_store (void *cls,
786 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 786 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
787 const struct GNUNET_MULTICAST_MessageHeader *msg, 787 const struct GNUNET_MULTICAST_MessageHeader *msg,
788 uint32_t psycstore_flags) 788 uint32_t psycstore_flags)
789{ 789{
@@ -847,7 +847,7 @@ fragment_store (void *cls,
847 */ 847 */
848static int 848static int
849message_add_flags (void *cls, 849message_add_flags (void *cls,
850 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 850 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
851 uint64_t message_id, 851 uint64_t message_id,
852 uint64_t psycstore_flags) 852 uint64_t psycstore_flags)
853{ 853{
@@ -923,7 +923,7 @@ fragment_row (sqlite3_stmt *stmt, GNUNET_PSYCSTORE_FragmentCallback cb,
923static int 923static int
924fragment_get (void *cls, 924fragment_get (void *cls,
925 const struct 925 const struct
926 GNUNET_CRYPTO_EccPublicKey *channel_key, 926 GNUNET_CRYPTO_EccPublicSignKey *channel_key,
927 uint64_t fragment_id, 927 uint64_t fragment_id,
928 GNUNET_PSYCSTORE_FragmentCallback cb, 928 GNUNET_PSYCSTORE_FragmentCallback cb,
929 void *cb_cls) 929 void *cb_cls)
@@ -974,7 +974,7 @@ fragment_get (void *cls,
974 */ 974 */
975static int 975static int
976message_get (void *cls, 976message_get (void *cls,
977 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 977 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
978 uint64_t message_id, 978 uint64_t message_id,
979 GNUNET_PSYCSTORE_FragmentCallback cb, 979 GNUNET_PSYCSTORE_FragmentCallback cb,
980 void *cb_cls) 980 void *cb_cls)
@@ -1035,7 +1035,7 @@ message_get (void *cls,
1035 */ 1035 */
1036static int 1036static int
1037message_get_fragment (void *cls, 1037message_get_fragment (void *cls,
1038 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1038 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1039 uint64_t message_id, 1039 uint64_t message_id,
1040 uint64_t fragment_offset, 1040 uint64_t fragment_offset,
1041 GNUNET_PSYCSTORE_FragmentCallback cb, 1041 GNUNET_PSYCSTORE_FragmentCallback cb,
@@ -1089,7 +1089,7 @@ message_get_fragment (void *cls,
1089 */ 1089 */
1090static int 1090static int
1091counters_get_master (void *cls, 1091counters_get_master (void *cls,
1092 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1092 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1093 uint64_t *fragment_id, 1093 uint64_t *fragment_id,
1094 uint64_t *message_id, 1094 uint64_t *message_id,
1095 uint64_t *group_generation) 1095 uint64_t *group_generation)
@@ -1142,7 +1142,7 @@ counters_get_master (void *cls,
1142 */ 1142 */
1143static int 1143static int
1144counters_get_slave (void *cls, 1144counters_get_slave (void *cls,
1145 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1145 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1146 uint64_t *max_state_msg_id) 1146 uint64_t *max_state_msg_id)
1147{ 1147{
1148 struct Plugin *plugin = cls; 1148 struct Plugin *plugin = cls;
@@ -1193,7 +1193,7 @@ counters_get_slave (void *cls,
1193 */ 1193 */
1194static int 1194static int
1195state_set (void *cls, 1195state_set (void *cls,
1196 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1196 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1197 const char *name, const void *value, size_t value_size) 1197 const char *name, const void *value, size_t value_size)
1198{ 1198{
1199 struct Plugin *plugin = cls; 1199 struct Plugin *plugin = cls;
@@ -1242,7 +1242,7 @@ state_set (void *cls,
1242 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 1242 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
1243 */ 1243 */
1244static int 1244static int
1245state_reset (void *cls, const struct GNUNET_CRYPTO_EccPublicKey *channel_key) 1245state_reset (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key)
1246{ 1246{
1247 struct Plugin *plugin = cls; 1247 struct Plugin *plugin = cls;
1248 sqlite3_stmt *stmt = plugin->delete_state; 1248 sqlite3_stmt *stmt = plugin->delete_state;
@@ -1279,7 +1279,7 @@ state_reset (void *cls, const struct GNUNET_CRYPTO_EccPublicKey *channel_key)
1279 */ 1279 */
1280static int 1280static int
1281state_update_signed (void *cls, 1281state_update_signed (void *cls,
1282 const struct GNUNET_CRYPTO_EccPublicKey *channel_key) 1282 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key)
1283{ 1283{
1284 struct Plugin *plugin = cls; 1284 struct Plugin *plugin = cls;
1285 sqlite3_stmt *stmt = plugin->update_state_signed; 1285 sqlite3_stmt *stmt = plugin->update_state_signed;
@@ -1315,7 +1315,7 @@ state_update_signed (void *cls,
1315 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 1315 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
1316 */ 1316 */
1317static int 1317static int
1318state_get (void *cls, const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1318state_get (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1319 const char *name, GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls) 1319 const char *name, GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls)
1320{ 1320{
1321 struct Plugin *plugin = cls; 1321 struct Plugin *plugin = cls;
@@ -1367,7 +1367,7 @@ state_get (void *cls, const struct GNUNET_CRYPTO_EccPublicKey *channel_key,
1367 * @return #GNUNET_OK on success, else #GNUNET_SYSERR 1367 * @return #GNUNET_OK on success, else #GNUNET_SYSERR
1368 */ 1368 */
1369static int 1369static int
1370state_get_all (void *cls, const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1370state_get_all (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1371 const char *name, GNUNET_PSYCSTORE_StateCallback cb, 1371 const char *name, GNUNET_PSYCSTORE_StateCallback cb,
1372 void *cb_cls) 1372 void *cb_cls)
1373{ 1373{
@@ -1435,7 +1435,7 @@ state_get_all (void *cls, const struct GNUNET_CRYPTO_EccPublicKey *channel_key,
1435 */ 1435 */
1436static int 1436static int
1437state_get_signed (void *cls, 1437state_get_signed (void *cls,
1438 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 1438 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
1439 GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls) 1439 GNUNET_PSYCSTORE_StateCallback cb, void *cb_cls)
1440{ 1440{
1441 struct Plugin *plugin = cls; 1441 struct Plugin *plugin = cls;
diff --git a/src/psycstore/psycstore.h b/src/psycstore/psycstore.h
index 2e3d66ec5..d2c25e791 100644
--- a/src/psycstore/psycstore.h
+++ b/src/psycstore/psycstore.h
@@ -58,8 +58,8 @@ struct ResultCodeMessage
58 */ 58 */
59struct MembershipStoreMessage 59struct MembershipStoreMessage
60{ 60{
61 const struct GNUNET_CRYPTO_EccPublicKey *channel_key; 61 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key;
62 const struct GNUNET_CRYPTO_EccPublicKey *slave_key; 62 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key;
63 int did_join; 63 int did_join;
64 uint64_t announced_at; 64 uint64_t announced_at;
65 uint64_t effective_since; 65 uint64_t effective_since;
@@ -72,8 +72,8 @@ struct MembershipStoreMessage
72 */ 72 */
73struct MembershipTestMessage 73struct MembershipTestMessage
74{ 74{
75 const struct GNUNET_CRYPTO_EccPublicKey *channel_key; 75 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key;
76 const struct GNUNET_CRYPTO_EccPublicKey *slave_key; 76 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key;
77 uint64_t message_id; 77 uint64_t message_id;
78 uint64_t group_generation; 78 uint64_t group_generation;
79}; 79};
diff --git a/src/psycstore/psycstore_api.c b/src/psycstore/psycstore_api.c
index 194dcc79e..5847fc852 100644
--- a/src/psycstore/psycstore_api.c
+++ b/src/psycstore/psycstore_api.c
@@ -437,8 +437,8 @@ GNUNET_PSYCSTORE_operation_cancel (struct GNUNET_PSYCSTORE_OperationHandle *op)
437struct GNUNET_PSYCSTORE_OperationHandle * 437struct GNUNET_PSYCSTORE_OperationHandle *
438GNUNET_PSYCSTORE_membership_store ( 438GNUNET_PSYCSTORE_membership_store (
439 struct GNUNET_PSYCSTORE_Handle *h, 439 struct GNUNET_PSYCSTORE_Handle *h,
440 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 440 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
441 const struct GNUNET_CRYPTO_EccPublicKey *slave_key, 441 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key,
442 int did_join, 442 int did_join,
443 uint64_t announced_at, 443 uint64_t announced_at,
444 uint64_t effective_since, 444 uint64_t effective_since,
@@ -453,8 +453,8 @@ GNUNET_PSYCSTORE_membership_store (
453struct GNUNET_PSYCSTORE_OperationHandle * 453struct GNUNET_PSYCSTORE_OperationHandle *
454GNUNET_PSYCSTORE_membership_test ( 454GNUNET_PSYCSTORE_membership_test (
455 struct GNUNET_PSYCSTORE_Handle *h, 455 struct GNUNET_PSYCSTORE_Handle *h,
456 const struct GNUNET_CRYPTO_EccPublicKey *channel_key, 456 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
457 const struct GNUNET_CRYPTO_EccPublicKey *slave_key, 457 const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key,
458 uint64_t message_id, 458 uint64_t message_id,
459 uint64_t group_generation, 459 uint64_t group_generation,
460 GNUNET_PSYCSTORE_ResultCallback rcb, 460 GNUNET_PSYCSTORE_ResultCallback rcb,
diff --git a/src/psycstore/test_plugin_psycstore.c b/src/psycstore/test_plugin_psycstore.c
index 52a306f07..b584ed51d 100644
--- a/src/psycstore/test_plugin_psycstore.c
+++ b/src/psycstore/test_plugin_psycstore.c
@@ -53,8 +53,8 @@ static const char *plugin_name;
53static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; 53static struct GNUNET_CRYPTO_EccPrivateKey *channel_key;
54static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; 54static struct GNUNET_CRYPTO_EccPrivateKey *slave_key;
55 55
56static struct GNUNET_CRYPTO_EccPublicKey channel_pub_key; 56static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key;
57static struct GNUNET_CRYPTO_EccPublicKey slave_pub_key; 57static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key;
58 58
59/** 59/**
60 * Function called when the service shuts down. Unloads our psycstore 60 * Function called when the service shuts down. Unloads our psycstore
@@ -174,8 +174,8 @@ run (void *cls, char *const *args, const char *cfgfile,
174 channel_key = GNUNET_CRYPTO_ecc_key_create (); 174 channel_key = GNUNET_CRYPTO_ecc_key_create ();
175 slave_key = GNUNET_CRYPTO_ecc_key_create (); 175 slave_key = GNUNET_CRYPTO_ecc_key_create ();
176 176
177 GNUNET_CRYPTO_ecc_key_get_public (channel_key, &channel_pub_key); 177 GNUNET_CRYPTO_ecc_key_get_public_for_signature (channel_key, &channel_pub_key);
178 GNUNET_CRYPTO_ecc_key_get_public (slave_key, &slave_pub_key); 178 GNUNET_CRYPTO_ecc_key_get_public_for_signature (slave_key, &slave_pub_key);
179 179
180 ASSERT (GNUNET_OK == db->membership_store(db->cls, &channel_pub_key, 180 ASSERT (GNUNET_OK == db->membership_store(db->cls, &channel_pub_key,
181 &slave_pub_key, GNUNET_YES, 181 &slave_pub_key, GNUNET_YES,
diff --git a/src/psycstore/test_psycstore.c b/src/psycstore/test_psycstore.c
index 6b9e77180..db4cfb0eb 100644
--- a/src/psycstore/test_psycstore.c
+++ b/src/psycstore/test_psycstore.c
@@ -58,8 +58,8 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
58static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; 58static struct GNUNET_CRYPTO_EccPrivateKey *channel_key;
59static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; 59static struct GNUNET_CRYPTO_EccPrivateKey *slave_key;
60 60
61static struct GNUNET_CRYPTO_EccPublicKey channel_pub_key; 61static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key;
62static struct GNUNET_CRYPTO_EccPublicKey slave_pub_key; 62static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key;
63 63
64/** 64/**
65 * Clean up all resources used. 65 * Clean up all resources used.
@@ -160,8 +160,8 @@ run (void *cls,
160 channel_key = GNUNET_CRYPTO_ecc_key_create (); 160 channel_key = GNUNET_CRYPTO_ecc_key_create ();
161 slave_key = GNUNET_CRYPTO_ecc_key_create (); 161 slave_key = GNUNET_CRYPTO_ecc_key_create ();
162 162
163 GNUNET_CRYPTO_ecc_key_get_public (channel_key, &channel_pub_key); 163 GNUNET_CRYPTO_ecc_key_get_public_for_signature (channel_key, &channel_pub_key);
164 GNUNET_CRYPTO_ecc_key_get_public (slave_key, &slave_pub_key); 164 GNUNET_CRYPTO_ecc_key_get_public_for_signature (slave_key, &slave_pub_key);
165 165
166 op = GNUNET_PSYCSTORE_membership_store (h, &channel_pub_key, &slave_pub_key, 166 op = GNUNET_PSYCSTORE_membership_store (h, &channel_pub_key, &slave_pub_key,
167 GNUNET_YES, 2, 2, 1, 167 GNUNET_YES, 2, 2, 1,