aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index 175967b1e..886a93ad8 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -1056,6 +1056,7 @@ GNUNET_GNSRECORD_query_from_public_key (const struct
1056{ 1056{
1057 char *norm_label; 1057 char *norm_label;
1058 struct GNUNET_IDENTITY_PublicKey pd; 1058 struct GNUNET_IDENTITY_PublicKey pd;
1059 ssize_t pd_len;
1059 1060
1060 norm_label = GNUNET_GNSRECORD_string_normalize (label); 1061 norm_label = GNUNET_GNSRECORD_string_normalize (label);
1061 1062
@@ -1067,8 +1068,10 @@ GNUNET_GNSRECORD_query_from_public_key (const struct
1067 norm_label, 1068 norm_label,
1068 "gns", 1069 "gns",
1069 &pd.ecdsa_key); 1070 &pd.ecdsa_key);
1071 pd_len = GNUNET_IDENTITY_public_key_get_length (&pd);
1072 GNUNET_assert (0 < pd_len);
1070 GNUNET_CRYPTO_hash (&pd, 1073 GNUNET_CRYPTO_hash (&pd,
1071 GNUNET_IDENTITY_public_key_get_length (&pd), 1074 pd_len,
1072 query); 1075 query);
1073 break; 1076 break;
1074 case GNUNET_GNSRECORD_TYPE_EDKEY: 1077 case GNUNET_GNSRECORD_TYPE_EDKEY:
@@ -1077,8 +1080,10 @@ GNUNET_GNSRECORD_query_from_public_key (const struct
1077 norm_label, 1080 norm_label,
1078 "gns", 1081 "gns",
1079 &(pd.eddsa_key)); 1082 &(pd.eddsa_key));
1083 pd_len = GNUNET_IDENTITY_public_key_get_length (&pd);
1084 GNUNET_assert (0 < pd_len);
1080 GNUNET_CRYPTO_hash (&pd, 1085 GNUNET_CRYPTO_hash (&pd,
1081 GNUNET_IDENTITY_public_key_get_length (&pd), 1086 pd_len,
1082 query); 1087 query);
1083 break; 1088 break;
1084 default: 1089 default: