diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-05-29 08:18:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-05-29 08:18:55 +0000 |
commit | 022002438e4047d235a688cfd9da7b63ab990103 (patch) | |
tree | 8d0cb444a3ab376b5a8f614fb87bdeb31e7b3327 /src/namestore/test_namestore_api_sign_verify.c | |
parent | b62eb443ee3af84f87030fad9fd11a948b1a2503 (diff) | |
download | gnunet-022002438e4047d235a688cfd9da7b63ab990103.tar.gz gnunet-022002438e4047d235a688cfd9da7b63ab990103.zip |
-switching GNS from RSA to ECC
Diffstat (limited to 'src/namestore/test_namestore_api_sign_verify.c')
-rw-r--r-- | src/namestore/test_namestore_api_sign_verify.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/namestore/test_namestore_api_sign_verify.c b/src/namestore/test_namestore_api_sign_verify.c index 10be25bb4..647cc59be 100644 --- a/src/namestore/test_namestore_api_sign_verify.c +++ b/src/namestore/test_namestore_api_sign_verify.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #define TEST_REMOVE_RECORD_DATA 'b' | 42 | #define TEST_REMOVE_RECORD_DATA 'b' |
43 | 43 | ||
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 45 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 47 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; | 49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; |
50 | 50 | ||
@@ -76,19 +76,19 @@ static void | |||
76 | run (void *cls, char *const *args, const char *cfgfile, | 76 | run (void *cls, char *const *args, const char *cfgfile, |
77 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 77 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
78 | { | 78 | { |
79 | struct GNUNET_CRYPTO_RsaSignature * signature; | 79 | struct GNUNET_CRYPTO_EccSignature * signature; |
80 | 80 | ||
81 | /* load privat key */ | 81 | /* load privat key */ |
82 | char *hostkey_file; | 82 | char *hostkey_file; |
83 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 83 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
84 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 84 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
85 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 85 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
86 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 86 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
87 | GNUNET_free (hostkey_file); | 87 | GNUNET_free (hostkey_file); |
88 | GNUNET_assert (privkey != NULL); | 88 | GNUNET_assert (privkey != NULL); |
89 | struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); | 89 | struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); |
90 | /* get public key */ | 90 | /* get public key */ |
91 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 91 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
92 | 92 | ||
93 | int res_c; | 93 | int res_c; |
94 | int res_w; | 94 | int res_w; |