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_namestore_api_lookup_public.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_namestore_api_lookup_public.c')
-rw-r--r-- | src/namestore/test_namestore_api_lookup_public.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index f2b009ac5..6c6ee55ec 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
38 | 38 | ||
39 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 39 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; | 41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; | 43 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
44 | 44 | ||
45 | static int res; | 45 | static int res; |
46 | 46 | ||
@@ -149,7 +149,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
149 | { | 149 | { |
150 | const char *name = cls; | 150 | const char *name = cls; |
151 | struct GNUNET_HashCode derived_hash; | 151 | struct GNUNET_HashCode derived_hash; |
152 | struct GNUNET_CRYPTO_EccPublicSignKey pubkey; | 152 | struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
153 | 153 | ||
154 | GNUNET_assert (NULL != cls); | 154 | GNUNET_assert (NULL != cls); |
155 | 155 | ||
@@ -159,7 +159,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
159 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 159 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
160 | 160 | ||
161 | /* Create derived hash */ | 161 | /* Create derived hash */ |
162 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); | 162 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); |
163 | GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash); | 163 | GNUNET_NAMESTORE_query_from_public_key (&pubkey, name, &derived_hash); |
164 | 164 | ||
165 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, | 165 | nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, |
@@ -183,10 +183,10 @@ run (void *cls, | |||
183 | DIR_SEPARATOR_STR, | 183 | DIR_SEPARATOR_STR, |
184 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 184 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
186 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); | 186 | privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file); |
187 | GNUNET_free (hostkey_file); | 187 | GNUNET_free (hostkey_file); |
188 | GNUNET_assert (privkey != NULL); | 188 | GNUNET_assert (privkey != NULL); |
189 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); | 189 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); |
190 | 190 | ||
191 | 191 | ||
192 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 192 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |