* add testing with rsa and a passphrase
* fix name and disable 1.0.2
* enable ctest output on failure
* re-enable test for 1.0.2
* try keys generated with older openssl
* drop 1.0.2 and older since they used a non-standard format for encrypt private keys
* - Added creation of public key from its components
- Split verify function to signature and claims
- Added handling of claims set in json while creating a verifier
* - Added creation of public key from its components
- Split verify function to signature and claims
- Added handling of claims set in json while creating a verifier
* Fixed missing lines
* Added unit tests
* Additional changes
* delete
* refactor free
* remove testing
* align white space
* Update tests/PubKeyTest.cpp
Yes I should have removed it. Used it in testing
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* Add support for 1.0.2
* refactor a bit
* user jwt define for SSL API that is cross-library
* add support for no base64 from jwt
* refactor a bit more
* fixup wolfssl + linters
* missing include for openssl 3
* quick draft of openssl 3 implementation
* linter
* add in a health layer of error handling and memory management
* flip function order
* fix typo
* error tests for openssl
* more all helper tests to one file
* update cmake
* update tests
* more negative test cases
* fixup old api calls depending on version
* linter
* fixup return types
* disable failing tests
* fixup copy passed
* disable more tests
* fixup broke tests
* better error code handling
* test asan with more openssl versions
* fix template render path
* fix cache conflict
running different ubuntu docker images for with different GLIB c and cxx ABIs
* add missing lib to tests
* run both openssl versions with asan
* openssl code always calls new and returns an adress in most cases
so always save the pointer to call free?
* go back to old raw2bn implementation
* Revert "openssl code always calls new and returns an adress in most cases"
This reverts commit 45e85b8c667587236ac3dd255d1450bcf22f5723.
* remove add new tests (needs to be a seperate pr)
* fix jwks verify example + run with asan+lsan
* some extra backwards compat for ssl1.1
* compat rsa keygen
* fixup copy paste
* fix typo
* linter
* wolfssl compat
* compat 1.1.0i
* more compat
since they changed the API with ever version
* linter
* fix 1.1.0
* more compat
* more compat
working on the matrix of wolfssl and libress and 1.1.0
* updated example with hardcoded values
* action to install openssl now sets ENV vars for CMake
https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindOpenSSL.cmake#L233https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variablehttps://gitlab.kitware.com/cmake/cmake/-/issues/24236
* update example to create a valid token
* update asan to latest compiler
* clang tidy
* fix memory leak in openssl 1.1.1
this is theoretically only because of the test code but better safe then sorry
* clang format
* improve docs
* enable one more test
* fix test impl signature
* more test for bio to std::string
* DRY up code with new helper for write_bio_to_string
* fix copy paste + spell checking
* linter
* fix typo
* fix return type
* BIO_get_mem_data is just a define
so fixup error implementation to match
* put extra tests in too many places
its only for certs not just pubkeys
---------
Co-authored-by: ZOHARGO <zohargo@amdocs.com>
Co-authored-by: zgofer1 <zgofer@gmail.com>
* quick poc for Thalhammer#174
* Copy paste
* Rename include/jwt-cpp/traits/traits.h to include/jwt-cpp/traits/danielaparker-jsoncons/traits.h
* Create traits.h
* adding a namespace
* mustache + action to automate defaults generation
since they should always be the same
* fix order
* traits tests should use traits
* playing with header order
to make clang happy
* install all possible traits
switch badge name to sha
* Update CMakeLists.txt
* Update traits.h
* try commenting corrected code
* rm typescript
* make sure to implace edit
* dont comment when no diff
* apply linting
* fixup boost-json traits
* move comment and render to composite action
* actions/github-script does not leave context in the usual spot
* enabled globstar
* make sure to forward inputs
* try using env normally
* fix typo
* pass in linter name correctly
* debug print
* fix linting issues
* more debug printing
* fix linting issues
* fix typpo + more rebug print
* apply linting
* more debug
* try npm install global to be less intrusive
* wip render traits tests
* Update lint.yml
* global install does not work
* Update action.yml
* Update defaults.h
* remove nodejs action poc
* include jsoncons in main test application (for coverage of new files)
* do not exclude json (since it's used by all the traits)
* exclude bundled json libraries
* apply linting
* add jsoncons for coverage testing
* jsoncons set default to a viable version
* exploring ci failure
* Revert "exploring ci failure" it's overlapping symbols
This reverts commit 3d5b7f9f5d4f393f03b84a59557fecdee833c822.
* add missing specialization
* be explicit with the tests
* Create CMakeLists.txt
* Create danielaparker-jsoncons.cpp
* Update lint.yml
* Update traits.yml
* lint
* better access too decoded claims
* more tests on verify
* tweak test
trying to find minimum
* lets enable linting tests
* using env impl for github script
* fix typo
* apply linting
* add boost to the tests (very hacky)
* Update lint.yml
* ceate light boost installer
there is no cmake install anymore so just a blanket copy should do
* remove path requirement
* outline for commit and push linting on comment
* try different webhook target
* more event types
* fix if for more event types
* just a test commit
* Update lint.yml
* Update lint.yml
* Update lint.yml
* Apply automatic changes
* add token
* screw up formatting
* Update lint.yml
* Update lint.yml
* Apply automatic changes
* fix merge conflicts
* missing errors
* playing with globbing
* lint issues
* matrix on comment should give many pushes
* Apply automatic changes
* Update lint.yml
* Apply automatic changes
* Apply automatic changes
* fix rebase
* apply render tests
* Apply automatic changes
* Apply automatic changes
* Delete package-lock.json
* fail linting
* Update .gitignore
* Update lint.yml
* Update lint.yml
* Update lint.yml
* Apply automatic changes
* Update lint.yml
* Update CMakeLists.txt
* refactor boost.json inclusion
- find paths
- compile library
- code coverage
- traits example
* Apply automatic changes
* debug log
* Update action.yml
* debug output
* Update action.yml
* Delete private-boost-json.cpp.in
* Update private-find-boost-json.cmake
* Update CMakeLists.txt
* Update CMakeLists.txt
* Create CMakeLists.txt
* Update boost-json.cpp
* Update boost-json.cpp
* Update boost-json.cpp
* Update boost-json.cpp
* remove old boost tests
* examples to include traits
* fix compilation
* test nlohmann json traits
* linting
* refactor traits to make badges
* try with less expression syntax
* trying single quotes
* advertise traits support
* Update lint.yml
* Update lint.yml
* Update lint.yml
* sync (prince-chrismc/jwt-cpp#16)
* 🔧 Replace RSA related deprecated functions (#189)
* RSA_size() --> EVP_PKEY_size()
* getting rid of deprecated functions in rsa-pss signature creation
* getting rid of deprecated functions in rsa-pss signature verification
* generate_hash not used in pss
* Update lint.yml
* Update lint.yml
* Update lint.yml
Co-authored-by: Marek Klein <kleinmrk@gmail.com>
* Update lint.yml
* make sure to use install `nlohmann-json`
* make action folder match trait names
* add example + badge for kazuho-picojson
* link to new examples
* revert debug code
* dont mix matrix with uses
* fix bad copy paste
* spec interface library so it's no compiled
* fix installer
* fix to interface
* fix example
* attempt 2
* make sure to avoid circular reference
* attempt 3
* white space
* white space
* Update and rename .github/actions/comment-linting/action.yml to .github/actions/process-linting-results/action.yml
* Update lint.yml
* Update action.yml
* Update action.yml
* Update README.md
Co-authored-by: prince-chrismc <prince-chrismc@users.noreply.github.com>
Co-authored-by: Marek Klein <kleinmrk@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
* 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
* 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