diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-20 08:01:52 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-20 08:01:52 +0200 |
commit | 54054eab14a8d840a5646a40bd508ff7ff7870e2 (patch) | |
tree | bc4c4378f167a65dd0f09519c4144e812d64400b /src/service/rest/gnunet-rest-server.c | |
parent | d69b213b44d049ecfe5221d664a16f78cdb92dc1 (diff) | |
download | gnunet-54054eab14a8d840a5646a40bd508ff7ff7870e2.tar.gz gnunet-54054eab14a8d840a5646a40bd508ff7ff7870e2.zip |
REST: Conditionally compile jose dependency
Diffstat (limited to 'src/service/rest/gnunet-rest-server.c')
-rw-r--r-- | src/service/rest/gnunet-rest-server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/service/rest/gnunet-rest-server.c b/src/service/rest/gnunet-rest-server.c index 59b997efd..ce81704ae 100644 --- a/src/service/rest/gnunet-rest-server.c +++ b/src/service/rest/gnunet-rest-server.c | |||
@@ -34,7 +34,9 @@ | |||
34 | #include "identity_plugin.h" | 34 | #include "identity_plugin.h" |
35 | #include "namestore_plugin.h" | 35 | #include "namestore_plugin.h" |
36 | #include "gns_plugin.h" | 36 | #include "gns_plugin.h" |
37 | #ifdef HAVE_JOSE | ||
37 | #include "openid_plugin.h" | 38 | #include "openid_plugin.h" |
39 | #endif | ||
38 | #include "reclaim_plugin.h" | 40 | #include "reclaim_plugin.h" |
39 | 41 | ||
40 | /** | 42 | /** |
@@ -263,7 +265,9 @@ struct GNUNET_REST_Plugin *copying_plugin; | |||
263 | struct GNUNET_REST_Plugin *identity_plugin; | 265 | struct GNUNET_REST_Plugin *identity_plugin; |
264 | struct GNUNET_REST_Plugin *namestore_plugin; | 266 | struct GNUNET_REST_Plugin *namestore_plugin; |
265 | struct GNUNET_REST_Plugin *gns_plugin; | 267 | struct GNUNET_REST_Plugin *gns_plugin; |
268 | #ifdef HAVE_JOSE | ||
266 | struct GNUNET_REST_Plugin *openid_plugin; | 269 | struct GNUNET_REST_Plugin *openid_plugin; |
270 | #endif | ||
267 | struct GNUNET_REST_Plugin *reclaim_plugin; | 271 | struct GNUNET_REST_Plugin *reclaim_plugin; |
268 | 272 | ||
269 | /* ************************* Global helpers ********************* */ | 273 | /* ************************* Global helpers ********************* */ |
@@ -1016,7 +1020,9 @@ do_shutdown (void *cls) | |||
1016 | REST_copying_done (copying_plugin); | 1020 | REST_copying_done (copying_plugin); |
1017 | REST_identity_done (identity_plugin); | 1021 | REST_identity_done (identity_plugin); |
1018 | REST_gns_done (gns_plugin); | 1022 | REST_gns_done (gns_plugin); |
1023 | #ifdef HAVE_JOSE | ||
1019 | REST_openid_done (openid_plugin); | 1024 | REST_openid_done (openid_plugin); |
1025 | #endif | ||
1020 | REST_reclaim_done (reclaim_plugin); | 1026 | REST_reclaim_done (reclaim_plugin); |
1021 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n"); | 1027 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n"); |
1022 | kill_httpd (); | 1028 | kill_httpd (); |
@@ -1397,11 +1403,13 @@ run (void *cls, | |||
1397 | { | 1403 | { |
1398 | GNUNET_SCHEDULER_shutdown (); | 1404 | GNUNET_SCHEDULER_shutdown (); |
1399 | } | 1405 | } |
1406 | #ifdef HAVE_JOSE | ||
1400 | struct GNUNET_REST_Plugin *openid_plugin = REST_openid_init (cfg); | 1407 | struct GNUNET_REST_Plugin *openid_plugin = REST_openid_init (cfg); |
1401 | if (GNUNET_OK != setup_plugin (openid_plugin->name, &REST_openid_process_request, openid_plugin)) | 1408 | if (GNUNET_OK != setup_plugin (openid_plugin->name, &REST_openid_process_request, openid_plugin)) |
1402 | { | 1409 | { |
1403 | GNUNET_SCHEDULER_shutdown (); | 1410 | GNUNET_SCHEDULER_shutdown (); |
1404 | } | 1411 | } |
1412 | #endif | ||
1405 | struct GNUNET_REST_Plugin *reclaim_plugin = REST_reclaim_init (cfg); | 1413 | struct GNUNET_REST_Plugin *reclaim_plugin = REST_reclaim_init (cfg); |
1406 | if (GNUNET_OK != setup_plugin (reclaim_plugin->name, &REST_reclaim_process_request, reclaim_plugin)) | 1414 | if (GNUNET_OK != setup_plugin (reclaim_plugin->name, &REST_reclaim_process_request, reclaim_plugin)) |
1407 | { | 1415 | { |