Skip to content

Commit 56e5182

Browse files
committed
latest codebase
1 parent 55a9e49 commit 56e5182

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7580
-4986
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ doc/Doxyfile
2929
*.out
3030
*.app
3131

32-
# Documentation
32+
# Documentation and Packaging
3333
doc/*.tag
3434
doc/html
3535
doc/latex
36+
cjose.pc
3637

3738
# Tests and logging
3839
test/check_cjose
@@ -41,6 +42,7 @@ test/*.trs
4142

4243
# local edit and ide files
4344
.swp
45+
.*.swp
4446
.tags
4547
*.sublime-project
4648
*.sublime-workspace

AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# cjose Contributors
2+
# Listed alphabetically by surname
3+
4+
Andrew Biggs <[email protected]>
5+
Matthew A. Miller <[email protected]>
6+
Andy Wang <[email protected]>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2015 Cisco Systems, Inc.
3+
Copyright (c) 2014-2016-2015 cjose Authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
SUBDIRS = . include src test doc
1+
SUBDIRS = . include src doc test
2+
3+
pkgconfigdir = $(libdir)/pkgconfig
4+
pkgconfig_DATA = cjose.pc
25

36
doxygen:
47
cd doc && $(MAKE) doxygen

Makefile.in

Lines changed: 101 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Makefile.in generated by automake 1.14.1 from Makefile.am.
1+
# Makefile.in generated by automake 1.15 from Makefile.am.
22
# @configure_input@
33

4-
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
4+
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
55

66
# This Makefile.in is free software; the Free Software Foundation
77
# gives unlimited permission to copy and/or distribute it,
@@ -13,8 +13,19 @@
1313
# PARTICULAR PURPOSE.
1414

1515
@SET_MAKE@
16+
1617
VPATH = @srcdir@
17-
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18+
am__is_gnu_make = { \
19+
if test -z '$(MAKELEVEL)'; then \
20+
false; \
21+
elif test -n '$(MAKE_HOST)'; then \
22+
true; \
23+
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
24+
true; \
25+
else \
26+
false; \
27+
fi; \
28+
}
1829
am__make_running_with_option = \
1930
case $${target_option-} in \
2031
?) ;; \
@@ -78,21 +89,19 @@ POST_UNINSTALL = :
7889
build_triplet = @build@
7990
host_triplet = @host@
8091
subdir = .
81-
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
82-
$(top_srcdir)/configure $(am__configure_deps) \
83-
$(top_srcdir)/include/cjose/version.h.in compile config.guess \
84-
config.sub depcomp install-sh missing ltmain.sh
8592
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8693
am__aclocal_m4_deps = $(top_srcdir)/m4/doxygen.m4 \
8794
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
8895
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
8996
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
9097
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9198
$(ACLOCAL_M4)
99+
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
100+
$(am__configure_deps) $(am__DIST_COMMON)
92101
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
93102
configure.lineno config.status.lineno
94103
mkinstalldirs = $(install_sh) -d
95-
CONFIG_CLEAN_FILES = include/cjose/version.h
104+
CONFIG_CLEAN_FILES = include/cjose/version.h cjose.pc
96105
CONFIG_CLEAN_VPATH_FILES =
97106
AM_V_P = $(am__v_P_@AM_V@)
98107
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -121,6 +130,35 @@ am__can_run_installinfo = \
121130
n|no|NO) false;; \
122131
*) (install-info --version) >/dev/null 2>&1;; \
123132
esac
133+
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
134+
am__vpath_adj = case $$p in \
135+
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
136+
*) f=$$p;; \
137+
esac;
138+
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
139+
am__install_max = 40
140+
am__nobase_strip_setup = \
141+
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
142+
am__nobase_strip = \
143+
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
144+
am__nobase_list = $(am__nobase_strip_setup); \
145+
for p in $$list; do echo "$$p $$p"; done | \
146+
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
147+
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
148+
if (++n[$$2] == $(am__install_max)) \
149+
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
150+
END { for (dir in files) print dir, files[dir] }'
151+
am__base_list = \
152+
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
153+
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
154+
am__uninstall_files_from_dir = { \
155+
test -z "$$files" \
156+
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
157+
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
158+
$(am__cd) "$$dir" && rm -f $$files; }; \
159+
}
160+
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
161+
DATA = $(pkgconfig_DATA)
124162
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
125163
distclean-recursive maintainer-clean-recursive
126164
am__recursive_targets = \
@@ -150,6 +188,9 @@ ETAGS = etags
150188
CTAGS = ctags
151189
CSCOPE = cscope
152190
DIST_SUBDIRS = $(SUBDIRS)
191+
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cjose.pc.in \
192+
$(top_srcdir)/include/cjose/version.h.in AUTHORS compile \
193+
config.guess config.sub depcomp install-sh ltmain.sh missing
153194
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
154195
distdir = $(PACKAGE)-$(VERSION)
155196
top_distdir = $(distdir)
@@ -257,6 +298,7 @@ LIBTOOL = @LIBTOOL@
257298
LIPO = @LIPO@
258299
LN_S = @LN_S@
259300
LTLIBOBJS = @LTLIBOBJS@
301+
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
260302
MAKEINFO = @MAKEINFO@
261303
MANIFEST_TOOL = @MANIFEST_TOOL@
262304
MKDIR_P = @MKDIR_P@
@@ -274,6 +316,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
274316
PACKAGE_URL = @PACKAGE_URL@
275317
PACKAGE_VERSION = @PACKAGE_VERSION@
276318
PATH_SEPARATOR = @PATH_SEPARATOR@
319+
PKG_CONFIG = @PKG_CONFIG@
320+
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
321+
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
277322
RANLIB = @RANLIB@
278323
SED = @SED@
279324
SET_MAKE = @SET_MAKE@
@@ -332,7 +377,9 @@ target_alias = @target_alias@
332377
top_build_prefix = @top_build_prefix@
333378
top_builddir = @top_builddir@
334379
top_srcdir = @top_srcdir@
335-
SUBDIRS = . include src test doc
380+
SUBDIRS = . include src doc test
381+
pkgconfigdir = $(libdir)/pkgconfig
382+
pkgconfig_DATA = cjose.pc
336383
all: all-recursive
337384

338385
.SUFFIXES:
@@ -351,7 +398,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
351398
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
352399
$(am__cd) $(top_srcdir) && \
353400
$(AUTOMAKE) --foreign Makefile
354-
.PRECIOUS: Makefile
355401
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
356402
@case '$?' in \
357403
*config.status*) \
@@ -372,6 +418,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
372418
$(am__aclocal_m4_deps):
373419
include/cjose/version.h: $(top_builddir)/config.status $(top_srcdir)/include/cjose/version.h.in
374420
cd $(top_builddir) && $(SHELL) ./config.status $@
421+
cjose.pc: $(top_builddir)/config.status $(srcdir)/cjose.pc.in
422+
cd $(top_builddir) && $(SHELL) ./config.status $@
375423

376424
mostlyclean-libtool:
377425
-rm -f *.lo
@@ -381,6 +429,27 @@ clean-libtool:
381429

382430
distclean-libtool:
383431
-rm -f libtool config.lt
432+
install-pkgconfigDATA: $(pkgconfig_DATA)
433+
@$(NORMAL_INSTALL)
434+
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
435+
if test -n "$$list"; then \
436+
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
437+
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
438+
fi; \
439+
for p in $$list; do \
440+
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
441+
echo "$$d$$p"; \
442+
done | $(am__base_list) | \
443+
while read files; do \
444+
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
445+
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
446+
done
447+
448+
uninstall-pkgconfigDATA:
449+
@$(NORMAL_UNINSTALL)
450+
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
451+
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
452+
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
384453

385454
# This directory's subdirectories are mostly independent; you can cd
386455
# into them and run 'make' without going through this Makefile.
@@ -569,15 +638,15 @@ dist-xz: distdir
569638
$(am__post_remove_distdir)
570639

571640
dist-tarZ: distdir
572-
@echo WARNING: "Support for shar distribution archives is" \
573-
"deprecated." >&2
641+
@echo WARNING: "Support for distribution archives compressed with" \
642+
"legacy program 'compress' is deprecated." >&2
574643
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
575644
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
576645
$(am__post_remove_distdir)
577646

578647
dist-shar: distdir
579-
@echo WARNING: "Support for distribution archives compressed with" \
580-
"legacy program 'compress' is deprecated." >&2
648+
@echo WARNING: "Support for shar distribution archives is" \
649+
"deprecated." >&2
581650
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
582651
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
583652
$(am__post_remove_distdir)
@@ -613,17 +682,17 @@ distcheck: dist
613682
esac
614683
chmod -R a-w $(distdir)
615684
chmod u+w $(distdir)
616-
mkdir $(distdir)/_build $(distdir)/_inst
685+
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
617686
chmod a-w $(distdir)
618687
test -d $(distdir)/_build || exit 0; \
619688
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
620689
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
621690
&& am__cwd=`pwd` \
622-
&& $(am__cd) $(distdir)/_build \
623-
&& ../configure \
691+
&& $(am__cd) $(distdir)/_build/sub \
692+
&& ../../configure \
624693
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
625694
$(DISTCHECK_CONFIGURE_FLAGS) \
626-
--srcdir=.. --prefix="$$dc_install_base" \
695+
--srcdir=../.. --prefix="$$dc_install_base" \
627696
&& $(MAKE) $(AM_MAKEFLAGS) \
628697
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
629698
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -678,9 +747,12 @@ distcleancheck: distclean
678747
exit 1; } >&2
679748
check-am: all-am
680749
check: check-recursive
681-
all-am: Makefile
750+
all-am: Makefile $(DATA)
682751
installdirs: installdirs-recursive
683752
installdirs-am:
753+
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
754+
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
755+
done
684756
install: install-recursive
685757
install-exec: install-exec-recursive
686758
install-data: install-data-recursive
@@ -733,7 +805,7 @@ info: info-recursive
733805

734806
info-am:
735807

736-
install-data-am:
808+
install-data-am: install-pkgconfigDATA
737809

738810
install-dvi: install-dvi-recursive
739811

@@ -779,7 +851,7 @@ ps: ps-recursive
779851

780852
ps-am:
781853

782-
uninstall-am:
854+
uninstall-am: uninstall-pkgconfigDATA
783855

784856
.MAKE: $(am__recursive_targets) install-am install-strip
785857

@@ -793,11 +865,14 @@ uninstall-am:
793865
install install-am install-data install-data-am install-dvi \
794866
install-dvi-am install-exec install-exec-am install-html \
795867
install-html-am install-info install-info-am install-man \
796-
install-pdf install-pdf-am install-ps install-ps-am \
797-
install-strip installcheck installcheck-am installdirs \
798-
installdirs-am maintainer-clean maintainer-clean-generic \
799-
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
800-
ps ps-am tags tags-am uninstall uninstall-am
868+
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
869+
install-ps-am install-strip installcheck installcheck-am \
870+
installdirs installdirs-am maintainer-clean \
871+
maintainer-clean-generic mostlyclean mostlyclean-generic \
872+
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
873+
uninstall-am uninstall-pkgconfigDATA
874+
875+
.PRECIOUS: Makefile
801876

802877

803878
doxygen:

README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ Implementation of JOSE for C/C++
44

55
## Prerequisites ##
66

7+
*MAC OS X* All of the prerequisites can be installed via [brew](http://brew.sh/).
8+
79
### Build Tools ###
810

11+
* pkg-config (>= 0.20)
912
* GNU Make >= 3.81
1013
* LLVM >= 5.1 or GCC >= 4.5
1114
* Autoconf (>= 2.69)
@@ -17,7 +20,7 @@ Implementation of JOSE for C/C++
1720
### Libraries ###
1821

1922
* OpenSSL >= 1.0.1h (or its API equivalent)
20-
* JSON-C >= 0.12
23+
* Jansson >= 2.7
2124

2225
## Getting Started ##
2326

@@ -30,7 +33,7 @@ As with most autoconf/automake projects:
3033
### Common Options ###
3134

3235
--with-openssl: Specify the location where OpenSSL/CiscoSSL is installed
33-
--with-json-c: Specify the location where JSON-C is installed
36+
--with-jansson: Specify the location where Jansson is installed
3437
--disable-shared: Only build static library
3538

3639
### Debug Mode ###
@@ -72,21 +75,14 @@ in the cflags:
7275

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

75-
### Configure can't find the json-c library.
76-
77-
This has been seen on Mac OSX 10.9 when jose-c has been installed via brew.
78-
A solution is to explicitly include the json-c directory in the configure
79-
command:
78+
### Make fails due to many OpenSSL functions being "deprecated" or missing.
8079

81-
./configure --with-json-c=/usr/local/Cellar/json-c/0.12
80+
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:
8281

83-
### Make fails due to many OpenSSL functions being "deprecated".
82+
./configure --with-openssl=/usr/local/opt/openssl
8483

85-
This has been seen on Mac OSX 10.9 when openssl 1.0.1h has been installed via
86-
brew. A solution is to explicitly include the openssl directory in the
87-
configure command:
84+
### Make fails due to json_* functions missing.
8885

89-
./configure --with-openssl=/usr/local/Cellar/openssl/1.0.1h
86+
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:
9087

91-
(This can of course be combined with the "--with-json-c" parameter described above
92-
when experiencing both issues).
88+
./configure --with-jansson=/usr/local/opt/jansson

0 commit comments

Comments
 (0)