Giter Site home page Giter Site logo

traeak / cjose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cisco/cjose

0.0 1.0 0.0 2.15 MB

C library implementing the Javascript Object Signing and Encryption (JOSE)

License: MIT License

Makefile 18.11% Shell 37.64% C 42.00% M4 1.97% Dockerfile 0.28%

cjose's Introduction

cjose

Implementation of JOSE for C/C++

Prerequisites

MAC OS X All of the prerequisites can be installed via brew.

Build Tools

  • pkg-config (>= 0.20)
  • GNU Make >= 3.81
  • LLVM >= 5.1 or GCC >= 4.5
  • Autoconf (>= 2.69)
  • Automake (>= 1.14)
  • libtool (>= 2.4)
  • Check (>= 0.9.4) - unit testing (e.g. check-devel)
  • Doxygen (>= 1.8) - documentation
  • clang-format (= 3.9.0)

Libraries

  • OpenSSL >= 1.0.1h (or its API equivalent)
  • Jansson >= 2.3

Getting Started

As with most autoconf/automake projects:

git clone https://github.com/cisco/cjose.git
cd cjose
./configure && make

Common Options

--with-openssl: Specify the location where OpenSSL/CiscoSSL is installed
--with-jansson: Specify the location where Jansson is installed
--disable-shared: Only build static library

Debug Mode

To compile in debug mode (minimal optimization, active asserts, etc), specify the appropriate CFLAGS as a command-line argument when executing configure:

./configure CFLAGS="-g -O0 -DDEBUG"

Tests

To execute the unit tests:

make test

If successful, the list of checks will be displayed on the console. Otherwise, the file "test/test-suite.log" will list the specific test(s) that failed.

API Docs

To generate Doxygen API documentation:

make doxygen

Which will place the generated documentation in "doc/html".

From Scratch

To rebuild all of the project -- including those files generated by autoconf and automake:

autoreconf --force --install

Troubleshooting

Configure can't find check.h header file.

This has been seen on Mac OSX 10.8 and 10.9 when check has been installed via brew. A solution is to explicitly include the /usr/local/include directory in the cflags:

./configure CFLAGS="-I/usr/local/include"

Make fails due to many OpenSSL functions being "deprecated" or missing.

This has been seen on Mac OSX 10.9 when openssl 1.0.1h or newer has been installed via brew. A solution is to explicitly include the openssl directory in the configure command:

./configure --with-openssl=/usr/local/opt/openssl

Make fails due to json_* functions missing.

This has been seen on Mac OSX 10.9 when Jansson has been installed via brew. A solution is to explicitly include the jansson directory in the configure command:

./configure --with-jansson=/usr/local/opt/jansson

Contributing

Before Submitting PR

  • Run make clang-format
  • Run make test

cjose's People

Contributors

balthorium avatar fluffy avatar jobol avatar linuxwolf avatar psudaemon avatar tsahara avatar veselov avatar zandbelt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.