Switch commoncpp2 to ucommon to solve dependency conflicts.

libccrtp was depending on commoncpp2, and have been replaced by a version
depending on ucommon as well.
diff --git a/jni/libucommon/sources/openssl/.deps/cipher.Plo b/jni/libucommon/sources/openssl/.deps/cipher.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/cipher.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/common.Plo b/jni/libucommon/sources/openssl/.deps/common.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/common.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/digest.Plo b/jni/libucommon/sources/openssl/.deps/digest.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/digest.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/hmac.Plo b/jni/libucommon/sources/openssl/.deps/hmac.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/hmac.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/random.Plo b/jni/libucommon/sources/openssl/.deps/random.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/random.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/secure.Plo b/jni/libucommon/sources/openssl/.deps/secure.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/secure.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/ssl.Plo b/jni/libucommon/sources/openssl/.deps/ssl.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/ssl.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/sstream.Plo b/jni/libucommon/sources/openssl/.deps/sstream.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/sstream.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/Makefile b/jni/libucommon/sources/openssl/Makefile
new file mode 100644
index 0000000..32b5c0f
--- /dev/null
+++ b/jni/libucommon/sources/openssl/Makefile
@@ -0,0 +1,701 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# openssl/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = openssl
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/openssl
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/openssl
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+noinst_HEADERS = local.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la   -lrt  -ldl -lpthread -lc -lssl -lcrypto -lz   -lc $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu openssl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu openssl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/cipher.Plo
+include ./$(DEPDIR)/common.Plo
+include ./$(DEPDIR)/digest.Plo
+include ./$(DEPDIR)/hmac.Plo
+include ./$(DEPDIR)/random.Plo
+include ./$(DEPDIR)/secure.Plo
+include ./$(DEPDIR)/ssl.Plo
+include ./$(DEPDIR)/sstream.Plo
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+common.lo: ../nossl/common.cpp
+	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+	$(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
+#	$(AM_V_CXX)source='../nossl/common.cpp' object='common.lo' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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.
+.NOEXPORT:
diff --git a/jni/libucommon/sources/openssl/Makefile.am b/jni/libucommon/sources/openssl/Makefile.am
new file mode 100644
index 0000000..5c8aea6
--- /dev/null
+++ b/jni/libucommon/sources/openssl/Makefile.am
@@ -0,0 +1,22 @@
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+
+noinst_HEADERS = local.h
+
+lib_LTLIBRARIES = libusecure.la
+
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ @OPENSSL_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
diff --git a/jni/libucommon/sources/openssl/Makefile.in b/jni/libucommon/sources/openssl/Makefile.in
new file mode 100644
index 0000000..0f7cedf
--- /dev/null
+++ b/jni/libucommon/sources/openssl/Makefile.in
@@ -0,0 +1,701 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = openssl
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+noinst_HEADERS = local.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ @OPENSSL_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu openssl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu openssl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sstream.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+common.lo: ../nossl/common.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='../nossl/common.cpp' object='common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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.
+.NOEXPORT:
diff --git a/jni/libucommon/sources/openssl/cipher.cpp b/jni/libucommon/sources/openssl/cipher.cpp
new file mode 100644
index 0000000..a43337c
--- /dev/null
+++ b/jni/libucommon/sources/openssl/cipher.cpp
@@ -0,0 +1,200 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+static const unsigned char *_salt = NULL;
+static unsigned _rounds = 1;
+
+void Cipher::Key::assign(const char *text, size_t size)
+{
+    assign(text, size, _salt, _rounds);
+}
+
+void Cipher::Key::options(const unsigned char *salt, unsigned rounds)
+{
+    _salt = salt;
+    _rounds = rounds;
+}
+
+void Cipher::Key::assign(const char *text, size_t size, const unsigned char *salt, unsigned rounds)
+{
+    if(!algotype || !hashtype)
+        return;
+
+    if(!size)
+        size = strlen((const char *)text);
+
+    if(!rounds)
+        rounds = _rounds;
+
+    if(!salt)
+        salt = _salt;
+
+    if(EVP_BytesToKey((const EVP_CIPHER*)algotype, (const EVP_MD*)hashtype, salt, (const unsigned char *)text, size, rounds, keybuf, ivbuf) < (int)keysize)
+        keysize = 0;
+}
+
+void Cipher::Key::set(const char *cipher, const char *digest)
+{
+    set(cipher);
+
+    // never use sha0...
+    if(eq_case(digest, "sha"))
+        digest = "sha1";
+
+    hashtype = EVP_get_digestbyname(digest);
+}
+
+void Cipher::Key::set(const char *cipher)
+{
+    char algoname[64];
+
+    clear();
+    String::set(algoname, sizeof(algoname), cipher);
+    char *fpart = strchr(algoname, '-');
+    char *lpart = strrchr(algoname, '-');
+
+    if(fpart && fpart == lpart)
+        strcpy(fpart, fpart + 1);
+
+    algotype = EVP_get_cipherbyname(algoname);
+
+    if(!algotype)
+        return;
+
+    keysize = EVP_CIPHER_key_length((const EVP_CIPHER*)algotype);
+    blksize = EVP_CIPHER_block_size((const EVP_CIPHER*)algotype);
+}
+
+
+bool Cipher::has(const char *id)
+{
+    // make sure cipher-bitsize forms without -mode do not fail...
+    char algoname[64];
+    String::set(algoname, sizeof(algoname), id);
+    char *fpart = strchr(algoname, '-');
+    char *lpart = strrchr(algoname, '-');
+
+    if(fpart && fpart == lpart)
+        strcpy(fpart, fpart + 1);
+
+    return (EVP_get_cipherbyname(algoname) != NULL);
+}
+
+void Cipher::push(unsigned char *address, size_t size)
+{
+}
+
+void Cipher::release(void)
+{
+    keys.clear();
+    if(context) {
+        EVP_CIPHER_CTX_cleanup((EVP_CIPHER_CTX*)context);
+        delete (EVP_CIPHER_CTX*)context;
+        context = NULL;
+    }
+}
+
+void Cipher::set(key_t key, mode_t mode, unsigned char *address, size_t size)
+{
+    release();
+
+    bufsize = size;
+    bufmode = mode;
+    bufaddr = address;
+
+    memcpy(&keys, key, sizeof(keys));
+    if(!keys.keysize)
+        return;
+
+    context = new EVP_CIPHER_CTX;
+    EVP_CIPHER_CTX_init((EVP_CIPHER_CTX *)context);
+    EVP_CipherInit_ex((EVP_CIPHER_CTX *)context, (EVP_CIPHER *)keys.algotype, NULL, keys.keybuf, keys.ivbuf, (int)mode);
+    EVP_CIPHER_CTX_set_padding((EVP_CIPHER_CTX *)context, 0);
+}
+
+size_t Cipher::put(const unsigned char *data, size_t size)
+{
+    int outlen;
+    size_t count = 0;
+
+    if(!bufaddr)
+        return 0;
+
+    if(size % keys.iosize())
+        return 0;
+
+    while(bufsize && size + bufpos > bufsize) {
+        size_t diff = bufsize - bufpos;
+        count += put(data, diff);
+        data += diff;
+        size -= diff;
+    }
+
+    if(!EVP_CipherUpdate((EVP_CIPHER_CTX *)context, bufaddr + bufpos, &outlen, data, size)) {
+        release();
+        return count;
+    }
+    bufpos += outlen;
+    count += outlen;
+    if(bufsize && bufpos >= bufsize) {
+        push(bufaddr, bufsize);
+        bufpos = 0;
+    }
+    return count;
+}
+
+size_t Cipher::pad(const unsigned char *data, size_t size)
+{
+    size_t padsize = 0;
+    unsigned char padbuf[64];
+    const unsigned char *ep;
+
+    if(!bufaddr)
+        return 0;
+
+    switch(bufmode) {
+    case DECRYPT:
+        if(size % keys.iosize())
+            return 0;
+        put(data, size);
+        ep = data + size - 1;
+        bufpos -= *ep;
+        size -= *ep;
+        break;
+    case ENCRYPT:
+        padsize = size % keys.iosize();
+        put(data, size - padsize);
+        if(padsize) {
+            memcpy(padbuf, data + size - padsize, padsize);
+            memset(padbuf + padsize, keys.iosize() - padsize, keys.iosize() - padsize);
+            size = (size - padsize) + keys.iosize();
+        }
+        else {
+            size += keys.iosize();
+            memset(padbuf, keys.iosize(), keys.iosize());
+        }
+
+        put((const unsigned char *)padbuf, keys.iosize());
+        zerofill(padbuf, sizeof(padbuf));
+    }
+
+    flush();
+    return size;
+}
+
diff --git a/jni/libucommon/sources/openssl/digest.cpp b/jni/libucommon/sources/openssl/digest.cpp
new file mode 100644
index 0000000..f50c189
--- /dev/null
+++ b/jni/libucommon/sources/openssl/digest.cpp
@@ -0,0 +1,133 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+bool Digest::has(const char *id)
+{
+    return (EVP_get_digestbyname(id) != NULL);
+}
+
+void Digest::set(const char *type)
+{
+    secure::init();
+
+    release();
+
+    // never use sha0
+    if(eq_case(type, "sha"))
+        type = "sha1";
+
+    hashtype = (void *)EVP_get_digestbyname(type);
+    if(hashtype) {
+        context = new EVP_MD_CTX;
+        EVP_MD_CTX_init((EVP_MD_CTX *)context);
+        EVP_DigestInit_ex((EVP_MD_CTX *)context, (const EVP_MD *)hashtype, NULL);
+    }
+}
+
+void Digest::release(void)
+{
+    if(context)
+        EVP_MD_CTX_cleanup((EVP_MD_CTX *)context);
+
+    if(context) {
+        delete (EVP_MD_CTX *)context;
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+}
+
+bool Digest::put(const void *address, size_t size)
+{
+    if(!context)
+        return false;
+
+    EVP_DigestUpdate((EVP_MD_CTX *)context, address, size);
+    return true;
+}
+
+void Digest::reset(void)
+{
+    if(!context) {
+        if(hashtype) {
+            context = new EVP_MD_CTX;
+            EVP_MD_CTX_init((EVP_MD_CTX *)context);
+        }
+        else
+            return;
+    }
+
+    EVP_DigestInit_ex((EVP_MD_CTX *)context, (const EVP_MD *)hashtype, NULL);
+    bufsize = 0;
+}
+
+void Digest::recycle(bool bin)
+{
+    unsigned size = bufsize;
+
+    if(!context)
+        return;
+
+    if(!bufsize)
+        EVP_DigestFinal_ex((EVP_MD_CTX *)context, buffer, &size);
+
+    EVP_DigestInit_ex((EVP_MD_CTX *)context, (const EVP_MD *)hashtype, NULL);
+
+    if(bin)
+        EVP_DigestUpdate((EVP_MD_CTX *)context, buffer, size);
+    else {
+        unsigned count = 0;
+        while(count < size) {
+            snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+            ++count;
+        }
+        EVP_DigestUpdate((EVP_MD_CTX *)context, textbuf, size *
+2);
+    }
+    bufsize = 0;
+
+}
+
+const unsigned char *Digest::get(void)
+{
+    unsigned count = 0;
+    unsigned size = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context)
+        return NULL;
+
+    EVP_DigestFinal_ex((EVP_MD_CTX *)context, buffer, &size);
+
+    release();
+
+    bufsize = size;
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
+
diff --git a/jni/libucommon/sources/openssl/hmac.cpp b/jni/libucommon/sources/openssl/hmac.cpp
new file mode 100644
index 0000000..8131ba3
--- /dev/null
+++ b/jni/libucommon/sources/openssl/hmac.cpp
@@ -0,0 +1,91 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+bool HMAC::has(const char *id)
+{
+    return (EVP_get_digestbyname(id) != NULL);
+}
+
+void HMAC::set(const char *digest, const char *key, size_t len)
+{
+    secure::init();
+
+    release();
+
+    if(!len)
+        len = strlen(key);
+
+    hmactype = EVP_get_digestbyname(digest);
+    if(hmactype && len) {
+        context = new HMAC_CTX;
+        HMAC_CTX_init((HMAC_CTX *)context);
+        HMAC_Init((HMAC_CTX *)context, key, len, (const EVP_MD *)hmactype);
+    }
+}
+
+void HMAC::release(void)
+{
+    if(context)
+        HMAC_cleanup((HMAC_CTX *)context);
+
+    if(context) {
+        delete (HMAC_CTX *)context;
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+}
+
+bool HMAC::put(const void *address, size_t size)
+{
+    if(!context)
+        return false;
+
+    HMAC_Update((HMAC_CTX *)context, (const unsigned char *)address, size);
+    return true;
+}
+
+const unsigned char *HMAC::get(void)
+{
+    unsigned count = 0;
+    unsigned size = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context)
+        return NULL;
+
+	HMAC_Final((HMAC_CTX *)context, buffer, &size);
+	release();
+
+	if(!size)
+		return NULL;
+
+    bufsize = size;
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
+
diff --git a/jni/libucommon/sources/openssl/local.h b/jni/libucommon/sources/openssl/local.h
new file mode 100644
index 0000000..b061444
--- /dev/null
+++ b/jni/libucommon/sources/openssl/local.h
@@ -0,0 +1,48 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/ucommon.h>
+#include <ucommon/export.h>
+#include <ucommon/secure.h>
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+#include <openssl/rand.h>
+
+#ifdef  _MSWINDOWS_
+#include <wincrypt.h>
+#endif
+
+#define NAMESPACE_LOCAL namespace __secure__ {
+#define LOCAL_NAMESPACE __secure__
+
+NAMESPACE_LOCAL
+using namespace UCOMMON_NAMESPACE;
+
+class __LOCAL context : public secure
+{
+public:
+    ~context();
+
+    SSL_CTX *ctx;
+};
+
+END_NAMESPACE
+
+using namespace UCOMMON_NAMESPACE;
+using namespace LOCAL_NAMESPACE;
+
diff --git a/jni/libucommon/sources/openssl/random.cpp b/jni/libucommon/sources/openssl/random.cpp
new file mode 100644
index 0000000..85ccf90
--- /dev/null
+++ b/jni/libucommon/sources/openssl/random.cpp
@@ -0,0 +1,59 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+void Random::seed(void)
+{
+    secure::init();
+    RAND_poll();
+}
+
+bool Random::seed(const unsigned char *buf, size_t size)
+{
+    secure::init();
+
+    RAND_seed(buf, size);
+    return true;
+}
+
+size_t Random::key(unsigned char *buf, size_t size)
+{
+    secure::init();
+
+    if(RAND_bytes(buf, size))
+        return size;
+    return 0;
+}
+
+size_t Random::fill(unsigned char *buf, size_t size)
+{
+    secure::init();
+
+    if(RAND_pseudo_bytes(buf, size))
+        return size;
+    return 0;
+}
+
+bool Random::status(void)
+{
+    if(RAND_status())
+        return true;
+
+    return false;
+}
+
diff --git a/jni/libucommon/sources/openssl/secure.cpp b/jni/libucommon/sources/openssl/secure.cpp
new file mode 100644
index 0000000..4fbc661
--- /dev/null
+++ b/jni/libucommon/sources/openssl/secure.cpp
@@ -0,0 +1,206 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#ifdef  HAVE_OPENSSL_FIPS_H
+#include <openssl/fips.h>
+#endif
+
+static mutex_t *private_locks = NULL;
+
+extern "C" {
+    static void ssl_lock(int mode, int n, const char *file, int line)
+    {
+        if((mode & 0x03) == CRYPTO_LOCK)
+            private_locks[n].acquire();
+        else if((mode & 0x03) == CRYPTO_UNLOCK)
+            private_locks[n].release();
+    }
+
+    static unsigned long ssl_self(void)
+    {
+#ifdef  _MSWINDOWS_
+        return GetCurrentThreadId();
+#else
+        return (long)Thread::self();
+#endif
+    }
+}
+
+bool secure::fips(void)
+{
+#ifdef  HAVE_OPENSSL_FIPS_H
+
+    // must always be first init function called...
+    if(private_locks)
+        return false;
+
+    if(!FIPS_mode_set(1))
+        return false;
+
+    return init();
+#else
+    return false;
+#endif
+}
+
+bool secure::init(void)
+{
+    if(private_locks)
+        return true;
+
+    Thread::init();
+    Socket::init();
+
+    SSL_library_init();
+    SSL_load_error_strings();
+    ERR_load_BIO_strings();
+    OpenSSL_add_all_algorithms();
+    OpenSSL_add_all_digests();
+
+    if(CRYPTO_get_id_callback() != NULL)
+        return false;
+
+    private_locks = new Mutex[CRYPTO_num_locks()];
+    CRYPTO_set_id_callback(ssl_self);
+    CRYPTO_set_locking_callback(ssl_lock);
+    return true;
+}
+
+void secure::cipher(secure *scontext, const char *ciphers)
+{
+    context *ctx = (context *)scontext;
+    if(!ctx)
+        return;
+
+    SSL_CTX_set_cipher_list(ctx->ctx, ciphers);
+}
+
+secure::client_t secure::client(const char *ca)
+{
+    context *ctx = new(context);
+    secure::init();
+
+    if(!ctx)
+        return NULL;
+
+    ctx->error = secure::OK;
+
+    ctx->ctx = SSL_CTX_new(SSLv23_client_method());
+
+    if(!ctx->ctx) {
+        ctx->error = secure::INVALID;
+        return ctx;
+    }
+
+    if(!ca)
+        return ctx;
+
+    if(eq(ca, "*"))
+        ca = oscerts();
+
+    if(!SSL_CTX_load_verify_locations(ctx->ctx, ca, 0)) {
+        ctx->error = secure::INVALID_AUTHORITY;
+        return ctx;
+    }
+
+    return ctx;
+}
+
+secure::server_t secure::server(const char *certfile, const char *ca)
+{
+    context *ctx = new(context);
+
+    if(!ctx)
+        return NULL;
+
+    secure::init();
+    ctx->error = secure::OK;
+    ctx->ctx = SSL_CTX_new(SSLv23_server_method());
+
+    if(!ctx->ctx) {
+        ctx->error = secure::INVALID;
+        return ctx;
+    }
+
+    if(!SSL_CTX_use_certificate_chain_file(ctx->ctx, certfile)) {
+        ctx->error = secure::MISSING_CERTIFICATE;
+        return ctx;
+    }
+
+    if(!SSL_CTX_use_PrivateKey_file(ctx->ctx, certfile, SSL_FILETYPE_PEM)) {
+        ctx->error = secure::MISSING_PRIVATEKEY;
+        return ctx;
+    }
+
+    if(!SSL_CTX_check_private_key(ctx->ctx)) {
+        ctx->error = secure::INVALID_CERTIFICATE;
+        return ctx;
+    }
+
+    if(!ca)
+        return ctx;
+
+    if(eq(ca, "*"))
+        ca = oscerts();
+
+    if(!SSL_CTX_load_verify_locations(ctx->ctx, ca, 0)) {
+        ctx->error = secure::INVALID_AUTHORITY;
+        return ctx;
+    }
+
+    return ctx;
+}
+
+secure::error_t secure::verify(session_t session, const char *peername)
+{
+    SSL *ssl = (SSL *)session;
+
+    char peer_cn[256];
+
+    if(SSL_get_verify_result(ssl) != X509_V_OK)
+        return secure::INVALID_CERTIFICATE;
+
+    if(!peername)
+        return secure::OK;
+
+    X509 *peer = SSL_get_peer_certificate(ssl);
+
+    if(!peer)
+        return secure::INVALID_PEERNAME;
+
+    X509_NAME_get_text_by_NID(
+        X509_get_subject_name(peer),
+        NID_commonName, peer_cn, sizeof(peer_cn));
+    if(!eq_case(peer_cn, peername))
+        return secure::INVALID_PEERNAME;
+
+    return secure::OK;
+}
+
+secure::~secure()
+{
+}
+
+context::~context()
+{
+    if(ctx)
+        SSL_CTX_free(ctx);
+}
+
+
diff --git a/jni/libucommon/sources/openssl/ssl.cpp b/jni/libucommon/sources/openssl/ssl.cpp
new file mode 100644
index 0000000..65ffae0
--- /dev/null
+++ b/jni/libucommon/sources/openssl/ssl.cpp
@@ -0,0 +1,164 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+SSLBuffer::SSLBuffer(secure::client_t scontext) :
+TCPBuffer()
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = false;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+}
+
+SSLBuffer::SSLBuffer(const TCPServer *tcp, secure::server_t scontext, size_t size) :
+TCPBuffer(tcp, size)
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = true;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_accept((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+SSLBuffer::~SSLBuffer()
+{
+    release();
+}
+
+void SSLBuffer::open(const char *host, const char *service, size_t size)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    close();
+    TCPBuffer::open(host, service, size);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_connect((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+void SSLBuffer::close(void)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    if(bio) {
+        SSL_shutdown((SSL *)ssl);
+        bio = NULL;
+    }
+
+    TCPBuffer::close();
+}
+
+void SSLBuffer::release(void)
+{
+    server = false;
+    close();
+    if(ssl) {
+        SSL_free((SSL *)ssl);
+        ssl = NULL;
+    }
+}
+
+size_t SSLBuffer::_push(const char *address, size_t size)
+{
+    if(!bio)
+        return TCPBuffer::_push(address, size);
+
+    int result = SSL_write((SSL *)ssl, address, size);
+    if(result < 0) {
+        result = 0;
+        ioerr = EIO;
+    }
+    return (ssize_t)result;
+}
+
+bool SSLBuffer::_pending(void)
+{
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(input_pending())
+        return true;
+
+    if(ssl && SSL_pending((SSL *)ssl))
+        return true;
+
+    if(iowait && iowait != Timer::inf)
+        return Socket::wait(so, iowait);
+
+    return Socket::wait(so, 0);
+}
+
+size_t SSLBuffer::_pull(char *address, size_t size)
+{
+    if(!bio)
+        return TCPBuffer::_pull(address, size);
+
+    if(SSL_pending((SSL *)ssl) == 0 && iowait && iowait != Timer::inf && !Socket::wait(so, iowait))
+        return 0;
+
+    int result = SSL_read((SSL *)ssl, address, size);
+    if(result < 0) {
+        result = 0;
+        ioerr = EIO;
+    }
+    return (size_t) result;
+}
+
+bool SSLBuffer::_flush(void)
+{
+    int result;
+
+    if(TCPBuffer::_flush()) {
+        if(bio) {
+            result = BIO_flush((BIO *)bio);
+            if(result < 1) {
+                ioerr = EIO;
+                return false;
+            }
+        }
+        return true;
+    }
+
+    return false;
+}
+
diff --git a/jni/libucommon/sources/openssl/sstream.cpp b/jni/libucommon/sources/openssl/sstream.cpp
new file mode 100644
index 0000000..b196f08
--- /dev/null
+++ b/jni/libucommon/sources/openssl/sstream.cpp
@@ -0,0 +1,136 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+
+sstream::sstream(secure::client_t scontext) :
+tcpstream()
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = false;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+}
+
+sstream::sstream(const TCPServer *tcp, secure::server_t scontext, size_t size) :
+tcpstream(tcp, size)
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = true;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_accept((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+sstream::~sstream()
+{
+    release();
+}
+
+void sstream::open(const char *host, const char *service, size_t size)
+{
+    if(server)
+        return;
+
+    close();
+    tcpstream::open(host, service, size);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_connect((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+void sstream::close(void)
+{
+    if(server)
+        return;
+
+    if(bio) {
+        SSL_shutdown((SSL *)ssl);
+        bio = NULL;
+    }
+
+    tcpstream::close();
+}
+
+void sstream::release(void)
+{
+    server = false;
+    close();
+
+    if(ssl) {
+        SSL_free((SSL *)ssl);
+        ssl = NULL;
+    }
+}
+
+ssize_t sstream::_write(const char *address, size_t size)
+{
+    if(!bio)
+        return tcpstream::_write(address, size);
+
+    return SSL_write((SSL *)ssl, address, size);
+}
+
+ssize_t sstream::_read(char *address, size_t size)
+{
+    if(!bio)
+        return tcpstream::_read(address, size);
+
+    return SSL_read((SSL *)ssl, address, size);
+}
+
+bool sstream::_wait(void)
+{
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(ssl && SSL_pending((SSL *)ssl))
+        return true;
+
+    return tcpstream::_wait();
+}
+
+int sstream::sync()
+{
+    int rtn = tcpstream::sync();
+    if(bio)
+        rtn = BIO_flush((BIO *)bio);
+
+    return rtn;
+}
+
+#endif