Commit graph

115 commits

Author SHA1 Message Date
arunmu-nx
a54fa08a3b #102 Add ES algos also to the exception list
Some checks failed
CMake / build (map[name:MacOSX/11/AppleClang-12.0.5.12050022 os:macos-11 parallel:3 triplet:x64-osx]) (push) Has been cancelled
CMake / build (map[name:Ubuntu/20.04/GCC-9.3.0 os:ubuntu-20.04 parallel:2 triplet:x64-linux]) (push) Has been cancelled
CMake / build (map[name:Windows/2019/MSVC-19.30.30528.0 os:windows-2019 parallel:2 triplet:x64-windows]) (push) Has been cancelled
2025-04-22 18:58:46 +05:30
arunmu-nx
b9528b32eb #102 Prevent Algo confusion attack 2025-04-22 18:49:16 +05:30
Erwan Legrand
2c329d2537 Minimal side-channel fix 2024-02-10 18:45:07 +01:00
Dennis Hezel
735d77cdcf Mark jwt_set::case_compare and std::hash<jwt::string_view> noexcept 2022-05-13 19:21:04 +02:00
Dennis Hezel
6c22d941a0 Fix out-of-bounds access in three_parts. Fix mishandling of non-null terminated string_views in jwt_set::case_compare. Address several conversion and unreachability warnings 2022-05-13 19:13:38 +02:00
BogDan Vatra
6e39899167 Upgrade nlohmann json library to 3.9.1 to fix build issues with gcc 10
- Upgrade json library to https://raw.githubusercontent.com/nlohmann/json/v3.9.1/single_include/nlohmann/json.hpp
- Nuke blob in the process
2021-02-15 13:44:34 +02:00
Jay Freeman (saurik)
5ef903fe33 fix: add new case to AlgorithmErrCategory::message 2020-12-21 20:13:01 +00:00
Arun Muralidharan
128e3da13a
Merge branch 'master' into undefined-macros 2020-12-14 17:41:18 +05:30
Jay Freeman (saurik)
c504f674d1 fix: C preprocessor defaults undefined macros to 0 2020-12-12 19:38:59 +00:00
Jonny Weir
bdec618caa Check LIBRESSL_VERSION_NUMBER only if defined. 2020-11-16 16:53:30 +00:00
Torba, Tamas (U513810)
fa499a9d2c Add LibreSSL version number in algorithms.hpp 2020-11-16 14:33:25 +01:00
Wiebe Cazemier
11cb283483 Clarify public key documentation and errors 2020-07-16 17:29:11 +02:00
Nikita Karatun
20d997dd2f fix: algorithm::NONE string representation capitalized, tests linkage fixes 2020-07-08 16:28:19 +03:00
Arun M
2bb5623d39 explicit constructor initialization for EMap 2020-06-13 12:47:46 +05:30
Arun M
701f4f26c1 merge 2020-06-13 12:40:18 +05:30
Arun M
4752d47592 Deprecated BIO_f_base64 from boringssl #61 2020-06-13 12:39:28 +05:30
Carlos Gomes Martinho
67f3dad16a fix: compilation with visual studio 14 2020-02-24 19:54:37 +01:00
Carlos Gomes Martinho
564e9f8d23 build: add support for conan and make vendored json optional 2020-02-24 10:29:57 +01:00
Andrew Wiik
92cac1ecbd Updated tests and README for RFC Fixes 2020-01-16 00:56:41 -05:00
Andrew Wiik
9624da5e59 Fix parsing of alg claim to be RFC compliant
The alg claim should always be treated as a case-sensitive value
according to the RFC spec which you can find here:

https://tools.ietf.org/html/rfc7515#section-4.1.1.

The same RFC spec also says it must be present, if it is empty
it is not present so it should not be converted to the "none"
algo as the "none" algo is an algorithm and not the absence of
one.

Finally the "none" algorithm as a string should be "none" not
"NONE" according to the IANA register for JWS Signature and
Encryption Algorithms which can be found here:

https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
2020-01-16 00:42:50 -05:00
Lander Noterman
8841837fe4
fix clang-cl build on windows 2019-12-09 09:23:37 +01:00
Christos Stratopoulos
b607c4da9e
Make C++ string_view detection work with MSVC
The existing method to check for support of C++17 `string_view` does not work on MSVC, see [here](https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=vs-2019)

Instead we replace with the [feature test macro](https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros) for `string_view`, which is `__cpp_lib_string_view`. This should work on all platforms and is arguably more precise.
2019-10-31 14:44:19 -04:00
Arun Muralidharan
42fcc915e4
Merge pull request #49 from zxey/cpp17-string-view
Use std::string_view if c+17 is available
2019-10-08 14:24:19 +05:30
Lubos Dolezel
4392f4b538 Fix char signedness in DMap 2019-07-13 20:10:20 +02:00
zxey
a5e5a233b7 Use std::string_view if c+17 is available 2019-06-17 17:31:06 +02:00
Arun M
1e9667ae0d update nlohmann json library 2019-05-31 00:45:35 +05:30
leoTlr
4234eea1bf prevent -Wimplicit-fallthrough= warning with gcc 8.2.1 2019-04-04 00:27:39 +02:00
leoTlr
a3a0d9c0ec prevent -Wunused-parameter warning with gcc 8.2.1 2019-04-04 00:26:54 +02:00
Matt Powley
ff21be2947 '__builtin_unreachable' is not available on Windows
Replaced with macro that inserts Windows equivalent
2019-03-21 12:31:02 +00:00
Huang-Ming Huang
74b7b344c6 Add api to supply secret based on decoded payload 2019-02-16 15:36:12 -06:00
Arun M
1cbc5eb5a5 compile error with master #37 2018-11-20 19:08:08 +05:30
Arun Muralidharan
fe2e06141f
Merge pull request #35 from mhfrantz/issue-33/move-semantics.v1
issue-33: Add test showing how to invoke move ctor
2018-11-02 22:34:22 +05:30
Matt Frantz
1b105f4772 SFINAE guard on jwt_object's universal reference constructor
This allows the move constructor to be preferred in some cases.
2018-11-01 13:28:49 -07:00
Arun M
6e27aa4c86 Merge 2018-10-27 12:08:08 +05:30
Arun M
1e588256f4 Narrowing errors compiling for ARM #36 2018-10-27 12:07:06 +05:30
Matt Eastman
8cb5ea3d5e Fix out of bounds read in base64_decode 2018-10-03 17:24:11 -05:00
Arun M
64de7b6f1d Ptential Fix for VS2015 compile fail #27 2018-10-03 22:07:08 +05:30
Arun M
e5ecca4f38 'str_to_type' has a non-throwing exception specification but can still throw #31 2018-09-29 00:24:08 +05:30
Arun M
129731da56 Add option to remove type fromt he jwt_header #26 2018-08-05 15:10:53 +05:30
Arun M
87dcef903f Why does the existence of a signature algorithm entail a required verification? #24 2018-05-31 20:36:07 +05:30
Arun Muralidharan
b1140707cc
Merge pull request #23 from TheQuantumPhysicist/master
Fixed many warnings that appear due to assert not being executed in release mode.
2018-05-31 09:42:51 +05:30
Samer Afach
bef9e9d553 Fix a major error in error_code category checking implementations.
Errors some times don't throw exceptions due to implementation
differences.
2018-05-31 01:49:47 +02:00
Samer Afach
00343347b2 Fixed many warnings that appear due to assert not being executed in
release mode.
2018-05-30 22:44:38 +02:00
Samer Afach
34fdb34b44 Minor to make the code compile with -pedantic-errors flag in g++ 2018-05-21 14:06:48 +02:00
Samer Afach
a9562500a0 More inline definitions to for header files to avoid double definition
problems.
2018-05-20 02:57:13 +02:00
Samer Afach
22856e9da2 Functions made inline because they're in the header. Otherwise multiple
definition errors will appear when this file is included.
2018-05-20 00:47:37 +02:00
Samer Afach
8ef6d055ae Make it possible to only include base64.hpp without having to include
jwt.hpp by adding missing includes to resolve incomplete types.
2018-05-19 21:38:25 +02:00
Samer Afach
1fcfbaac75 Fix more signed/unsigned warnings. 2018-05-19 19:03:46 +02:00
Samer Afach
e5fc25bbe8 Fixed a few warnings about signed and unsigned comparison. 2018-05-19 16:29:12 +02:00
Arun M
99d041deb9 Some tests don't pass #14 2018-05-18 20:26:06 +05:30