diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-14 08:18:14 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-14 08:18:14 +0100 |
commit | 8052eb6445f29eec791e7c473a15334a66c91141 (patch) | |
tree | 43807435f1689898de04cb44f0ccbc052b807afd /src/credential/gnunet-credential.c | |
parent | 80bdda1c79efb648cb56bdfb63da0c2c0db3ff45 (diff) | |
download | gnunet-8052eb6445f29eec791e7c473a15334a66c91141.tar.gz gnunet-8052eb6445f29eec791e7c473a15334a66c91141.zip |
-fix gns mq; fix serializer
Diffstat (limited to 'src/credential/gnunet-credential.c')
-rw-r--r-- | src/credential/gnunet-credential.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c index 82f0e349c..a728939dc 100644 --- a/src/credential/gnunet-credential.c +++ b/src/credential/gnunet-credential.c | |||
@@ -170,27 +170,18 @@ handle_verify_result (void *cls, | |||
170 | { | 170 | { |
171 | for (i=0;i<d_count;i++) | 171 | for (i=0;i<d_count;i++) |
172 | { | 172 | { |
173 | char iss_attr[dc[i].issuer_attribute_len]; | ||
174 | char* iss_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dc[i].issuer_key); | 173 | char* iss_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dc[i].issuer_key); |
175 | char* sub_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dc[i].subject_key); | 174 | char* sub_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dc[i].subject_key); |
176 | |||
177 | char sub_attr[dc[i].subject_attribute_len]; | ||
178 | memcpy (iss_attr, | ||
179 | dc[i].issuer_attribute, | ||
180 | dc[i].issuer_attribute_len); | ||
181 | iss_attr[dc[i].issuer_attribute_len] = '\0'; | ||
182 | printf ("%s.%s <- ",iss_key, iss_attr); | ||
183 | printf ("%s",sub_key); | ||
184 | if (0 != dc[i].subject_attribute_len) | 175 | if (0 != dc[i].subject_attribute_len) |
185 | { | 176 | { |
186 | memcpy (sub_attr, | 177 | printf ("%s.%s <- %s.%s\n", |
187 | dc[i].subject_attribute, | 178 | iss_key, dc[i].issuer_attribute, |
188 | dc[i].subject_attribute_len); | 179 | sub_key, dc[i].subject_attribute); |
189 | sub_attr[dc[i].subject_attribute_len] = '\0'; | 180 | } else { |
190 | 181 | printf ("%s.%s <- %s\n", | |
191 | printf (".%s",sub_attr); | 182 | iss_key, dc[i].issuer_attribute, |
183 | sub_key); | ||
192 | } | 184 | } |
193 | printf ("\n"); | ||
194 | } | 185 | } |
195 | printf ("Successful.\n"); | 186 | printf ("Successful.\n"); |
196 | } | 187 | } |