This project provides a C implementation of AWS Signature Version 4 (SigV4) signing, suitable for use in embedded, kernel, or user-space applications. It includes a shared library and an example application demonstrating usage.
- AWS SigV4 signing for HTTP requests
- No dynamic memory allocations
- Pluggable cryptographic backend integration (not limited to OpenSSL)
- Simple API for integration into C projects (e.g.: X-Amz-Security-Token)
- Supports signing additional headers
- Example usage and tests included
- System header configurability via
SIGV4_SYSTEM_HEADER
- GCC or compatible C compiler
pkg-config
utility- OpenSSL for testing, and examples
- libcheck for testing
sudo apt install libssl-dev check
To build the shared library and example application, run:
make
This will produce:
libsigv4.so
: Shared library implementing SigV4example
: Example application using the library
make clean
You can configure the system header used by the library by defining the macro SIGV4_SYSTEM_HEADER
during compilation. This allows integration with custom or platform-specific headers as needed.
Example:
gcc -DSIGV4_SYSTEM_HEADER='<your_header.h>' ...
Include the header in your application:
#include "sigv4.h"
Link against the shared library and your selected crypto backend:
-L. -lsigv4 [crypto backend linkage]
See example.c
for a usage demonstration.
See LICENSE
for details.
Pull requests and issues are welcome!
Special thanks to Shi Bai, who created the original version of this library: https://github.com/sidbai/aws-sigv4-c