* adding clang-tidy and asan tests
Playing with clang-tidy, we already had the rule removed in #166... running the static analyzer from CMake reproduced the report in many places... I suspect the macro and `new`/`delete` separation clang-tidy is just unable to understand.
Running the problematic examples + tests with the ASAN enabled reported no problems
* Apply suggestions from code review
* Update lint.yml
* applying linting rules
* fix bad rename
* formating
* clang-tidy on jsoncons tests
* and cmake-format to lint
* cmake format improve change detection
* Update lint.yml
* apply linting
* wip boost test
* wip hardcoded just to test
* wip more
* working POC
* trying boost json with c++17
* working boost json standalone with cxx17
* Delete conanfile.txt
* revert some changes to see if they are required
* adding a workflow
* cleanup
* naming convention
* testing for substr on string_type
* trying to test for operator+
* fix check for operator+
* losen std::string requirement (experimental)
* Update .gitignore
Co-authored-by: gerardoprada <gerardoprada@users.noreply.github.com>
Co-authored-by: gerardoprada <gerardoprada@users.noreply.github.com>
No idea how it came in there and it doesn't influence anything as long as both expected and checked
value have the same casing (which they do since we apply it to both).
When both Hash and mgs1Hash parameters match in the _mgf1 equivalent calls,
or mgf1Hash is NULL, we can opt to use the non _mgf1 calls mentioned.
This change will allow wolfssl to be compiled with jwt-cpp.
Co-authored-by: Aydin Arik <aarik@teradici.com>
* update signatures of PEM_write_bio_PUBKEY and PEM_write_bio_X509
* run tests with openssl
* Update .github/workflows/openssl.yml
* fetch openssl from github
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Reworks the verifier to allow for per claim verification functions. This removes the need for special cases in the core verifier and allows users to do advanced verification like deep object inspection or case sensitive/insensitive comparisons.
In addition a dedicated "typ" check has been added.
API Breakage: none
ABI Breakage: verifier
* Add JWKS parsing
* Add more unit-tests, modify get_x5c to return an array per review-comments
* Add accessors for remaining jwk fields
* Apply suggestions from code review
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Co-authored-by: Dominik Thalhammer <dominik@thalhammer.it>
* Changed the JWT_CMAKE_FILES_INSTALL_DIR such that it is found on both Windows and Unix and that it may be configured to something entirely different
* Update cmake.yml
* Update cmake.yml
* Update CMakeLists.txt
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* Update .github/workflows/cmake.yml
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* Update .github/workflows/cmake.yml
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* Update .github/workflows/cmake.yml
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Co-authored-by: Arjen Hoogesteger <arjen.hoogesteger@sweco.nl>
Co-authored-by: Arjen Hoogesteger <65287900+sweco-nlahoo@users.noreply.github.com>
* Update CMakeLists.txt
* Update CMakeLists.txt
* Update traits.yml
* trying different cmake path + debug in actions
* fix typo
* quick test for installing in lib dir
* revert
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* some manual fixes to obtain
* fairly close enough
* whitespace fixes
* add comment
* adding clang format + applied
* add editorconfig (supported natively by github web editor)
* apply linting to project
* clean up CI workflows
* zap vcpkg folder
actual one is here
https://github.com/microsoft/vcpkg/tree/master/ports/jwt-cpp
* adding a logo
* thin the lines in the pluses
* use logo + more links to spec and examples
* Create lint.yml
* apply linting
* initial outline for a jsoncons traits implementation
https://github.com/danielaparker/jsoncon
fix extracted dir
* make sure to set cmake to current directory
* install jwt + pass install prefix
fix bad copy paste
fix filename
* Update JsonconsTest.cpp
* add checks for type alias in object_type
* poc for checking for `cbegin` (begin does not work because of overloads... no sure how compilers do this in for loops
* add checks for begin method
* check for begin const overload
* add missing details to object_type
rm extra update
fix using ctor
* adding missing type trait for pretty print
fix typo
fix type extraction
* fix object wrapper extraction
revet int extraction
* try calling ctor directly
trying a differnt ctor
* trying operator[] with no args (hoping for default ctor)
* adding missing pair to second from it
* dont assume std::pair
more adjustments
* apply constness
* refactor parsing of claims to no longer assume/require std::pair
cherry picking https://github.com/dtiukalov/jwt-cpp/pull/1
* add missing header
* adding missing at functors
* add missing move assignment
fixes
implementing compilers
more indirection
attempt 3
more fixes
more ctors
oen more time
again
* fix serilization
* prefer apt-get for stable cli
* add note about serializationg requirements in readme
* adding call to get decoded claims (this should fail)
* print helpful failure message
* move get claim to traits test that support it
* remove cbegin traits check (not used) replaced with end
* adding count, at, and [] requirements to traits
dont used removed functions
update tests
changed missing claim to return expected ISO exception base type
* remove extra nesting namespace
outline to add libressl testing
add missing arg
fix bad copy paste
adding cmake option for openssl versus libressl
explicit directory
set cmake dirs
used seperate build folder + make directly
trying autotools
download cmake module
typo
link against correct ssl target
force openssl 1.0 API when using libressl
add missing macro
make sure to configure ssl error tests based on ssl lib/version
fix compare on min ssl version
fix compare
adding CMake install support to SSL optional
Make sure to copy fin package module
fix fake install path
Update cmake.yml
Update cmake.yml
Update tests/cmake/libressl-is-used.cpp
jwt header now configures itself for libressl (no externly dep on cmake)
this is acompnaied by a docker image to test libressl with
writing sheild.io json to seperate branch
fix bad syntax
make missing dirs
make sure to not overwrite files
add tables to advertise support
only update on push to master
* exclude any folder prefixed with build
* seeing how far generator expresstion will go
* refactor cmake + outline some tests
* adding missing install destiniation
* rolling back some changes since the workflow was no support by CMake
* adding missing include
* fixing old variable names being used
* using target_compile_definitions instead of options
* correct options for CI + reporting errors for consumer
* using sudo to install
* fix bad variable
* trying CMAKE_PREFIX_PATH
* removing recursive call
* remove options from generators + dedicated exports target
* remove pthread link lib (unused)
* install targets files + include
* add missing main
* remove install prefix
* revive CMAKE_PREFIX_PATH it's really needed
* fix collision on DISABLE_BASE64 + more cmake tests
* bump cmake version + test minimum
* fix job names
* fix bad replace
* fix bad permissions
* fix install of picojson
* adding missing ifndef and overload for pico and no base64
* linting
* test for version
* trying to find version
* [test] remove semver prerelase from CMake
* fixing some documentation issues
* limit cmake test to only related files
* touch up docs
* making sure new helper supports no base64 mode
* some doc fixes
* Update cmake.yml
* Update .github/workflows/cmake.yml
* Update .gitignore
* Add helper function to convert cert from base64DER to PEM
This is particularly useful when dealing with JWKs x5c claim which
is encoded as base64 DER. With this helper function the client can
convert x5c claim to PEM, which makes it easy to interact with this
library.
* Fixed a build error
`jwt.h` previously depended on the nlohmann JSON library's inclusion of `iso646.h`, which defines the `not` operator.
* Added EdDSA support
https://github.com/Thalhammer/jwt-cpp/issues/79
Disabled EdDSA support when building with OpenSSL <1.1.1. Support for EdDSA came with OpenSSL version 1.1.1, incl. API extensions.
* Fixed build generation for Microsoft Visual Studio
* Fixed MSVC build warnings "hides previous local declaration"
* Fixed narrowing warnings when building with OpenSSL 1.0.2
* Compacted the string buffer initialization code pattern
As per review comment: https://github.com/Thalhammer/jwt-cpp/pull/95#discussion_r462985506
* adding eddsa openssl tests
* adding on mock openssl call as a test
* adding more mock openssl call to test failures
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* Add error_code support to algorithm::verify
* Add error_code support for signing
* Add error_code overloads to verifying
* Fix missing throw
* Improvements
* Remove unused throwing overloads
* Fix test on older gtest
* Found bug and added more testing
* Move exceptions into error namespace
* Initial implementation of openssl tests
* Fix tests for older compilers
* Only enable openssl test on openssl >=1.1
* Add error_code support to algorithm::verify
* Add error_code support for signing
* Add error_code overloads to verifying
* Fix missing throw
* Improvements
* Remove unused throwing overloads
* Fix test on older gtest
* Found bug and added more testing
* Move exceptions into error namespace