diff --git a/BUILD b/BUILD
deleted file mode 100644
index c8f0035..0000000
--- a/BUILD
+++ /dev/null
@@ -1,30 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-package(default_visibility = ["//visibility:public"])
-
-exports_files(["LICENSE"])
-
-cc_library(
- name = "jwt_verify_lib",
- srcs = [
- "src/check_audience.cc",
- "src/jwks.cc",
- "src/jwt.cc",
- "src/status.cc",
- "src/struct_utils.h",
- "src/verify.cc",
- ],
- hdrs = [
- "jwt_verify_lib/check_audience.h",
- "jwt_verify_lib/jwks.h",
- "jwt_verify_lib/jwt.h",
- "jwt_verify_lib/status.h",
- "jwt_verify_lib/verify.h",
- ],
- deps = [
- "@abseil_strings//:abseil_strings",
- "@abseil_time//:abseil_time",
- "@openssl//:openssl-lib",
- "//external:protobuf",
- ],
-)
diff --git a/WORKSPACE b/WORKSPACE
deleted file mode 100644
index 3e30454..0000000
--- a/WORKSPACE
+++ /dev/null
@@ -1,55 +0,0 @@
-local_repository(
- name = "com_google_protobuf",
- path = "/usr/src/protobuf",
-)
-bind(
- name = "protobuf",
- actual = "@com_google_protobuf//:protobuf",
-)
-
-local_repository(
- name = "bazel_skylib",
- path = "/usr/src/bazel-skylib",
-)
-
-new_local_repository(
- name = "openssl",
- path = "/usr/lib64/",
- build_file = "openssl.BUILD",
-)
-
-new_local_repository(
- name = "abseil_strings",
- path = "/usr/lib64/",
- build_file = "abseil_strings.BUILD",
-)
-
-new_local_repository(
- name = "abseil_time",
- path = "/usr/lib64/",
- build_file = "abseil_time.BUILD",
-)
-
-new_local_repository(
- name = "bssl_wrapper_lib",
- path = "/usr/lib64/",
- build_file = "bsslwrapper.BUILD",
-)
-
-new_local_repository(
- name = "googletest",
- path = "/usr/lib64/",
- build_file = "googletest.BUILD",
-)
-
-new_local_repository(
- name = "opensslcbs",
- path = "/usr/lib64/",
- build_file = "opensslcbs.BUILD",
-)
-
-new_local_repository(
- name = "zlib",
- path = "/usr/lib64",
- build_file = "zlib.BUILD",
-)
diff --git a/_service b/_service
index 81876ce..2abef62 100644
--- a/_service
+++ b/_service
@@ -5,7 +5,7 @@
enable
jwt_verify_lib
%cd
- 0f14d43f20381cfae0469cb2309b2e220c0f0ea3
+ 2866385faa2508a11071d075f788172b3f3bd27f
https://github.com/Maistra/jwt-verify-lib-openssl
@@ -13,11 +13,10 @@
disable
jwt-verify-lib-openssl
%cd
- 55dba200857b7c50d82336d38d556be5807d39b6
+ maistra-1.1
*.tar
xz
-
diff --git a/_servicedata b/_servicedata
index 66f6945..8183ddf 100644
--- a/_servicedata
+++ b/_servicedata
@@ -1,4 +1,4 @@
https://github.com/google/jwt_verify_lib
- c2a793f4c5c019199dbd7902a48fee07c252664b
\ No newline at end of file
+ 5552dbc736a25da7e264b260d5ba3cedc33a71f8
\ No newline at end of file
diff --git a/abseil_strings.BUILD b/abseil_strings.BUILD
deleted file mode 100644
index 5ffd00b..0000000
--- a/abseil_strings.BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-cc_library(
- name = "abseil_strings",
- hdrs = glob(["thirdparty_build/include/absl/**/*.h"]),
- copts = ["-I/usr/include/absl"],
- linkopts = [
- "-labsl_base_libbase",
- "-labsl_base_libthrow_delegate",
- "-labsl_strings_libinternal",
- "-labsl_strings_libstr_format_internal",
- "-labsl_strings_libstrings",
- ],
- visibility = ["//visibility:public"],
- linkstatic=False,
-)
diff --git a/abseil_time.BUILD b/abseil_time.BUILD
deleted file mode 100644
index 00b8c18..0000000
--- a/abseil_time.BUILD
+++ /dev/null
@@ -1,18 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-cc_library(
- name = "abseil_time",
- hdrs = glob(["thirdparty_build/include/absl/**/*.h"]),
- copts = ["-I/usr/include/absl"],
- linkopts = [
- "-labsl_base_libbase",
- "-labsl_base_libspinlock_wait",
- "-labsl_numeric_libint128",
- "-labsl_time_internal_cctz_libcivil_time",
- "-labsl_time_internal_cctz_libtime_zone",
- "-labsl_time_libtest_util",
- "-labsl_time_libtime",
- ],
- visibility = ["//visibility:public"],
- linkstatic=False,
-)
diff --git a/bsslwrapper.BUILD b/bsslwrapper.BUILD
deleted file mode 100644
index f103753..0000000
--- a/bsslwrapper.BUILD
+++ /dev/null
@@ -1,12 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-cc_library(
- name = "bssl_wrapper_lib",
- hdrs = glob(["thirdparty_build/include/bssl_wrapper/**/*.h"]),
- copts = ["-I/usr/include/bssl_wrapper"],
- linkopts = [
- "-lbssl_wrapper_lib",
- ],
- visibility = ["//visibility:public"],
- linkstatic=False,
-)
diff --git a/googletest.BUILD b/googletest.BUILD
deleted file mode 100644
index feab935..0000000
--- a/googletest.BUILD
+++ /dev/null
@@ -1,18 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-cc_library(
- name = "googletest",
- hdrs = glob([
- "thirdparty_build/include/gmock/**/*.h",
- "thirdparty_build/include/gtest/**/*.h",
- ]),
- copts = ["-I/usr/include/gtest"],
- linkopts = [
- "-lgmock",
- "-lgmock_main",
- "-lgtest",
- "-lgtest_main",
- ],
- visibility = ["//visibility:public"],
- linkstatic=False,
-)
diff --git a/jwt-verify-lib-openssl-20190723.tar.xz b/jwt-verify-lib-openssl-20190723.tar.xz
deleted file mode 100644
index bef95ae..0000000
--- a/jwt-verify-lib-openssl-20190723.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:142c7b9a28725102338162d3ee28c2ebd43b49dedccef7de978d01cad95b78ea
-size 10252
diff --git a/jwt-verify-lib-openssl-20190806.tar.xz b/jwt-verify-lib-openssl-20190806.tar.xz
new file mode 100644
index 0000000..f7133bd
--- /dev/null
+++ b/jwt-verify-lib-openssl-20190806.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:470181419a0f2c86fb49d55b424fbe1e526c79666e3a49036878aa0ff06c634b
+size 10256
diff --git a/jwt_verify_lib-20190708.tar.xz b/jwt_verify_lib-20190708.tar.xz
deleted file mode 100644
index 8fc0f5b..0000000
--- a/jwt_verify_lib-20190708.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e019232f3db87c1d22fc47bfe176169176031e559c5952738f576ba8aa762c91
-size 27136
diff --git a/jwt_verify_lib-20190909.tar.xz b/jwt_verify_lib-20190909.tar.xz
new file mode 100644
index 0000000..4bebfee
--- /dev/null
+++ b/jwt_verify_lib-20190909.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3b9538767925a177d7e536d69f3b9f8adef76b6f1bb0e1395ad1724f1b15ca75
+size 27648
diff --git a/jwt_verify_lib.changes b/jwt_verify_lib.changes
index 476e244..68bf634 100644
--- a/jwt_verify_lib.changes
+++ b/jwt_verify_lib.changes
@@ -1,3 +1,18 @@
+-------------------------------------------------------------------
+Fri Sep 20 13:06:47 UTC 2019 - mrostecki@opensuse.org
+
+- Update to version 20190909:
+ * bazel: Update protobuf to 3.9.1
+ * Fixed code formatting
+ * Exposing struct_utils for accessing custom JWT fields
+ * Implement RS384/RS512 token verification
+ * Add tests for RS384 and RS512 tokens
+ * Harden JwkRSA verification code
+ * Reduce fuzz truncate case
+ * Fix verify_time_test
+ * one more uint64
+ * one more uint64_t
+
-------------------------------------------------------------------
Thu Aug 01 11:20:17 UTC 2019 - mrostecki@opensuse.org
diff --git a/jwt_verify_lib.spec b/jwt_verify_lib.spec
index f606026..aca10a4 100644
--- a/jwt_verify_lib.spec
+++ b/jwt_verify_lib.spec
@@ -19,10 +19,10 @@
%define sover 0
%define libname lib%{name}%{sover}
%define maistra_name jwt-verify-lib-openssl
-%define maistra_version 20190723
+%define maistra_version 20190806
Name: jwt_verify_lib
-Version: 20190708
+Version: 20190909
Release: 0
Summary: JSON Web Tokens verification library for C++
License: Apache-2.0
@@ -30,17 +30,13 @@ Group: Development/Libraries/C and C++
Url: https://github.com/google/%{name}
Source0: %{name}-%{version}.tar.xz
Source1: %{maistra_name}-%{maistra_version}.tar.xz
-Source100: WORKSPACE
-Source101: BUILD
-Source200: abseil_strings.BUILD
-Source201: abseil_time.BUILD
-Source202: bsslwrapper.BUILD
-Source203: googletest.BUILD
-Source204: opensslcbs.BUILD
-Source205: zlib.BUILD
-BuildRequires: abseil-cpp-devel
+BuildRequires: abseil-cpp-source
+BuildRequires: bazel-rules-cc-source
+BuildRequires: bazel-rules-java-source
+BuildRequires: bazel-rules-proto-source
BuildRequires: bazel-skylib-source
-BuildRequires: bazel0.19
+BuildRequires: bazel-workspaces
+BuildRequires: bazel0.29
BuildRequires: bssl_wrapper-devel
BuildRequires: gcc-c++
BuildRequires: gmock
@@ -79,22 +75,16 @@ This package contains development files for jwt_verify_lib.
%prep
%setup -q -D -b 1 -n %{maistra_name}-%{maistra_version}
-
%setup -q
pushd ../%{maistra_name}-%{maistra_version}
+sed -i "s|\"src/struct_utils.h\"|\"jwt_verify_lib/struct_utils.h\"|g" src/jwks.cc
+sed -i "s|\"src/struct_utils.h\"|\"jwt_verify_lib/struct_utils.h\"|g" src/jwt.cc
./openssl.sh ../%{name}-%{version} SSL
popd
-cp %{SOURCE100} .
-cp %{SOURCE101} .
-cp %{SOURCE200} .
-cp %{SOURCE201} .
-cp %{SOURCE202} .
-cp %{SOURCE203} .
-cp %{SOURCE204} .
-cp %{SOURCE205} .
%build
# TODO(mrostecki): Create a macro in bazel package.
+TARGETS=$(bazel query '//... except kind(.*test, //...)')
bazel build \
-c dbg \
--color=no \
@@ -104,10 +94,17 @@ bazel build \
--genrule_strategy=standalone \
--host_javabase=@local_jdk//:jdk \
--linkopt="-Wl,-soname,libjwt_verify_lib.so.%{sover}" \
+ --override_repository="bazel_skylib=/usr/src/bazel-skylib" \
+ --override_repository="com_google_absl=/usr/src/abseil-cpp" \
+ --override_repository="com_google_protobuf=/usr/src/protobuf" \
+ --override_repository="googletest_git=%{_datadir}/bazel-workspaces/googletest" \
+ --override_repository="rules_cc=/usr/src/bazel-rules-cc" \
+ --override_repository="rules_java=/usr/src/bazel-rules-java" \
+ --override_repository="rules_proto=/usr/src/bazel-rules-proto" \
--spawn_strategy=standalone \
--strip=never \
--verbose_failures \
- //...
+ ${TARGETS}
bazel shutdown
%install
diff --git a/opensslcbs.BUILD b/opensslcbs.BUILD
deleted file mode 100644
index 0ffdf7e..0000000
--- a/opensslcbs.BUILD
+++ /dev/null
@@ -1,12 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-cc_library(
- name = "bssl_wrapper_lib",
- hdrs = glob(["thirdparty_build/include/opensslcbs/**/*.h"]),
- copts = ["-I/usr/include/opensslcbs"],
- linkopts = [
- "-lopenssl_cbs_lib",
- ],
- visibility = ["//visibility:public"],
- linkstatic=False,
-)
diff --git a/zlib.BUILD b/zlib.BUILD
deleted file mode 100644
index 03528d7..0000000
--- a/zlib.BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-licenses(["notice"]) # Apache 2
-
-cc_library(
- name = "zlib",
- hdrs = glob([
- "thirdparty_build/include/zconf.h",
- "thirdparty_build/include/zlib.h",
- ]),
- copts = [],
- linkopts = ["-lz"],
- visibility = ["//visibility:public"],
- linkstatic=False,
-)