Skip to content

Commit

Permalink
Merge pull request cisco#42 from panburana/master
Browse files Browse the repository at this point in the history
libEST 2.0 Initial commit
  • Loading branch information
rpb5bnc authored Jul 15, 2016
2 parents 84d4b0a + bf46f00 commit 9c6ef56
Show file tree
Hide file tree
Showing 156 changed files with 29,992 additions and 14,164 deletions.
62 changes: 0 additions & 62 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -97,65 +97,3 @@ Copyright © 1994-2000 World Wide Web Consortium, (Massachusetts Institute of Te
Copyright © 1995 CERN. This product includes computer software created and made available by CERN. This acknowledgment shall be mentioned in full in any product which includes the CERN computer software included herein or parts thereof.
******************************************************************************

******************************************************************************
* openssl license
*
* CiscoEST uses some OpenSSL code in the example server
******************************************************************************
/* Copyright (C) 1995-1998 Eric Young ([email protected])
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young ([email protected]).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson ([email protected]).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young ([email protected])"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson ([email protected])"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/

7 changes: 3 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************
* libcurl license
*
* CiscoEST uses RFC 6125 FQDN logic from libcurl
* libEST uses RFC 6125 FQDN logic from libcurl
******************************************************************************
COPYRIGHT AND PERMISSION NOTICE

Expand Down Expand Up @@ -88,7 +88,7 @@ in this Software without prior written authorization of the copyright holder.
******************************************************************************
* libwww license
*
* CiscoEST uses HTTP header parsing logic from libwww
* libEST uses HTTP header parsing logic from libwww
******************************************************************************
libwww: W3C's implementation of HTTP can be found at: http://www.w3.org/Library/

Expand All @@ -101,7 +101,7 @@ Copyright © 1995 CERN. This product includes computer software created and made
******************************************************************************
* openssl license
*
* CiscoEST uses some OpenSSL code in the example server
* libEST uses some OpenSSL code in the example server
******************************************************************************
/* Copyright (C) 1995-1998 Eric Young ([email protected])
* All rights reserved.
Expand Down Expand Up @@ -159,4 +159,3 @@ Copyright © 1995 CERN. This product includes computer software created and made
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/

4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src java/jni example/client example/client-simple example/server example/proxy
EXTRA_DIST = autogen.sh example/util LICENSE
SUBDIRS = safe_c_stub src java/jni example/client example/client-simple example/server example/proxy
EXTRA_DIST = autogen.sh example/util LICENSE $(srcdir)/build.gradle $(srcdir)/example/build_examples.gradle
73 changes: 46 additions & 27 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

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

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Expand All @@ -14,7 +14,17 @@

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
Expand Down Expand Up @@ -78,23 +88,15 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/version.in COPYING config/compile \
config/config.guess config/config.sub config/depcomp \
config/install-sh config/missing config/ltmain.sh \
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
Expand Down Expand Up @@ -156,6 +158,14 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.in \
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing AUTHORS COPYING ChangeLog INSTALL \
NEWS README config/compile config/config.guess \
config/config.sub config/depcomp config/install-sh \
config/ltmain.sh config/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
Expand Down Expand Up @@ -237,6 +247,8 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
Expand All @@ -255,12 +267,18 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SAFEC_CFLAGS = @SAFEC_CFLAGS@
SAFEC_DIR = @SAFEC_DIR@
SAFEC_LDFLAGS = @SAFEC_LDFLAGS@
SAFEC_STUB_DIR = @SAFEC_STUB_DIR@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL_CFLAGS = @SSL_CFLAGS@
SSL_LDFLAGS = @SSL_LDFLAGS@
STRIP = @STRIP@
URIPARSER_CFLAGS = @URIPARSER_CFLAGS@
URIPARSER_LDFLAGS = @URIPARSER_LDFLAGS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
Expand Down Expand Up @@ -315,14 +333,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src java/jni example/client example/client-simple example/server example/proxy
EXTRA_DIST = autogen.sh example/util LICENSE
SUBDIRS = safe_c_stub src java/jni example/client example/client-simple example/server example/proxy
EXTRA_DIST = autogen.sh example/util LICENSE $(srcdir)/build.gradle $(srcdir)/example/build_examples.gradle
all: all-recursive

.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
Expand All @@ -335,7 +353,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
Expand All @@ -349,9 +366,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck

$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
version: $(top_builddir)/config.status $(srcdir)/version.in
Expand Down Expand Up @@ -553,15 +570,15 @@ dist-xz: distdir
$(am__post_remove_distdir)

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

dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
Expand Down Expand Up @@ -597,17 +614,17 @@ distcheck: dist
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
Expand Down Expand Up @@ -783,6 +800,8 @@ uninstall-am:
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
Expand Down
62 changes: 54 additions & 8 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,73 @@ Directory contents:
/src This directory contains the EST library. The
target built from this directory is libest.a.
/example This directory contains sample code for implementing
an EST client or server.
an application that uses the libEST library.
/test This directory contains unit test code to verify
the libest capabilities.


Getting started
---------------
1. ./configure; make; make install
1. ./configure; make ; make install
2. Descend into the example/server directory and run
the sample EST server. There is a README in this directory
with detailed instructions.
3. Descend into the example/client directory and run
the sample EST client. There is a README in this directory
with detailed instructions.



Getting started - Windows
--------------------------
libEST can be built natively on Windows, but only client
functionality has been explictly tested. libEST uses Gradle for Windows
build automation and the Visual Studio toolchain.

To build using Gradle you must have Visual Studio 2010, 2012, or 2013
and at least Gradle 2.12 on your system. Follow the steps below to
build an EST dll with Gradle:

1. Have OpenSSL built and installed on your Windows system

2. Set the following environment variables to tell the Gradle build script
where to find your installations of OpenSSL and EST

SSL_DIR - must contain an "include" subdirectory for the OpenSSL header files,
a "bin" subdirectory for the OpenSSL dll binaries, and a "lib" subdirectory
for the OpenSSL link files

set SSL_DIR=C:\PathToYourLibraryInstalls\OpenSSL

URIPARSER_DIR - Specify only if path segment support is required. Must contain
an "include" subdirectory for uriparser header files and a "lib"
subdirectory for the uriparser.lib static library file.

set URIPARSER_DIR=C:\PathToYourLibraryInstalls\uriparser

PATH - must contain the path to your Visual Studio 2010/2012/2013 VC bin directory
prior to any other Visual Studio bin directory and the path to
your Gradle executable (which should already be in PATH)

set PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;%PATH%

3. Invoke Gradle:

gradle estReleaseSharedLibrary

The est.dll binary and est.lib link file can then be found at the path below:

build\libs\est\shared\release

To see all build related tasks Gradle can perform for EST, type:

gradle tasks

Cross-compiling
---------------
libest has been cross-compiled for Android, but no testing
libEST has been cross-compiled for Android, but no testing
has been performed. Follow these steps to compile using the
Android NDK:

1. Compile and install OpenSSL for Android.
1. Compile and install OpenSSL for Android. See OpenSSL docs
for details.

2. Set the following environment variables to setup your cross-compile.
This assumes you've installed OpenSSL into /usr/local/OpenSSL-Android:
Expand All @@ -43,7 +86,7 @@ Android NDK:
**Note: you may not need all the CFLAGS values above depending
on your tool chain.

3. Configure libest for cross-compiling and specify the location
3. Configure libEST for cross-compiling and specify the location
of your OpenSSL build:

./configure --with-ssl-dir=/usr/local/OpenSSL-Android \
Expand All @@ -56,3 +99,6 @@ Android NDK:
make
make install




Loading

0 comments on commit 9c6ef56

Please sign in to comment.