* Add missing include to fix build with OPENSSL_NO_DEPRECATED
Creating and verifying RSA signatures requires some OpenSSL functions
declared in the `openssl/rsa.h` header. When `OPENSSL_NO_DEPRECATED` is
not defined this header gets indirectly included. But with this define
set the function declarations are missing. This commit adds an explicit
include for the file to fix this.
* Remove unused functions in OpenSSLErrorTest
Some functions from OpenSSL redefined in `OpenSSLErrorTest.cpp` use
types that are not available when `OPENSSL_NO_DEPRECATED` is defined.
Since they do not seem to be actually used this commit simply removes
them.
* Test with OPENSSL_NO_DEPRECATED
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* do not use deprecated functions in ecdsa context
* check ecdsa key on creation
* add test
* set compiler flags correctly
* set compiler flags correctly attempt 2
Co-authored-by: Chris McArthur <prince.chrismc@gmail.com>
* 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
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>
* 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
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
* 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