Skip to content

Commit

Permalink
Merge pull request #14 from nabbi/revert-13-libjwt_mutissl
Browse files Browse the repository at this point in the history
Revert "Fixes for dev-libs/libjwt and update it to 1.16.0"
  • Loading branch information
nabbi authored Oct 16, 2023
2 parents 50ffd8e + e402f5c commit 7752d45
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 593 deletions.
11 changes: 4 additions & 7 deletions dev-libs/libjwt/Manifest
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
AUX libjwt-1.13.1_multi_ssl_atools.patch 8254 BLAKE2B bc0bdc851ff40e5cc92feb8e09d1f853f639a071a3bf5f0933c3704525ea70828227197f996fa9bce7aa61b66e347edb4ce0c1f832fb92657528741efbaf8b8d SHA512 ba1a06a003206abd316368e39b0a6ce6049dae3af0b98ca7c05a6bb7a483b4068b2644584a43252af723be9e09cf8e863e74eb1bedbcb850abe0a7643b7ce26e
AUX libjwt-1.15.3_multi_ssl_atools.patch 11660 BLAKE2B 62046f64feca25e5f3ea49bbe650964f38b5185669f320f05f4ae519e54a0300427b481e80d2ca45a0064c30986a6bcd43d4c6ad0b327c0de35d1eee973b2bf7 SHA512 4c7c69b53a62fb3c35c0f008d17ff3391eebc7ae38dee0130bce3080595ecf9ae812cdb50dcd497c40705d023506da5844190f874cb99a82802342ad76cd8bac
AUX libjwt-1.16.0_multi_ssl_atools.patch 11908 BLAKE2B 683b4ec384191349954ab5dc2c8f7d31a641fc78cfb9041243ae61d6a68083896af7066ecbca49b7234668dee82473dc697f1db7d7a90d8c247e40bdc811ba1b SHA512 22c72fa14056e85c3111725ff3aebd28e3bbd445652e58c2123333252b5998ca78b1ed2487f109570e8cfc82037346feaddaa183d64a043ee2c8e388a4b942a1
AUX libjwt-1.15.3_multi_ssl_atools.patch 8262 BLAKE2B cb704758d8c99b6fb47644deb5a61d837059588c65fde5f1cf8059036454532e33417d6e2d079181d2d90acf2725fb256775b19c58ff3bebaf6e7cc2abb31ac0 SHA512 510b56cfcf8f9927743b4f3f7eb32f62b1e6b880bf21b3f46746b3c55e758eef24043504a8dfad2d8b9eed0a7b7fa65a086e2f336e147d993a8f22d760a4dfb2
DIST libjwt-1.13.1.tar.gz 107699 BLAKE2B 3b5ef74078a779e35e74924409eb07bcef5f3199e7431fe06f9f47fe5b6853ce8e1c876c3a91f565827c1f732099e6fa029f06fb045675bba922093fc92843c4 SHA512 e2b4a561048dbd57deb784aa6f071e03dd2f77457c702c2e1d479b981e249ca7c9062edcbea57e68ba359c9099ad941cf95d751e9e808c6736553cf1c28d9526
DIST libjwt-1.15.3.tar.gz 108461 BLAKE2B 76b113ba189b23cf254906f85aa16df0a3243554c1930ea8471942072aaa1539814df444e5f1d48693ff5147489b444505358f6bdd84a88928a8ab5f3e036110 SHA512 111052e4a424f3960383ee533503c633b7284e4283e5b50cb8d5ba1fae6012b6f142d58e7230af0ff731329822abc7c3ab551b635b81d1341d3d5025b32dfd9f
DIST libjwt-1.16.0.tar.gz 111514 BLAKE2B 805b0159f22ca64c55c645307219d0ff3ce660a215a9ba6bc4981bfc59c6feb57e7b6040b19c88df617882ab8208be35c51ef0379354ce8088bed23c1c2eba77 SHA512 579ff0ace69ed00b225d49343b84f96bd7a658497c9e875dbaa49b4fa701fb94421556161d2dfa4878ed06320875a929263787fc903e94e63198297ec21260b4
EBUILD libjwt-1.13.1.ebuild 971 BLAKE2B 8155f3b8aa44a7375f29fe9a17f341eea254387e543c8a1632e49f8cfd1ff67bdfe820e69b6461d8d49a7c03b3f40b8221849ad091bc6676d0aed23e7296dcc0 SHA512 ddaf83ddf546c33c564206670598d375cd82d444f9a84fd8a46ae3ab9cffe28b54ff8e3032af0ec6b5049c719967428068faf68f1621f33047ade2ae7e597fe5
EBUILD libjwt-1.15.3.ebuild 1411 BLAKE2B 32b05017463a1ab5a37965f43ba97f4d2349c21e3ca3e262f0613e76fcd0be4e6cb269523c158f9cca3acdb158e7ad33e666a69aad93172688b626d4c3ef799a SHA512 c6747bca47ac4158cc480d2ab94fd9f2ec7f2dd48638cdd1c19a8ea55043024afcfe68f5167856236c1de156f3f877929d94934161c02f2870c6e4e038024dcf
EBUILD libjwt-1.16.0.ebuild 1486 BLAKE2B 531ee7a8c94ae00abc4132eebd5362160d120236dff54260f590df54beab85cc48c2114d4757f89213d6e12fb46de5024fcd752577269de826b36c7a509cd8d2 SHA512 e2cff0edf610d8b5f19a4217b7ca039b0e556f9be0d75c8f58ad826437a50f686c45f4907c66eee4210772b18d49b08c8594cf5889a70b3f91db8f10481bf9e9
EBUILD libjwt-9999.ebuild 1411 BLAKE2B 51d5fbab19d051b89175517bc03943942f37f3239c12ac2ae0cef9858952e9ae06c11e114bded480325e3623030ecc5f3b9a1a7e0eea69a2e17c4a67a9b700aa SHA512 4ed25e43bbcf16e050948b30ca1db3662335daabd3ba12a0cd952b139637e18975d87514f96773d0416e9664a7cc77a7340c551ef726e5d247becb875c6d8374
MISC metadata.xml 795 BLAKE2B 875d52ccac6fa0fdc48e39c36d1b02b620f78163078e510ca95c35b64a48a160e3c92c9705ba1ac8dc968d538d389c7fe27977f289b4136c9040acc8345ca23a SHA512 63841858eaec91a584faa8b59ec6e9b19581b4c27c406adda2c29ef48ca415abe98bf2a05a26be38b3d3c5c91fd6f0492c3a58f94bf38220af02c47da19cdd92
EBUILD libjwt-1.15.3.ebuild 1081 BLAKE2B c62e20d7dec3b42d89dc0738659ed275f0a1bda34607a302aac399f14244228506adbba690b3b0e2c112ecc3b370b8ba7737337c651676a4668c1628d618bf57 SHA512 9f0ace56e5e6e155796c6b423a19d5e8c8e892e578ee9600f33f9a0e2da3e5068c4aa9a3d340d09b0889b35d1c9a91e2cf862971e934a809b7492f8b7d9f61a2
EBUILD libjwt-9999.ebuild 1081 BLAKE2B c62e20d7dec3b42d89dc0738659ed275f0a1bda34607a302aac399f14244228506adbba690b3b0e2c112ecc3b370b8ba7737337c651676a4668c1628d618bf57 SHA512 9f0ace56e5e6e155796c6b423a19d5e8c8e892e578ee9600f33f9a0e2da3e5068c4aa9a3d340d09b0889b35d1c9a91e2cf862971e934a809b7492f8b7d9f61a2
MISC metadata.xml 712 BLAKE2B 688f82f5b406d0840054060181fa0bbd2a1db67b40ca9ed50f3095006820ce58e50d912c04d266d227cfb31198c5cc7aeb4aa5a49ea4723e464655d9eb2df823 SHA512 1f8f131ce51aa8ca13631beb76ba3256f2ccbbd84a745cae01cd8c30e545c4a88d39e8b256497026a85a26f1bb99950cf92d39bb051b6ee3ca3f1ee2c2c52a92
126 changes: 9 additions & 117 deletions dev-libs/libjwt/files/libjwt-1.15.3_multi_ssl_atools.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ default libjwt will default to linking to openssl (if openssl enabled)


diff --git a/configure.ac b/configure.ac
index be848df..3b61e2a 100644
index be848df..1a7ff35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,27 +6,105 @@ LT_INIT([])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([libjwt/config.h])
@@ -8,25 +8,99 @@ AC_CONFIG_HEADERS([libjwt/config.h])

+AC_SUBST([LIBJWT_LTVERSION], [11:0:9])
AC_SUBST([AM_CFLAGS], [-Wall])

-dnl Prefer OpenSSL unless asked to ignore it
Expand Down Expand Up @@ -117,14 +114,11 @@ index be848df..3b61e2a 100644
+ ],
+ [AC_MSG_ERROR([unable to set default ssl library])]
+)
+AM_CONDITIONAL([SSL_DEF_OPENSSL], [test "x$ssl_impl" = "xopenssl"])
+dnl currently unused, for additional ssl implementations
+dnl AM_CONDITIONAL([SSL_DEF_GNUTLS], [test "x$ssl_impl" = "xgnutls"])
+
PKG_CHECK_MODULES([JANSSON], [jansson >= 2.0])
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [true], [true])

@@ -44,6 +122,13 @@ DX_PDF_FEATURE(OFF)
@@ -44,6 +118,13 @@ DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN($PACKAGE_NAME, doxygen.cfg)

Expand All @@ -139,18 +133,10 @@ index be848df..3b61e2a 100644
Makefile
include/Makefile
diff --git a/libjwt/Makefile.am b/libjwt/Makefile.am
index 7621428..b837d53 100644
index 7621428..ad57fb1 100644
--- a/libjwt/Makefile.am
+++ b/libjwt/Makefile.am
@@ -4,17 +4,51 @@ lib_LTLIBRARIES = libjwt.la

libjwt_la_SOURCES = jwt.c base64.c

-if HAVE_OPENSSL
+if SSL_DEF_OPENSSL
libjwt_la_SOURCES += jwt-openssl.c
else
+## SSL_DEF_GNUTLS
@@ -10,11 +10,45 @@ else
libjwt_la_SOURCES += jwt-gnutls.c
endif

Expand All @@ -170,19 +156,19 @@ index 7621428..b837d53 100644
-libjwt_la_CPPFLAGS = -I$(top_srcdir)/include $(OPENSSL_INCLUDES) $(GNUTLS_INCLUDES) $(CODE_COVERAGE_CPPFLAGS) -Wall
-libjwt_la_CFLAGS = $(JANSSON_CFLAGS) $(OPENSSL_CFLAGS) $(GNUTLS_CFLAGS) $(CODE_COVERAGE_CFLAGS) -D_GNU_SOURCE
-libjwt_la_LIBADD = $(JANSSON_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS) $(CODE_COVERAGE_LDFLAGS)
+libjwt_la_LDFLAGS = -version-info $(LIBJWT_LTVERSION) $(SSL_DEF_LDFLAGS) $(JANSSON_LDFLAGS) -no-undefined
+libjwt_la_LDFLAGS = -version-info 11:0:9 $(SSL_DEF_LDFLAGS) $(JANSSON_LDFLAGS) -no-undefined
+libjwt_la_CPPFLAGS = -I$(top_srcdir)/include $(SSL_DEF_INCLUDES) $(CODE_COVERAGE_CPPFLAGS) -Wall
+libjwt_la_CFLAGS = $(JANSSON_CFLAGS) $(SSL_DEF_CFLAGS) $(CODE_COVERAGE_CFLAGS) -D_GNU_SOURCE
+libjwt_la_LIBADD = $(JANSSON_LIBS) $(SSL_DEF_LIBS) $(CODE_COVERAGE_LDFLAGS)
+if MULTI_SSL
+if HAVE_OPENSSL
+libjwt_ossl_la_LDFLAGS = -version-info $(LIBJWT_LTVERSION) $(OPENSSL_LDFLAGS) $(JANSSON_LDFLAGS) -no-undefined
+libjwt_ossl_la_LDFLAGS = -version-info 11:0:9 $(OPENSSL_LDFLAGS) $(JANSSON_LDFLAGS) -no-undefined
+libjwt_ossl_la_CPPFLAGS = -I$(top_srcdir)/include $(OPENSSL_INCLUDES) $(CODE_COVERAGE_CPPFLAGS) -Wall
+libjwt_ossl_la_CFLAGS = $(JANSSON_CFLAGS) $(OPENSSL_CFLAGS) $(CODE_COVERAGE_CFLAGS) -D_GNU_SOURCE
+libjwt_ossl_la_LIBADD = $(JANSSON_LIBS) $(OPENSSL_LIBS) $(CODE_COVERAGE_LDFLAGS)
+endif
+if HAVE_GNUTLS
+libjwt_gnutls_la_LDFLAGS = -version-info $(LIBJWT_LTVERSION) $(GNUTLS_LDFLAGS) $(JANSSON_LDFLAGS) -no-undefined
+libjwt_gnutls_la_LDFLAGS = -version-info 11:0:9 $(GNUTLS_LDFLAGS) $(JANSSON_LDFLAGS) -no-undefined
+libjwt_gnutls_la_CPPFLAGS = -I$(top_srcdir)/include $(GNUTLS_INCLUDES) $(CODE_COVERAGE_CPPFLAGS) -Wall
+libjwt_gnutls_la_CFLAGS = $(JANSSON_CFLAGS) $(GNUTLS_CFLAGS) $(CODE_COVERAGE_CFLAGS) -D_GNU_SOURCE
+libjwt_gnutls_la_LIBADD = $(JANSSON_LIBS) $(GNUTLS_LIBS) $(CODE_COVERAGE_LDFLAGS)
Expand All @@ -199,6 +185,7 @@ index 7621428..b837d53 100644
+pkgconfiglib_DATA += libjwt-gnutls.pc
+endif
+endif
+
diff --git a/libjwt/libjwt-gnutls.pc.in b/libjwt/libjwt-gnutls.pc.in
new file mode 100644
index 0000000..63962ee
Expand Down Expand Up @@ -245,98 +232,3 @@ index 0c81d36..0bb64f4 100644
Libs: -L${libdir} -ljwt
-Libs.private: @JANSSON_LIBS@ @OPENSSL_LIBS@
+Libs.private: @JANSSON_LIBS@ @SSL_DEF_LIBS@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 58860ac..57a6444 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,6 +10,14 @@ TESTS = \
jwt_ec \
jwt_validate

+if MULTI_SSL
+if HAVE_OPENSSL
+include ossl_tests.mk
+endif
+if HAVE_GNUTLS
+include gnutls_tests.mk
+endif
+endif
check_PROGRAMS = $(TESTS)

AM_CPPFLAGS = -I$(top_srcdir)/include
diff --git a/tests/gnutls_tests.mk b/tests/gnutls_tests.mk
new file mode 100644
index 0000000..b16b8ef
--- /dev/null
+++ b/tests/gnutls_tests.mk
@@ -0,0 +1,32 @@
+## for jwttest in $(jwttests)
+## do
+## TESTS += $(sslimpl)_$(jwttest)
+## $(sslimpl)_$(jwttest)_SOURCES = $(jwttest).c
+## $(sslimpl)_$(jwttest)_LDADD = -ljwt-$(sslimpl) $(CHECK_LIBS)
+## done
+
+TESTS += gnutls_jwt_new
+gnutls_jwt_new_SOURCES = jwt_new.c
+gnutls_jwt_new_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_grant
+gnutls_jwt_grant_SOURCES = jwt_grant.c
+gnutls_jwt_grant_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_header
+gnutls_jwt_header_SOURCES = jwt_header.c
+gnutls_jwt_header_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_dump
+gnutls_jwt_dump_SOURCES = jwt_dump.c
+gnutls_jwt_dump_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_encode
+gnutls_jwt_encode_SOURCES = jwt_encode.c
+gnutls_jwt_encode_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_rsa
+gnutls_jwt_rsa_SOURCES = jwt_rsa.c
+gnutls_jwt_rsa_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_ec
+gnutls_jwt_ec_SOURCES = jwt_ec.c
+gnutls_jwt_ec_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+TESTS += gnutls_jwt_validate
+gnutls_jwt_validate_SOURCES = jwt_validate.c
+gnutls_jwt_validate_LDADD = -ljwt-gnutls $(CHECK_LIBS)
+
diff --git a/tests/ossl_tests.mk b/tests/ossl_tests.mk
new file mode 100644
index 0000000..5c360c4
--- /dev/null
+++ b/tests/ossl_tests.mk
@@ -0,0 +1,32 @@
+## for jwttest in $(jwttests)
+## do
+## TESTS += $(sslimpl)_$(jwttest)
+## $(sslimpl)_$(jwttest)_SOURCES = $(jwttest).c
+## $(sslimpl)_$(jwttest)_LDADD = -ljwt-$(sslimpl) $(CHECK_LIBS)
+## done
+
+TESTS += ossl_jwt_new
+ossl_jwt_new_SOURCES = jwt_new.c
+ossl_jwt_new_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_grant
+ossl_jwt_grant_SOURCES = jwt_grant.c
+ossl_jwt_grant_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_header
+ossl_jwt_header_SOURCES = jwt_header.c
+ossl_jwt_header_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_dump
+ossl_jwt_dump_SOURCES = jwt_dump.c
+ossl_jwt_dump_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_encode
+ossl_jwt_encode_SOURCES = jwt_encode.c
+ossl_jwt_encode_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_rsa
+ossl_jwt_rsa_SOURCES = jwt_rsa.c
+ossl_jwt_rsa_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_ec
+ossl_jwt_ec_SOURCES = jwt_ec.c
+ossl_jwt_ec_LDADD = -ljwt-ossl $(CHECK_LIBS)
+TESTS += ossl_jwt_validate
+ossl_jwt_validate_SOURCES = jwt_validate.c
+ossl_jwt_validate_LDADD = -ljwt-ossl $(CHECK_LIBS)
+
Loading

0 comments on commit 7752d45

Please sign in to comment.