Skip to content

riptideslabs/libsigv4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS SigV4 C Library

Build

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.

Features

  • 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

Building

Prerequisites

  • GCC or compatible C compiler
  • pkg-config utility
  • OpenSSL for testing, and examples
  • libcheck for testing

Build Instructions

sudo apt install libssl-dev check

To build the shared library and example application, run:

make

This will produce:

  • libsigv4.so: Shared library implementing SigV4
  • example: Example application using the library

Clean Build Artifacts

make clean

Usage

System Header Configurability

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>' ...

Linking

Include the header in your application:

#include "sigv4.h"

Link against the shared library and your selected crypto backend:

-L. -lsigv4 [crypto backend linkage]

Example

See example.c for a usage demonstration.

License

See LICENSE for details.

Contributing

Pull requests and issues are welcome!

Acknowledgments

Special thanks to Shi Bai, who created the original version of this library: https://github.com/sidbai/aws-sigv4-c

About

A highly portable AWS SigV4 C implementation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published