From 6e0922fc29b7bf481bf97c6ed269f85eadadd43e Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Mon, 4 Dec 2017 17:48:22 +0100 Subject: [PATCH] -move jwt back into idp --- src/identity-attribute/Makefile.am | 3 +-- src/identity-provider/Makefile.am | 3 ++- src/{identity-attribute => identity-provider}/jwt.c | 2 +- src/include/gnunet_identity_attribute_lib.h | 13 ------------- 4 files changed, 4 insertions(+), 17 deletions(-) rename src/{identity-attribute => identity-provider}/jwt.c (98%) diff --git a/src/identity-attribute/Makefile.am b/src/identity-attribute/Makefile.am index b84ad3492..2c73a443e 100644 --- a/src/identity-attribute/Makefile.am +++ b/src/identity-attribute/Makefile.am @@ -20,8 +20,7 @@ lib_LTLIBRARIES = \ libgnunetidentityattribute.la libgnunetidentityattribute_la_SOURCES = \ - identity_attribute.c \ - jwt.c + identity_attribute.c libgnunetidentityattribute_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(GN_LIBINTL) diff --git a/src/identity-provider/Makefile.am b/src/identity-provider/Makefile.am index 3b072e59d..5c5ddaa57 100644 --- a/src/identity-provider/Makefile.am +++ b/src/identity-provider/Makefile.am @@ -87,7 +87,8 @@ libgnunetidentityprovider_la_LDFLAGS = \ -version-info 0:0:0 libgnunet_plugin_rest_identity_provider_la_SOURCES = \ - plugin_rest_identity_provider.c + plugin_rest_identity_provider.c \ + jwt.c libgnunet_plugin_rest_identity_provider_la_LIBADD = \ $(top_builddir)/src/identity/libgnunetidentity.la \ libgnunetidentityprovider.la \ diff --git a/src/identity-attribute/jwt.c b/src/identity-provider/jwt.c similarity index 98% rename from src/identity-attribute/jwt.c rename to src/identity-provider/jwt.c index 935e0a79d..2f1e3240b 100644 --- a/src/identity-attribute/jwt.c +++ b/src/identity-provider/jwt.c @@ -63,7 +63,7 @@ create_jwt_header(void) * @return a new base64-encoded JWT string. */ char* -GNUNET_IDENTITY_ATTRIBUTE_jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, +jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key) { diff --git a/src/include/gnunet_identity_attribute_lib.h b/src/include/gnunet_identity_attribute_lib.h index 4c765515b..a6c9e1f1c 100644 --- a/src/include/gnunet_identity_attribute_lib.h +++ b/src/include/gnunet_identity_attribute_lib.h @@ -261,19 +261,6 @@ const char* GNUNET_IDENTITY_ATTRIBUTE_number_to_typename (uint32_t type); -/** - * Create a JWT from attributes - * - * @param sub_key the public of the subject - * @param attrs the attribute list - * @param priv_key the key used to sign the JWT - * @return a new base64-encoded JWT string. - */ -char* -GNUNET_IDENTITY_ATTRIBUTE_jwt_create_from_list (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, - const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, - const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key); - #if 0 /* keep Emacsens' auto-indent happy */ { #endif -- 2.25.1