diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-21 16:39:55 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-21 16:39:55 +0200 |
commit | 83e924626b78d05693b6b8761c9242259f5f1f0c (patch) | |
tree | bbb4b09c278d417c7f38279aee3b14ca61de62af | |
parent | 62cfdab1c0e5849b2bf4ca3c3f05afe27a5cc9de (diff) | |
download | gnunet-gtk-83e924626b78d05693b6b8761c9242259f5f1f0c.tar.gz gnunet-gtk-83e924626b78d05693b6b8761c9242259f5f1f0c.zip |
fix new identity usage
-rw-r--r-- | src/conversation/gnunet-conversation-gtk_import.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_main-window-search.c | 7 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore-gtk.c | 8 |
3 files changed, 6 insertions, 11 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_import.c b/src/conversation/gnunet-conversation-gtk_import.c index 5f72df04..002a1f71 100644 --- a/src/conversation/gnunet-conversation-gtk_import.c +++ b/src/conversation/gnunet-conversation-gtk_import.c | |||
@@ -154,7 +154,7 @@ GSC_add_contact (const gchar *name, const gchar *address) | |||
154 | { | 154 | { |
155 | type = GNUNET_GNSRECORD_TYPE_PKEY; | 155 | type = GNUNET_GNSRECORD_TYPE_PKEY; |
156 | value = &rvalue; | 156 | value = &rvalue; |
157 | value_size = sizeof (struct GNUNET_IDENTITY_PublicKey); | 157 | value_size = GNUNET_IDENTITY_key_get_length (&rvalue); |
158 | } | 158 | } |
159 | else | 159 | else |
160 | { | 160 | { |
diff --git a/src/fs/gnunet-fs-gtk_main-window-search.c b/src/fs/gnunet-fs-gtk_main-window-search.c index 10209a3d..d23cb656 100644 --- a/src/fs/gnunet-fs-gtk_main-window-search.c +++ b/src/fs/gnunet-fs-gtk_main-window-search.c | |||
@@ -133,11 +133,6 @@ handle_gns_result (void *cls, | |||
133 | { | 133 | { |
134 | if (GNUNET_GNSRECORD_TYPE_PKEY != rd[i].record_type) | 134 | if (GNUNET_GNSRECORD_TYPE_PKEY != rd[i].record_type) |
135 | continue; | 135 | continue; |
136 | if (sizeof (struct GNUNET_IDENTITY_PublicKey) != rd[i].data_size) | ||
137 | { | ||
138 | GNUNET_break_op (0); | ||
139 | continue; | ||
140 | } | ||
141 | uri = GNUNET_FS_uri_sks_create (rd[i].data, sl->keywords); | 136 | uri = GNUNET_FS_uri_sks_create (rd[i].data, sl->keywords); |
142 | search_for_uri (uri, sl->anonymity_level); | 137 | search_for_uri (uri, sl->anonymity_level); |
143 | abort_search_lookup (sl); | 138 | abort_search_lookup (sl); |
@@ -413,7 +408,7 @@ save_pseudonym_with_nick (struct PseuLookupContext *lctx, const char *nick) | |||
413 | /* show the window */ | 408 | /* show the window */ |
414 | gtk_window_present (GTK_WINDOW (lctx->progress_dialog)); | 409 | gtk_window_present (GTK_WINDOW (lctx->progress_dialog)); |
415 | memset (&rd, 0, sizeof (rd)); | 410 | memset (&rd, 0, sizeof (rd)); |
416 | rd.data_size = sizeof (struct GNUNET_IDENTITY_PublicKey); | 411 | rd.data_size = GNUNET_IDENTITY_key_get_length (&lctx->pkey); |
417 | rd.data = &lctx->pkey; | 412 | rd.data = &lctx->pkey; |
418 | rd.flags = GNUNET_GNSRECORD_RF_PRIVATE; | 413 | rd.flags = GNUNET_GNSRECORD_RF_PRIVATE; |
419 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 414 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
diff --git a/src/namestore/gnunet-namestore-gtk.c b/src/namestore/gnunet-namestore-gtk.c index aad4bbd2..15167f31 100644 --- a/src/namestore/gnunet-namestore-gtk.c +++ b/src/namestore/gnunet-namestore-gtk.c | |||
@@ -3126,11 +3126,11 @@ gnunet_namestore_gtk_zone_add_button_clicked_cb (GtkButton *button, | |||
3126 | label = gtk_entry_get_text (entry); | 3126 | label = gtk_entry_get_text (entry); |
3127 | gtk_label_set_markup (status_label, _ ("Creating zone")); | 3127 | gtk_label_set_markup (status_label, _ ("Creating zone")); |
3128 | gtk_widget_set_sensitive (main_window, FALSE); | 3128 | gtk_widget_set_sensitive (main_window, FALSE); |
3129 | iop = GNUNET_IDENTITY_create (identity, | 3129 | iop = GNUNET_IDENTITY_create (identity, |
3130 | label, | 3130 | label, |
3131 | NULL, | 3131 | NULL, |
3132 | GNUNET_IDENTITY_TYPE_ECDSA, | 3132 | GNUNET_IDENTITY_TYPE_ECDSA, |
3133 | &iop_create_cont, | 3133 | &iop_create_cont, |
3134 | NULL); | 3134 | NULL); |
3135 | gtk_entry_set_text (entry, ""); | 3135 | gtk_entry_set_text (entry, ""); |
3136 | } | 3136 | } |