diff options
author | Tristan Schwieren <tristan.schwieren@tum.de> | 2022-01-14 12:28:33 +0100 |
---|---|---|
committer | Tristan Schwieren <tristan.schwieren@tum.de> | 2022-01-14 12:28:33 +0100 |
commit | 6784482e12c2101b63fdfdda458c8d19889a9e3e (patch) | |
tree | 768fd38fab4da66b966d9f1ffa157cd6e6d1d37c | |
parent | 72c767297c768ec062b3eb74b524f3941e585a7d (diff) | |
download | gnunet-6784482e12c2101b63fdfdda458c8d19889a9e3e.tar.gz gnunet-6784482e12c2101b63fdfdda458c8d19889a9e3e.zip |
-w3cvc make fix
-rw-r--r-- | src/reclaim/Makefile.am | 13 | ||||
-rw-r--r-- | src/reclaim/plugin_reclaim_credential_vc.c | 4 | ||||
-rw-r--r-- | src/reclaim/vc_crypto.c (renamed from src/reclaim/libgnunet_reclaim_vc_crypto.c) | 7 | ||||
-rw-r--r-- | src/reclaim/vc_crypto.h (renamed from src/reclaim/libgnunet_reclaim_vc_crypto.h) | 3 |
4 files changed, 10 insertions, 17 deletions
diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am index 8f06282d8..7f66382f8 100644 --- a/src/reclaim/Makefile.am +++ b/src/reclaim/Makefile.am | |||
@@ -15,7 +15,6 @@ REST_PLUGIN = \ | |||
15 | 15 | ||
16 | CREDENTIAL_PLUGIN = \ | 16 | CREDENTIAL_PLUGIN = \ |
17 | libgnunet_plugin_reclaim_credential_jwt.la \ | 17 | libgnunet_plugin_reclaim_credential_jwt.la \ |
18 | libgnunet_reclaim_vc_crypto.la \ | ||
19 | libgnunet_plugin_reclaim_credential_vc.la | 18 | libgnunet_plugin_reclaim_credential_vc.la |
20 | 19 | ||
21 | if HAVE_PABC | 20 | if HAVE_PABC |
@@ -173,20 +172,12 @@ libgnunet_plugin_reclaim_credential_jwt_la_LIBADD = \ | |||
173 | libgnunet_plugin_reclaim_credential_jwt_la_LDFLAGS = \ | 172 | libgnunet_plugin_reclaim_credential_jwt_la_LDFLAGS = \ |
174 | $(GN_PLUGIN_LDFLAGS) | 173 | $(GN_PLUGIN_LDFLAGS) |
175 | 174 | ||
176 | libgnunet_reclaim_vc_crypto_la_SOURCES = \ | ||
177 | libgnunet_reclaim_vc_crypto.c | ||
178 | libgnunet_reclaim_vc_crypto_la_LIBADD = \ | ||
179 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
180 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
181 | -ljansson\ | ||
182 | $(LTLIBINTL) | ||
183 | |||
184 | libgnunet_plugin_reclaim_credential_vc_la_SOURCES = \ | 175 | libgnunet_plugin_reclaim_credential_vc_la_SOURCES = \ |
185 | plugin_reclaim_credential_vc.c | 176 | plugin_reclaim_credential_vc.c \ |
177 | vc_crypto.c | ||
186 | libgnunet_plugin_reclaim_credential_vc_la_LIBADD = \ | 178 | libgnunet_plugin_reclaim_credential_vc_la_LIBADD = \ |
187 | $(top_builddir)/src/util/libgnunetutil.la \ | 179 | $(top_builddir)/src/util/libgnunetutil.la \ |
188 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 180 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
189 | $(top_builddir)/src/reclaim/libgnunetreclaimvccrypto.la \ | ||
190 | libgnunetreclaim.la \ | 181 | libgnunetreclaim.la \ |
191 | -ljansson\ | 182 | -ljansson\ |
192 | $(LTLIBINTL) | 183 | $(LTLIBINTL) |
diff --git a/src/reclaim/plugin_reclaim_credential_vc.c b/src/reclaim/plugin_reclaim_credential_vc.c index 835c42f17..7e87c2ba1 100644 --- a/src/reclaim/plugin_reclaim_credential_vc.c +++ b/src/reclaim/plugin_reclaim_credential_vc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "gnunet_reclaim_plugin.h" | 30 | #include "gnunet_reclaim_plugin.h" |
31 | #include "gnunet_identity_service.h" | 31 | #include "gnunet_identity_service.h" |
32 | #include "gnunet_signatures.h" | 32 | #include "gnunet_signatures.h" |
33 | #include "libgnunet_reclaim_vc_crypto.h" | 33 | #include "vc_crypto.h" |
34 | #include <inttypes.h> | 34 | #include <inttypes.h> |
35 | #include <jansson.h> | 35 | #include <jansson.h> |
36 | 36 | ||
@@ -509,7 +509,7 @@ vc_create_presentation (void *cls, | |||
509 | json_object_set(proof, "verificationMethod", json_string(verification_method)); | 509 | json_object_set(proof, "verificationMethod", json_string(verification_method)); |
510 | json_object_set(root, "proof", proof); | 510 | json_object_set(root, "proof", proof); |
511 | 511 | ||
512 | sig = generate_signature_vp(&root, pk); | 512 | sig = generate_signature_vp(root, pk); |
513 | json_object_set(proof, "signature", json_string(sig)); | 513 | json_object_set(proof, "signature", json_string(sig)); |
514 | 514 | ||
515 | // Encode JSON and append \0 character | 515 | // Encode JSON and append \0 character |
diff --git a/src/reclaim/libgnunet_reclaim_vc_crypto.c b/src/reclaim/vc_crypto.c index 018e9bd93..83b720666 100644 --- a/src/reclaim/libgnunet_reclaim_vc_crypto.c +++ b/src/reclaim/vc_crypto.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * @author Tristan Schwieren | 23 | * @author Tristan Schwieren |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "platform.h" | ||
26 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
27 | #include "gnunet_identity_service.h" | 28 | #include "gnunet_identity_service.h" |
28 | #include "gnunet_signatures.h" | 29 | #include "gnunet_signatures.h" |
@@ -36,7 +37,7 @@ | |||
36 | * @param result The verifiable presentation containing a valid signature is returned | 37 | * @param result The verifiable presentation containing a valid signature is returned |
37 | */ | 38 | */ |
38 | char * | 39 | char * |
39 | generate_signature_vp(json_t ** pres, | 40 | generate_signature_vp(json_t * pres, |
40 | const struct GNUNET_IDENTITY_PrivateKey * pk) | 41 | const struct GNUNET_IDENTITY_PrivateKey * pk) |
41 | { | 42 | { |
42 | // TODO: make sig multibase | 43 | // TODO: make sig multibase |
@@ -59,9 +60,9 @@ generate_signature_vp(json_t ** pres, | |||
59 | 60 | ||
60 | // Add empty signature key-value -> encode json -> delete empty signature key-value | 61 | // Add empty signature key-value -> encode json -> delete empty signature key-value |
61 | // FIXME: Needs a real Canonicalization Scheme | 62 | // FIXME: Needs a real Canonicalization Scheme |
62 | proof = json_object_get(*pres, "proof"); | 63 | proof = json_object_get(pres, "proof"); |
63 | json_object_set(proof, "signature", json_string("")); | 64 | json_object_set(proof, "signature", json_string("")); |
64 | data = json_dumps(*pres, JSON_COMPACT); | 65 | data = json_dumps(pres, JSON_COMPACT); |
65 | json_object_del(proof, "signature"); | 66 | json_object_del(proof, "signature"); |
66 | free(proof); | 67 | free(proof); |
67 | 68 | ||
diff --git a/src/reclaim/libgnunet_reclaim_vc_crypto.h b/src/reclaim/vc_crypto.h index a75ac104d..f74a2f874 100644 --- a/src/reclaim/libgnunet_reclaim_vc_crypto.h +++ b/src/reclaim/vc_crypto.h | |||
@@ -23,6 +23,7 @@ | |||
23 | * @author Tristan Schwieren | 23 | * @author Tristan Schwieren |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "platform.h" | ||
26 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
27 | #include "gnunet_identity_service.h" | 28 | #include "gnunet_identity_service.h" |
28 | #include <jansson.h> | 29 | #include <jansson.h> |
@@ -35,7 +36,7 @@ | |||
35 | * @param result The verifiable presentation containing a valid signature is returned | 36 | * @param result The verifiable presentation containing a valid signature is returned |
36 | */ | 37 | */ |
37 | char * | 38 | char * |
38 | generate_signature_vp(json_t ** pres, | 39 | generate_signature_vp(json_t * pres, |
39 | const struct GNUNET_IDENTITY_PrivateKey * pk); | 40 | const struct GNUNET_IDENTITY_PrivateKey * pk); |
40 | 41 | ||
41 | /** | 42 | /** |