aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord/test_gnsrecord_crypto.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-14 19:47:32 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 12:11:18 +0200
commit96c802b46be51e5c45f34e2de823f787d26c2929 (patch)
tree457ccfd8f9a61563af86318739c4a8f964a57025 /src/gnsrecord/test_gnsrecord_crypto.c
parentc14e3a2769ff0f15fdbb32797e37e43ce2344fa3 (diff)
downloadgnunet-96c802b46be51e5c45f34e2de823f787d26c2929.tar.gz
gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.zip
- towards crypto agility; wip
Diffstat (limited to 'src/gnsrecord/test_gnsrecord_crypto.c')
-rw-r--r--src/gnsrecord/test_gnsrecord_crypto.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gnsrecord/test_gnsrecord_crypto.c b/src/gnsrecord/test_gnsrecord_crypto.c
index b67e9a123..d541f3076 100644
--- a/src/gnsrecord/test_gnsrecord_crypto.c
+++ b/src/gnsrecord/test_gnsrecord_crypto.c
@@ -100,17 +100,18 @@ run (void *cls,
100 const struct GNUNET_CONFIGURATION_Handle *cfg) 100 const struct GNUNET_CONFIGURATION_Handle *cfg)
101{ 101{
102 struct GNUNET_GNSRECORD_Block *block; 102 struct GNUNET_GNSRECORD_Block *block;
103 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; 103 struct GNUNET_IDENTITY_PublicKey pubkey;
104 struct GNUNET_HashCode query_pub; 104 struct GNUNET_HashCode query_pub;
105 struct GNUNET_HashCode query_priv; 105 struct GNUNET_HashCode query_priv;
106 struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get (); 106 struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get ();
107 struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; 107 struct GNUNET_IDENTITY_PrivateKey privkey;
108 108
109 109
110 GNUNET_CRYPTO_ecdsa_key_create (&privkey); 110 privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
111 GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
111 /* get public key */ 112 /* get public key */
112 GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, 113 GNUNET_IDENTITY_key_get_public (&privkey,
113 &pubkey); 114 &pubkey);
114 115
115 /* test query derivation */ 116 /* test query derivation */
116 GNUNET_GNSRECORD_query_from_private_key (&privkey, 117 GNUNET_GNSRECORD_query_from_private_key (&privkey,