diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-10 14:38:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-10 14:38:55 +0000 |
commit | 9351b1e9bdf2b067b6db06562c26ba658cff42b8 (patch) | |
tree | 68dc4ab447e7e8b6a20a706858cd36238c1c7c5f /src/namestore/test_plugin_namestore.c | |
parent | 8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff) | |
download | gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip |
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src/namestore/test_plugin_namestore.c')
-rw-r--r-- | src/namestore/test_plugin_namestore.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c index 5274e8bca..7e77f4317 100644 --- a/src/namestore/test_plugin_namestore.c +++ b/src/namestore/test_plugin_namestore.c | |||
@@ -81,14 +81,14 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
81 | 81 | ||
82 | static void | 82 | static void |
83 | test_record (void *cls, | 83 | test_record (void *cls, |
84 | const struct GNUNET_CRYPTO_EccPrivateKey *private_key, | 84 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, |
85 | const char *label, | 85 | const char *label, |
86 | unsigned int rd_count, | 86 | unsigned int rd_count, |
87 | const struct GNUNET_NAMESTORE_RecordData *rd) | 87 | const struct GNUNET_NAMESTORE_RecordData *rd) |
88 | { | 88 | { |
89 | int *idp = cls; | 89 | int *idp = cls; |
90 | int id = *idp; | 90 | int id = *idp; |
91 | struct GNUNET_CRYPTO_EccPrivateKey tzone_private_key; | 91 | struct GNUNET_CRYPTO_EcdsaPrivateKey tzone_private_key; |
92 | char tname[64]; | 92 | char tname[64]; |
93 | unsigned int trd_count = 1 + (id % 1024); | 93 | unsigned int trd_count = 1 + (id % 1024); |
94 | unsigned int i; | 94 | unsigned int i; |
@@ -104,7 +104,7 @@ test_record (void *cls, | |||
104 | } | 104 | } |
105 | memset (&tzone_private_key, (id % 241), sizeof (tzone_private_key)); | 105 | memset (&tzone_private_key, (id % 241), sizeof (tzone_private_key)); |
106 | GNUNET_assert (0 == strcmp (label, tname)); | 106 | GNUNET_assert (0 == strcmp (label, tname)); |
107 | GNUNET_assert (0 == memcmp (&tzone_private_key, private_key, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))); | 107 | GNUNET_assert (0 == memcmp (&tzone_private_key, private_key, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))); |
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
@@ -119,11 +119,11 @@ get_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) | |||
119 | static void | 119 | static void |
120 | put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) | 120 | put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) |
121 | { | 121 | { |
122 | struct GNUNET_CRYPTO_EccPrivateKey zone_private_key; | 122 | struct GNUNET_CRYPTO_EcdsaPrivateKey zone_private_key; |
123 | char label[64]; | 123 | char label[64]; |
124 | unsigned int rd_count = 1 + (id % 1024); | 124 | unsigned int rd_count = 1 + (id % 1024); |
125 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 125 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; |
126 | struct GNUNET_CRYPTO_EccSignature signature; | 126 | struct GNUNET_CRYPTO_EcdsaSignature signature; |
127 | unsigned int i; | 127 | unsigned int i; |
128 | 128 | ||
129 | GNUNET_snprintf (label, sizeof (label), | 129 | GNUNET_snprintf (label, sizeof (label), |