gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: REST: Conditionally compile jose depende


From: gnunet
Subject: [gnunet] branch master updated: REST: Conditionally compile jose dependency
Date: Fri, 20 Oct 2023 08:01:56 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 54054eab1 REST: Conditionally compile jose dependency
54054eab1 is described below

commit 54054eab14a8d840a5646a40bd508ff7ff7870e2
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Oct 20 08:01:52 2023 +0200

    REST: Conditionally compile jose dependency
---
 src/service/rest/Makefile.am          | 13 ++++++++++---
 src/service/rest/gnunet-rest-server.c |  8 ++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/service/rest/Makefile.am b/src/service/rest/Makefile.am
index 7cc85aa71..60769e366 100644
--- a/src/service/rest/Makefile.am
+++ b/src/service/rest/Makefile.am
@@ -24,6 +24,13 @@ libexec_PROGRAMS = \
 EXTRA_DIST = \
  rest.conf
 
+if HAVE_JOSE
+OPENID_PLUGIN = \
+ openid_plugin.c \
+ oidc_helper.c
+OPENID_JOSE_LIBS = -ljose
+endif
+
 gnunet_rest_server_SOURCES = \
  gnunet-rest-server.c \
  config_plugin.c \
@@ -31,19 +38,19 @@ gnunet_rest_server_SOURCES = \
  identity_plugin.c \
  namestore_plugin.c \
  gns_plugin.c \
- openid_plugin.c \
- oidc_helper.c \
+ $(OPENID_PLUGIN) \
  reclaim_plugin.c json_reclaim.c
 gnunet_rest_server_LDADD = \
   $(top_builddir)/src/lib/util/libgnunetutil.la \
   $(top_builddir)/src/lib/json/libgnunetjson.la \
+  $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \
   $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecordjson.la \
   $(top_builddir)/src/service/identity/libgnunetidentity.la \
   $(top_builddir)/src/service/namestore/libgnunetnamestore.la \
   $(top_builddir)/src/service/gns/libgnunetgns.la \
   $(top_builddir)/src/service/reclaim/libgnunetreclaim.la \
   libgnunetrest.la \
-       -ljose \
+       $(OPENID_JOSE_LIBS) \
        -ljansson \
        $(LIBGCRYPT_LIBS) \
   $(GN_LIBINTL) $(MHD_LIBS)
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 @@
 #include "identity_plugin.h"
 #include "namestore_plugin.h"
 #include "gns_plugin.h"
+#ifdef HAVE_JOSE
 #include "openid_plugin.h"
+#endif
 #include "reclaim_plugin.h"
 
 /**
@@ -263,7 +265,9 @@ struct GNUNET_REST_Plugin *copying_plugin;
 struct GNUNET_REST_Plugin *identity_plugin;
 struct GNUNET_REST_Plugin *namestore_plugin;
 struct GNUNET_REST_Plugin *gns_plugin;
+#ifdef HAVE_JOSE
 struct GNUNET_REST_Plugin *openid_plugin;
+#endif
 struct GNUNET_REST_Plugin *reclaim_plugin;
 
 /* ************************* Global helpers ********************* */
@@ -1016,7 +1020,9 @@ do_shutdown (void *cls)
   REST_copying_done (copying_plugin);
   REST_identity_done (identity_plugin);
   REST_gns_done (gns_plugin);
+#ifdef HAVE_JOSE
   REST_openid_done (openid_plugin);
+#endif
   REST_reclaim_done (reclaim_plugin);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n");
   kill_httpd ();
@@ -1397,11 +1403,13 @@ run (void *cls,
   {
     GNUNET_SCHEDULER_shutdown ();
   }
+#ifdef HAVE_JOSE
   struct GNUNET_REST_Plugin *openid_plugin = REST_openid_init (cfg);
   if (GNUNET_OK != setup_plugin (openid_plugin->name, 
&REST_openid_process_request, openid_plugin))
   {
     GNUNET_SCHEDULER_shutdown ();
   }
+#endif
   struct GNUNET_REST_Plugin *reclaim_plugin = REST_reclaim_init (cfg);
   if (GNUNET_OK != setup_plugin (reclaim_plugin->name, 
&REST_reclaim_process_request, reclaim_plugin))
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]