diff options
Diffstat (limited to 'src/gnsrecord/perf_gnsrecord_crypto.c')
-rw-r--r-- | src/gnsrecord/perf_gnsrecord_crypto.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gnsrecord/perf_gnsrecord_crypto.c b/src/gnsrecord/perf_gnsrecord_crypto.c index 3bb4ca4e1..b2614eb77 100644 --- a/src/gnsrecord/perf_gnsrecord_crypto.c +++ b/src/gnsrecord/perf_gnsrecord_crypto.c | |||
@@ -73,7 +73,7 @@ run (void *cls, | |||
73 | struct GNUNET_GNSRECORD_Data *s_rd; | 73 | struct GNUNET_GNSRECORD_Data *s_rd; |
74 | const char *s_name; | 74 | const char *s_name; |
75 | struct GNUNET_TIME_Absolute start_time; | 75 | struct GNUNET_TIME_Absolute start_time; |
76 | struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; | 76 | struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; |
77 | struct GNUNET_TIME_Absolute expire; | 77 | struct GNUNET_TIME_Absolute expire; |
78 | 78 | ||
79 | (void) cls; | 79 | (void) cls; |
@@ -81,8 +81,7 @@ run (void *cls, | |||
81 | (void) cfgfile; | 81 | (void) cfgfile; |
82 | (void) cfg; | 82 | (void) cfg; |
83 | expire = GNUNET_TIME_absolute_get (); | 83 | expire = GNUNET_TIME_absolute_get (); |
84 | privkey = GNUNET_CRYPTO_ecdsa_key_create (); | 84 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); |
85 | GNUNET_assert (NULL != privkey); | ||
86 | 85 | ||
87 | /* test block creation */ | 86 | /* test block creation */ |
88 | s_name = "DUMMY.dummy.gnunet"; | 87 | s_name = "DUMMY.dummy.gnunet"; |
@@ -91,12 +90,12 @@ run (void *cls, | |||
91 | for (unsigned int i = 0; i < ROUNDS; i++) | 90 | for (unsigned int i = 0; i < ROUNDS; i++) |
92 | { | 91 | { |
93 | GNUNET_assert (NULL != (block = | 92 | GNUNET_assert (NULL != (block = |
94 | GNUNET_GNSRECORD_block_create2 (privkey, | 93 | GNUNET_GNSRECORD_block_create2 (&privkey, |
95 | expire, | 94 | expire, |
96 | s_name, | 95 | s_name, |
97 | s_rd, | 96 | s_rd, |
98 | RECORDS))); | 97 | RECORDS))); |
99 | GNUNET_GNSRECORD_query_from_private_key (privkey, | 98 | GNUNET_GNSRECORD_query_from_private_key (&privkey, |
100 | s_name, | 99 | s_name, |
101 | &query); | 100 | &query); |
102 | GNUNET_free (block); | 101 | GNUNET_free (block); |
@@ -110,7 +109,6 @@ run (void *cls, | |||
110 | for (unsigned int i = 0; i < RECORDS; i++) | 109 | for (unsigned int i = 0; i < RECORDS; i++) |
111 | GNUNET_free ((void *) s_rd[i].data); | 110 | GNUNET_free ((void *) s_rd[i].data); |
112 | GNUNET_free (s_rd); | 111 | GNUNET_free (s_rd); |
113 | GNUNET_free (privkey); | ||
114 | } | 112 | } |
115 | 113 | ||
116 | 114 | ||