The C JSON Web Token Library +JWK +JWKS
openssl_verify_sha_pem() was allocating a new buffer when doing ec_sig and was not freeing it. Signed-off-by: Ben Collins <bcollins@libjwt.io> |
||
---|---|---|
.github/workflows | ||
cmake | ||
doxygen | ||
images | ||
include | ||
libjwt | ||
tests | ||
tools | ||
.gitignore | ||
CMakeLists.txt | ||
LICENSE | ||
README.md |
Warning
Version 3 of LibJWT is a complete overhaul of the code. Please see documentation for usage.
💡 Supported Standards
Standard | RFC | Description |
---|---|---|
JWS |
📄 RFC-7515 | JSON Web Signature |
JWE |
📄 RFC-7516 | JSON Web Encryption |
JWK |
📄 RFC-7517 | JSON Web Keys and Sets |
JWA |
📄 RFC-7518 | JSON Web Algorithms |
JWT |
📄 RFC-7519 | JSON Web Token |
Note
Throughout this documentation you will see links such as the ones above to RFC documents. These are relevant to that particular part of the library and are helpful to understand some of the specific standards that shaped the development of LibJWT.
🚧 Build Prerequisites
Required
Crypto support
- OpenSSL (>= 3.0.0)
- GnuTLS (>= 3.6.0)
- MbedTLS (>= 3.6.0)
Note
OpenSSL is required and used for JWK(S) operations.
Algorithm support matrix
JWS Algorithm alg |
OpenSSL | GnuTLS | MbedTLS |
---|---|---|---|
HS256 HS384 HS512 |
✅ | ✅ | ✅ |
ES256 ES384 ES512 |
✅ | ✅ | ✅ |
RS256 RS384 RS512 |
✅ | ✅ | ✅ |
EdDSA using ED25519 |
✅ | ✅ | ❌ |
EdDSA using ED448 |
✅ | ✅ >= 3.8.8 |
❌ |
PS256 PS384 PS512 |
✅ | ✅ | ✅* |
ES256K |
✅ | ❌ | ✅ |
*
RSASSA-PSS support in MbedTLS depends on Mbed-TLS/TF-PSA-Crypto#154
Optional
- Check Library (>= 0.9.10) for unit testing
- Doxygen (>= 1.13.0) for documentation
📚 Docs and Source
📦 Pre-built Packages
LibJWT is available in most Linux distributions as well as through Homebrew for Linux, macOS, and Windows.
🔨 Build Instructions
With CMake:
$ mkdir build
$ cd build
$ cmake ..
$ make