diff options
author | Markus Voggenreiter <Markus.Voggenreiter@tum.de> | 2019-11-08 12:06:54 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-01-13 13:31:05 +0100 |
commit | c0fce9ca75973a646f80372fcc08c059818ba548 (patch) | |
tree | 582ea825f44149594f3031a445f48fad79fa3724 /src/reclaim/plugin_rest_reclaim.c | |
parent | 854dfdf7031a4e06322b592b1c583cb8301afeb4 (diff) | |
download | gnunet-c0fce9ca75973a646f80372fcc08c059818ba548.tar.gz gnunet-c0fce9ca75973a646f80372fcc08c059818ba548.zip |
JWT Plugin, Prepared Ticketing
Diffstat (limited to 'src/reclaim/plugin_rest_reclaim.c')
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 3b3674112..16286444a 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -37,9 +37,6 @@ | |||
37 | #include "gnunet_rest_plugin.h" | 37 | #include "gnunet_rest_plugin.h" |
38 | #include "gnunet_signatures.h" | 38 | #include "gnunet_signatures.h" |
39 | #include "json_reclaim.h" | 39 | #include "json_reclaim.h" |
40 | #include <openssl/bio.h> | ||
41 | #include <openssl/evp.h> | ||
42 | |||
43 | /** | 40 | /** |
44 | * REST root namespace | 41 | * REST root namespace |
45 | */ | 42 | */ |
@@ -1199,26 +1196,6 @@ parse_jwt (const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, | |||
1199 | jwt_body = strtok (NULL, delim); | 1196 | jwt_body = strtok (NULL, delim); |
1200 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "JWT Body: %s\n", | 1197 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "JWT Body: %s\n", |
1201 | jwt_body); | 1198 | jwt_body); |
1202 | /*const char* jwt_base64 = jwt_body; | ||
1203 | //No padding assumed | ||
1204 | int jwt_len = (strlen(jwt_base64)*3)/4; | ||
1205 | BIO *bio, *b64; | ||
1206 | decoded_jwt = (char *) malloc(jwt_len + 1); | ||
1207 | |||
1208 | decoded_jwt[jwt_len] = '\0'; | ||
1209 | |||
1210 | bio = BIO_new_mem_buf(jwt_base64, -1); | ||
1211 | b64 = BIO_new(BIO_f_base64()); | ||
1212 | bio = BIO_push(b64, bio); | ||
1213 | BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL); | ||
1214 | /**length = BIO_read(bio, *buffer, strlen(jwt_base64)); | ||
1215 | assert(*length == jwt_len); //length should equal jwt_len, else something went horribly wrong | ||
1216 | |||
1217 | BIO_free_all(bio); | ||
1218 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsed JWT Body: %s\n", | ||
1219 | decoded_jwt); | ||
1220 | */ | ||
1221 | |||
1222 | 1199 | ||
1223 | val_str = "String from JWT, which is stored under claim"; | 1200 | val_str = "String from JWT, which is stored under claim"; |
1224 | type_str = "String"; | 1201 | type_str = "String"; |