diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-20 14:24:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-20 14:24:05 +0000 |
commit | 9e76523b9ad1ad8c1e5386a64cc65389a57f197b (patch) | |
tree | 7bb8a31eb7fcb35f341881a72c35e11461ea46d4 | |
parent | 75c05fb633ba6d7fa2f52d46347db109726cc4b2 (diff) | |
download | gnunet-gtk-9e76523b9ad1ad8c1e5386a64cc65389a57f197b.tar.gz gnunet-gtk-9e76523b9ad1ad8c1e5386a64cc65389a57f197b.zip |
-vpn contains now public key, not hash of public key
-rw-r--r-- | src/namestore/plugin_gtk_namestore_vpn.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/namestore/plugin_gtk_namestore_vpn.c b/src/namestore/plugin_gtk_namestore_vpn.c index 2bd9d025..e5cfa4d1 100644 --- a/src/namestore/plugin_gtk_namestore_vpn.c +++ b/src/namestore/plugin_gtk_namestore_vpn.c | |||
@@ -58,12 +58,12 @@ vpn_load (void *cls, | |||
58 | gchar *n_value, | 58 | gchar *n_value, |
59 | GtkBuilder *builder) | 59 | GtkBuilder *builder) |
60 | { | 60 | { |
61 | char s_peer[103 + 1]; | 61 | char s_peer[53 + 1]; |
62 | char s_serv[253 + 1]; | 62 | char s_serv[253 + 1]; |
63 | unsigned int proto; | 63 | unsigned int proto; |
64 | 64 | ||
65 | if (3 != SSCANF (n_value, | 65 | if (3 != SSCANF (n_value, |
66 | "%u %103s %253s", | 66 | "%u %53s %253s", |
67 | &proto, s_peer, s_serv)) | 67 | &proto, s_peer, s_serv)) |
68 | { | 68 | { |
69 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 69 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -138,14 +138,16 @@ vpn_validate (void *cls, | |||
138 | { | 138 | { |
139 | GtkEditable *entry; | 139 | GtkEditable *entry; |
140 | const gchar *preedit; | 140 | const gchar *preedit; |
141 | struct GNUNET_HashCode hc; | 141 | struct GNUNET_CRYPTO_EddsaPublicKey pk; |
142 | 142 | ||
143 | entry = GTK_EDITABLE (gtk_builder_get_object (builder, | 143 | entry = GTK_EDITABLE (gtk_builder_get_object (builder, |
144 | "edit_dialog_vpn_peer_entry")), | 144 | "edit_dialog_vpn_peer_entry")), |
145 | preedit = gtk_editable_get_chars (entry, 0, -1); | 145 | preedit = gtk_editable_get_chars (entry, 0, -1); |
146 | if ( (NULL == preedit) || | 146 | if ( (NULL == preedit) || |
147 | (GNUNET_OK != | 147 | (GNUNET_OK != |
148 | GNUNET_CRYPTO_hash_from_string (preedit, &hc)) ) | 148 | GNUNET_CRYPTO_eddsa_public_key_from_string (preedit, |
149 | strlen (preedit), | ||
150 | &pk)) ) | ||
149 | return GNUNET_SYSERR; | 151 | return GNUNET_SYSERR; |
150 | return GNUNET_OK; | 152 | return GNUNET_OK; |
151 | } | 153 | } |