summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am4
-rw-r--r--include/Makefile.in656
-rw-r--r--include/xmlsec/Makefile.am63
-rw-r--r--include/xmlsec/Makefile.in767
-rw-r--r--include/xmlsec/app.h424
-rw-r--r--include/xmlsec/base64.h67
-rw-r--r--include/xmlsec/bn.h99
-rw-r--r--include/xmlsec/buffer.h108
-rw-r--r--include/xmlsec/crypto.h75
-rw-r--r--include/xmlsec/dl.h56
-rw-r--r--include/xmlsec/errors.h504
-rw-r--r--include/xmlsec/exports.h111
-rw-r--r--include/xmlsec/gcrypt/Makefile.am13
-rw-r--r--include/xmlsec/gcrypt/Makefile.in564
-rw-r--r--include/xmlsec/gcrypt/app.h96
-rw-r--r--include/xmlsec/gcrypt/crypto.h460
-rw-r--r--include/xmlsec/gcrypt/symbols.h104
-rw-r--r--include/xmlsec/gnutls/Makefile.am14
-rw-r--r--include/xmlsec/gnutls/Makefile.in565
-rw-r--r--include/xmlsec/gnutls/app.h96
-rw-r--r--include/xmlsec/gnutls/crypto.h462
-rw-r--r--include/xmlsec/gnutls/symbols.h104
-rw-r--r--include/xmlsec/gnutls/x509.h110
-rw-r--r--include/xmlsec/io.h54
-rw-r--r--include/xmlsec/keyinfo.h285
-rw-r--r--include/xmlsec/keys.h278
-rw-r--r--include/xmlsec/keysdata.h837
-rw-r--r--include/xmlsec/keysmngr.h264
-rw-r--r--include/xmlsec/list.h194
-rw-r--r--include/xmlsec/membuf.h44
-rw-r--r--include/xmlsec/mscrypto/Makefile.am16
-rw-r--r--include/xmlsec/mscrypto/Makefile.in567
-rw-r--r--include/xmlsec/mscrypto/app.h116
-rw-r--r--include/xmlsec/mscrypto/certkeys.h42
-rw-r--r--include/xmlsec/mscrypto/crypto.h516
-rw-r--r--include/xmlsec/mscrypto/keysstore.h48
-rw-r--r--include/xmlsec/mscrypto/symbols.h114
-rw-r--r--include/xmlsec/mscrypto/x509.h92
-rw-r--r--include/xmlsec/nodeset.h139
-rw-r--r--include/xmlsec/nss/Makefile.am17
-rw-r--r--include/xmlsec/nss/Makefile.in568
-rw-r--r--include/xmlsec/nss/app.h118
-rw-r--r--include/xmlsec/nss/bignum.h37
-rw-r--r--include/xmlsec/nss/crypto.h469
-rw-r--r--include/xmlsec/nss/keysstore.h46
-rw-r--r--include/xmlsec/nss/pkikeys.h44
-rw-r--r--include/xmlsec/nss/symbols.h106
-rw-r--r--include/xmlsec/nss/x509.h91
-rw-r--r--include/xmlsec/openssl/Makefile.am16
-rw-r--r--include/xmlsec/openssl/Makefile.in567
-rw-r--r--include/xmlsec/openssl/app.h128
-rw-r--r--include/xmlsec/openssl/bn.h35
-rw-r--r--include/xmlsec/openssl/crypto.h561
-rw-r--r--include/xmlsec/openssl/evp.h44
-rw-r--r--include/xmlsec/openssl/symbols.h123
-rw-r--r--include/xmlsec/openssl/x509.h109
-rw-r--r--include/xmlsec/parser.h51
-rw-r--r--include/xmlsec/private.h489
-rw-r--r--include/xmlsec/private/Makefile.am12
-rw-r--r--include/xmlsec/private/Makefile.in563
-rw-r--r--include/xmlsec/private/xkms.h121
-rw-r--r--include/xmlsec/private/xslt.h34
-rw-r--r--include/xmlsec/skeleton/Makefile.am13
-rw-r--r--include/xmlsec/skeleton/app.h97
-rw-r--r--include/xmlsec/skeleton/crypto.h40
-rw-r--r--include/xmlsec/skeleton/symbols.h117
-rw-r--r--include/xmlsec/soap.h130
-rw-r--r--include/xmlsec/strings.h610
-rw-r--r--include/xmlsec/templates.h162
-rw-r--r--include/xmlsec/transforms.h994
-rw-r--r--include/xmlsec/version.h61
-rw-r--r--include/xmlsec/version.h.in61
-rw-r--r--include/xmlsec/x509.h80
-rw-r--r--include/xmlsec/xkms.h652
-rw-r--r--include/xmlsec/xmldsig.h281
-rw-r--r--include/xmlsec/xmlenc.h163
-rw-r--r--include/xmlsec/xmlsec.h216
-rw-r--r--include/xmlsec/xmltree.h275
78 files changed, 17429 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 00000000..e189efe9
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,4 @@
+## Process this file with automake to produce Makefile.in
+SUBDIRS=xmlsec
+
+
diff --git a/include/Makefile.in b/include/Makefile.in
new file mode 100644
index 00000000..75062342
--- /dev/null
+++ b/include/Makefile.in
@@ -0,0 +1,656 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+VPATH = @srcdir@
+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@
+subdir = include
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = xmlsec
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean 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-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+# 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/include/xmlsec/Makefile.am b/include/xmlsec/Makefile.am
new file mode 100644
index 00000000..08592e1e
--- /dev/null
+++ b/include/xmlsec/Makefile.am
@@ -0,0 +1,63 @@
+## Process this file with automake to produce Makefile.in
+NULL =
+SUBDIRS = private $(XMLSEC_CRYPTO_LIST)
+EXTRA_DIST = skeleton mscrypto $(XMLSEC_CRYPTO_DISABLED_LIST)
+
+xmlsecincdir = $(includedir)/xmlsec1/xmlsec
+
+xmlsecinc_HEADERS = \
+ app.h \
+ base64.h \
+ bn.h \
+ buffer.h \
+ crypto.h \
+ dl.h \
+ errors.h \
+ exports.h \
+ io.h \
+ keyinfo.h \
+ keysdata.h \
+ keys.h \
+ keysmngr.h \
+ list.h \
+ membuf.h \
+ nodeset.h \
+ parser.h \
+ private.h \
+ soap.h \
+ strings.h \
+ templates.h \
+ transforms.h \
+ version.h \
+ x509.h \
+ xkms.h \
+ xmldsig.h \
+ xmlenc.h \
+ xmlsec.h \
+ xmltree.h \
+ $(NULL)
+
+remove-old-headers:
+ @if test "x$(DESTDIR)" = "x" && test -d "$(includedir)/xmlsec"; then \
+ echo "----------------------------------------------------------------------"; \
+ echo; \
+ echo "*** WARNING ***:"; \
+ echo; \
+ echo "You seem to have old xmlsec header files installed in:"; \
+ echo; \
+ echo " \"$(includedir)/xmlsec\""; \
+ echo; \
+ echo "The entire directory will be removed now."; \
+ echo "To allow parallel installation of different xmlsec library versions,"; \
+ echo "the header files are now installed in a version specific subdirectory:"; \
+ echo; \
+ echo " \"$(xmlsecincdir)\""; \
+ echo; \
+ echo "----------------------------------------------------------------------"; \
+ echo; \
+ rm -rf "$(includedir)/xmlsec"; \
+ fi
+
+install-exec-hook: remove-old-headers
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecincdir)
+
diff --git a/include/xmlsec/Makefile.in b/include/xmlsec/Makefile.in
new file mode 100644
index 00000000..0a54afd3
--- /dev/null
+++ b/include/xmlsec/Makefile.in
@@ -0,0 +1,767 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/version.h.in $(xmlsecinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = version.h
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+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__installdirs = "$(DESTDIR)$(xmlsecincdir)"
+HEADERS = $(xmlsecinc_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+SUBDIRS = private $(XMLSEC_CRYPTO_LIST)
+EXTRA_DIST = skeleton mscrypto $(XMLSEC_CRYPTO_DISABLED_LIST)
+xmlsecincdir = $(includedir)/xmlsec1/xmlsec
+xmlsecinc_HEADERS = \
+ app.h \
+ base64.h \
+ bn.h \
+ buffer.h \
+ crypto.h \
+ dl.h \
+ errors.h \
+ exports.h \
+ io.h \
+ keyinfo.h \
+ keysdata.h \
+ keys.h \
+ keysmngr.h \
+ list.h \
+ membuf.h \
+ nodeset.h \
+ parser.h \
+ private.h \
+ soap.h \
+ strings.h \
+ templates.h \
+ transforms.h \
+ version.h \
+ x509.h \
+ xkms.h \
+ xmldsig.h \
+ xmlenc.h \
+ xmlsec.h \
+ xmltree.h \
+ $(NULL)
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+version.h: $(top_builddir)/config.status $(srcdir)/version.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecincHEADERS: $(xmlsecinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecincdir)"
+ @list='$(xmlsecinc_HEADERS)'; test -n "$(xmlsecincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecinc_HEADERS)'; test -n "$(xmlsecincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecincdir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(xmlsecincdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-xmlsecincHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecincHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-exec-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecincHEADERS installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-xmlsecincHEADERS
+
+
+remove-old-headers:
+ @if test "x$(DESTDIR)" = "x" && test -d "$(includedir)/xmlsec"; then \
+ echo "----------------------------------------------------------------------"; \
+ echo; \
+ echo "*** WARNING ***:"; \
+ echo; \
+ echo "You seem to have old xmlsec header files installed in:"; \
+ echo; \
+ echo " \"$(includedir)/xmlsec\""; \
+ echo; \
+ echo "The entire directory will be removed now."; \
+ echo "To allow parallel installation of different xmlsec library versions,"; \
+ echo "the header files are now installed in a version specific subdirectory:"; \
+ echo; \
+ echo " \"$(xmlsecincdir)\""; \
+ echo; \
+ echo "----------------------------------------------------------------------"; \
+ echo; \
+ rm -rf "$(includedir)/xmlsec"; \
+ fi
+
+install-exec-hook: remove-old-headers
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecincdir)
+
+# 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/include/xmlsec/app.h b/include/xmlsec/app.h
new file mode 100644
index 00000000..7f61ac6b
--- /dev/null
+++ b/include/xmlsec/app.h
@@ -0,0 +1,424 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_APP_H__
+#define __XMLSEC_APP_H__
+
+#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
+
+#if !defined(IN_XMLSEC) && !defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To use dynamic crypto engines loading define XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && !defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keysdata.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+/**********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ *********************************************************************/
+XMLSEC_EXPORT int xmlSecCryptoInit (void);
+XMLSEC_EXPORT int xmlSecCryptoShutdown (void);
+XMLSEC_EXPORT int xmlSecCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr);
+
+/*********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+/**
+ * xmlSecKeyDataAesId:
+ *
+ * The AES key klass.
+ */
+#define xmlSecKeyDataAesId xmlSecKeyDataAesGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataAesGetKlass (void);
+/**
+ * xmlSecKeyDataDesId:
+ *
+ * The DES key klass.
+ */
+#define xmlSecKeyDataDesId xmlSecKeyDataDesGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDesGetKlass (void);
+/**
+ * xmlSecKeyDataDsaId:
+ *
+ * The DSA key klass.
+ */
+#define xmlSecKeyDataDsaId xmlSecKeyDataDsaGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDsaGetKlass (void);
+/**
+ * xmlSecKeyDataGost2001Id:
+ *
+ * The GOST2001 key klass.
+ */
+#define xmlSecKeyDataGost2001Id xmlSecKeyDataGost2001GetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataGost2001GetKlass (void);
+/**
+ * xmlSecKeyDataHmacId:
+ *
+ * The DHMAC key klass.
+ */
+#define xmlSecKeyDataHmacId xmlSecKeyDataHmacGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataHmacGetKlass (void);
+/**
+ * xmlSecKeyDataRsaId:
+ *
+ * The RSA key klass.
+ */
+#define xmlSecKeyDataRsaId xmlSecKeyDataRsaGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRsaGetKlass (void);
+/**
+ * xmlSecKeyDataX509Id:
+ *
+ * The X509 data klass.
+ */
+#define xmlSecKeyDataX509Id xmlSecKeyDataX509GetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataX509GetKlass (void);
+/**
+ * xmlSecKeyDataRawX509CertId:
+ *
+ * The raw X509 certificate klass.
+ */
+#define xmlSecKeyDataRawX509CertId xmlSecKeyDataRawX509CertGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRawX509CertGetKlass(void);
+
+/*********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+/**
+ * xmlSecX509StoreId:
+ *
+ * The X509 store klass.
+ */
+#define xmlSecX509StoreId xmlSecX509StoreGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataStoreId xmlSecX509StoreGetKlass (void);
+
+/*********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+/**
+ * xmlSecTransformAes128CbcId:
+ *
+ * The AES128 CBC cipher transform klass.
+ */
+#define xmlSecTransformAes128CbcId xmlSecTransformAes128CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes128CbcGetKlass(void);
+/**
+ * xmlSecTransformAes192CbcId:
+ *
+ * The AES192 CBC cipher transform klass.
+ */
+#define xmlSecTransformAes192CbcId xmlSecTransformAes192CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes192CbcGetKlass(void);
+/**
+ * xmlSecTransformAes256CbcId:
+ *
+ * The AES256 CBC cipher transform klass.
+ */
+#define xmlSecTransformAes256CbcId xmlSecTransformAes256CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes256CbcGetKlass(void);
+/**
+ * xmlSecTransformKWAes128Id:
+ *
+ * The AES 128 key wrap transform klass.
+ */
+#define xmlSecTransformKWAes128Id xmlSecTransformKWAes128GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes128GetKlass (void);
+/**
+ * xmlSecTransformKWAes192Id:
+ *
+ * The AES 192 key wrap transform klass.
+ */
+#define xmlSecTransformKWAes192Id xmlSecTransformKWAes192GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes192GetKlass (void);
+/**
+ * xmlSecTransformKWAes256Id:
+ *
+ * The AES 256 key wrap transform klass.
+ */
+#define xmlSecTransformKWAes256Id xmlSecTransformKWAes256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes256GetKlass (void);
+/**
+ * xmlSecTransformDes3CbcId:
+ *
+ * The Triple DES encryption transform klass.
+ */
+#define xmlSecTransformDes3CbcId xmlSecTransformDes3CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDes3CbcGetKlass (void);
+/**
+ * xmlSecTransformKWDes3Id:
+ *
+ * The DES3 CBC cipher transform klass.
+ */
+#define xmlSecTransformKWDes3Id xmlSecTransformKWDes3GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWDes3GetKlass (void);
+/**
+ * xmlSecTransformDsaSha1Id:
+ *
+ * The DSA-SHA1 signature transform klass.
+ */
+#define xmlSecTransformDsaSha1Id xmlSecTransformDsaSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDsaSha1GetKlass (void);
+
+/**
+ * xmlSecTransformGost2001GostR3411_94Id:
+ *
+ * The GOST2001-GOSTR3411_94 signature transform klass.
+ */
+#define xmlSecTransformGost2001GostR3411_94Id xmlSecTransformGost2001GostR3411_94GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGost2001GostR3411_94GetKlass (void);
+
+/**
+ * xmlSecTransformHmacMd5Id:
+ *
+ * The HMAC with MD5 signature transform klass.
+ */
+#define xmlSecTransformHmacMd5Id xmlSecTransformHmacMd5GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacMd5GetKlass (void);
+/**
+ * xmlSecTransformHmacRipemd160Id:
+ *
+ * The HMAC with RipeMD160 signature transform klass.
+ */
+#define xmlSecTransformHmacRipemd160Id xmlSecTransformHmacRipemd160GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacRipemd160GetKlass(void);
+/**
+ * xmlSecTransformHmacSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecTransformHmacSha1Id xmlSecTransformHmacSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha1GetKlass (void);
+/**
+ * xmlSecTransformHmacSha224Id:
+ *
+ * The HMAC with SHA224 signature transform klass.
+ */
+#define xmlSecTransformHmacSha224Id xmlSecTransformHmacSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha224GetKlass (void);
+/**
+ * xmlSecTransformHmacSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecTransformHmacSha256Id xmlSecTransformHmacSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha256GetKlass (void);
+/**
+ * xmlSecTransformHmacSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecTransformHmacSha384Id xmlSecTransformHmacSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha384GetKlass (void);
+/**
+ * xmlSecTransformHmacSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecTransformHmacSha512Id xmlSecTransformHmacSha512GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha512GetKlass (void);
+/**
+ * xmlSecTransformMd5Id:
+ *
+ * The MD5 digest transform klass.
+ */
+#define xmlSecTransformMd5Id xmlSecTransformMd5GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMd5GetKlass(void);
+/**
+ * xmlSecTransformRipemd160Id:
+ *
+ * The RIPEMD160 digest transform klass.
+ */
+#define xmlSecTransformRipemd160Id xmlSecTransformRipemd160GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRipemd160GetKlass(void);
+/**
+ * xmlSecTransformRsaMd5Id:
+ *
+ * The RSA-MD5 signature transform klass.
+ */
+#define xmlSecTransformRsaMd5Id xmlSecTransformRsaMd5GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaMd5GetKlass (void);
+/**
+ * xmlSecTransformRsaRipemd160Id:
+ *
+ * The RSA-RIPEMD160 signature transform klass.
+ */
+#define xmlSecTransformRsaRipemd160Id xmlSecTransformRsaRipemd160GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaRipemd160GetKlass (void);
+/**
+ * xmlSecTransformRsaSha1Id:
+ *
+ * The RSA-SHA1 signature transform klass.
+ */
+#define xmlSecTransformRsaSha1Id xmlSecTransformRsaSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha1GetKlass (void);
+/**
+ * xmlSecTransformRsaSha224Id:
+ *
+ * The RSA-SHA224 signature transform klass.
+ */
+#define xmlSecTransformRsaSha224Id xmlSecTransformRsaSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha224GetKlass (void);
+/**
+ * xmlSecTransformRsaSha256Id:
+ *
+ * The RSA-SHA256 signature transform klass.
+ */
+#define xmlSecTransformRsaSha256Id xmlSecTransformRsaSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha256GetKlass (void);
+/**
+ * xmlSecTransformRsaSha384Id:
+ *
+ * The RSA-SHA384 signature transform klass.
+ */
+#define xmlSecTransformRsaSha384Id xmlSecTransformRsaSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha384GetKlass (void);
+/**
+ * xmlSecTransformRsaSha512Id:
+ *
+ * The RSA-SHA512 signature transform klass.
+ */
+#define xmlSecTransformRsaSha512Id xmlSecTransformRsaSha512GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha512GetKlass (void);
+
+/**
+ * xmlSecTransformRsaPkcs1Id:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+#define xmlSecTransformRsaPkcs1Id xmlSecTransformRsaPkcs1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaPkcs1GetKlass (void);
+/**
+ * xmlSecTransformRsaOaepId:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+#define xmlSecTransformRsaOaepId xmlSecTransformRsaOaepGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaOaepGetKlass (void);
+/**
+ * xmlSecTransformGostR3411_94Id:
+ *
+ * The GOSTR3411_94 digest transform klass.
+ */
+#define xmlSecTransformGostR3411_94Id xmlSecTransformGostR3411_94GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGostR3411_94GetKlass (void);
+/**
+ * xmlSecTransformSha1Id:
+ *
+ * The SHA1 digest transform klass.
+ */
+#define xmlSecTransformSha1Id xmlSecTransformSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha1GetKlass (void);
+/**
+ * xmlSecTransformSha224Id:
+ *
+ * The SHA224 digest transform klass.
+ */
+#define xmlSecTransformSha224Id xmlSecTransformSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha224GetKlass (void);
+/**
+ * xmlSecTransformSha256Id:
+ *
+ * The SHA256 digest transform klass.
+ */
+#define xmlSecTransformSha256Id xmlSecTransformSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha256GetKlass (void);
+/**
+ * xmlSecTransformSha384Id:
+ *
+ * The SHA384 digest transform klass.
+ */
+#define xmlSecTransformSha384Id xmlSecTransformSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha384GetKlass (void);
+/**
+ * xmlSecTransformSha512Id:
+ *
+ * The SHA512 digest transform klass.
+ */
+#define xmlSecTransformSha512Id xmlSecTransformSha512GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha512GetKlass (void);
+
+/*********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+XMLSEC_EXPORT int xmlSecCryptoAppInit (const char* config);
+XMLSEC_EXPORT int xmlSecCryptoAppShutdown (void);
+XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMngrAdoptKey (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_EXPORT int xmlSecCryptoAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+XMLSEC_EXPORT int xmlSecCryptoAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_EXPORT int xmlSecCryptoAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppKeyLoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppPkcs12Load (const char* filename,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecCryptoAppPkcs12LoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_EXPORT int xmlSecCryptoAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_EXPORT int xmlSecCryptoAppKeyCertLoadMemory(xmlSecKeyPtr key,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+XMLSEC_EXPORT void* xmlSecCryptoAppGetDefaultPwdCallback(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */
+
+#endif /* __XMLSEC_APP_H__ */
+
diff --git a/include/xmlsec/base64.h b/include/xmlsec/base64.h
new file mode 100644
index 00000000..28d8fbc4
--- /dev/null
+++ b/include/xmlsec/base64.h
@@ -0,0 +1,67 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Base64 encode/decode transform and utility functions.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_BASE64_H__
+#define __XMLSEC_BASE64_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/transforms.h>
+
+/**
+ * XMLSEC_BASE64_LINESIZE:
+ *
+ * The default maximum base64 encoded line size.
+ */
+#define XMLSEC_BASE64_LINESIZE 64
+
+XMLSEC_EXPORT int xmlSecBase64GetDefaultLineSize (void);
+XMLSEC_EXPORT void xmlSecBase64SetDefaultLineSize (int columns);
+
+
+/* Base64 Context */
+typedef struct _xmlSecBase64Ctx xmlSecBase64Ctx,
+ *xmlSecBase64CtxPtr;
+
+XMLSEC_EXPORT xmlSecBase64CtxPtr xmlSecBase64CtxCreate (int encode,
+ int columns);
+XMLSEC_EXPORT void xmlSecBase64CtxDestroy (xmlSecBase64CtxPtr ctx);
+XMLSEC_EXPORT int xmlSecBase64CtxInitialize (xmlSecBase64CtxPtr ctx,
+ int encode,
+ int columns);
+XMLSEC_EXPORT void xmlSecBase64CtxFinalize (xmlSecBase64CtxPtr ctx);
+XMLSEC_EXPORT int xmlSecBase64CtxUpdate (xmlSecBase64CtxPtr ctx,
+ const xmlSecByte *in,
+ xmlSecSize inSize,
+ xmlSecByte *out,
+ xmlSecSize outSize);
+XMLSEC_EXPORT int xmlSecBase64CtxFinal (xmlSecBase64CtxPtr ctx,
+ xmlSecByte *out,
+ xmlSecSize outSize);
+
+/* Standalone routines to do base64 encode/decode "at once" */
+XMLSEC_EXPORT xmlChar* xmlSecBase64Encode (const xmlSecByte *buf,
+ xmlSecSize len,
+ int columns);
+XMLSEC_EXPORT int xmlSecBase64Decode (const xmlChar* str,
+ xmlSecByte *buf,
+ xmlSecSize len);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_BASE64_H__ */
+
diff --git a/include/xmlsec/bn.h b/include/xmlsec/bn.h
new file mode 100644
index 00000000..65138ed4
--- /dev/null
+++ b/include/xmlsec/bn.h
@@ -0,0 +1,99 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Simple Big Numbers processing.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_BN_H__
+#define __XMLSEC_BN_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+
+typedef xmlSecBuffer xmlSecBn,
+ *xmlSecBnPtr;
+
+/**
+ * xmlSecBnFormat:
+ * @xmlSecBnBase64: the base64 decoded binary blob.
+ * @xmlSecBnHex: the hex number.
+ * @xmlSecBnDec: the decimal number.
+ *
+ * The big numbers formats.
+ */
+typedef enum {
+ xmlSecBnBase64,
+ xmlSecBnHex,
+ xmlSecBnDec
+} xmlSecBnFormat;
+
+XMLSEC_EXPORT xmlSecBnPtr xmlSecBnCreate (xmlSecSize size);
+XMLSEC_EXPORT void xmlSecBnDestroy (xmlSecBnPtr bn);
+XMLSEC_EXPORT int xmlSecBnInitialize (xmlSecBnPtr bn,
+ xmlSecSize size);
+XMLSEC_EXPORT void xmlSecBnFinalize (xmlSecBnPtr bn);
+XMLSEC_EXPORT xmlSecByte* xmlSecBnGetData (xmlSecBnPtr bn);
+XMLSEC_EXPORT int xmlSecBnSetData (xmlSecBnPtr bn,
+ const xmlSecByte* data,
+ xmlSecSize size);
+XMLSEC_EXPORT xmlSecSize xmlSecBnGetSize (xmlSecBnPtr bn);
+XMLSEC_EXPORT void xmlSecBnZero (xmlSecBnPtr bn);
+
+XMLSEC_EXPORT int xmlSecBnFromString (xmlSecBnPtr bn,
+ const xmlChar* str,
+ xmlSecSize base);
+XMLSEC_EXPORT xmlChar* xmlSecBnToString (xmlSecBnPtr bn,
+ xmlSecSize base);
+XMLSEC_EXPORT int xmlSecBnFromHexString (xmlSecBnPtr bn,
+ const xmlChar* str);
+XMLSEC_EXPORT xmlChar* xmlSecBnToHexString (xmlSecBnPtr bn);
+
+XMLSEC_EXPORT int xmlSecBnFromDecString (xmlSecBnPtr bn,
+ const xmlChar* str);
+XMLSEC_EXPORT xmlChar* xmlSecBnToDecString (xmlSecBnPtr bn);
+
+XMLSEC_EXPORT int xmlSecBnMul (xmlSecBnPtr bn,
+ int multiplier);
+XMLSEC_EXPORT int xmlSecBnDiv (xmlSecBnPtr bn,
+ int divider,
+ int* mod);
+XMLSEC_EXPORT int xmlSecBnAdd (xmlSecBnPtr bn,
+ int delta);
+XMLSEC_EXPORT int xmlSecBnReverse (xmlSecBnPtr bn);
+XMLSEC_EXPORT int xmlSecBnCompare (xmlSecBnPtr bn,
+ const xmlSecByte* data,
+ xmlSecSize dataSize);
+XMLSEC_EXPORT int xmlSecBnCompareReverse (xmlSecBnPtr bn,
+ const xmlSecByte* data,
+ xmlSecSize dataSize);
+XMLSEC_EXPORT int xmlSecBnGetNodeValue (xmlSecBnPtr bn,
+ xmlNodePtr cur,
+ xmlSecBnFormat format,
+ int reverse);
+XMLSEC_EXPORT int xmlSecBnSetNodeValue (xmlSecBnPtr bn,
+ xmlNodePtr cur,
+ xmlSecBnFormat format,
+ int reverse,
+ int addLineBreaks);
+XMLSEC_EXPORT int xmlSecBnBlobSetNodeValue (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlNodePtr cur,
+ xmlSecBnFormat format,
+ int reverse,
+ int addLineBreaks);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_BN_H__ */
+
diff --git a/include/xmlsec/buffer.h b/include/xmlsec/buffer.h
new file mode 100644
index 00000000..2791a97b
--- /dev/null
+++ b/include/xmlsec/buffer.h
@@ -0,0 +1,108 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Memory buffer.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_BUFFER_H__
+#define __XMLSEC_BUFFER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <xmlsec/xmlsec.h>
+
+typedef struct _xmlSecBuffer xmlSecBuffer,
+ *xmlSecBufferPtr;
+
+
+/**
+ * xmlSecAllocMode:
+ * @xmlSecAllocModeExact: the memory allocation mode that minimizes total
+ * allocated memory size.
+ * @xmlSecAllocModeDouble: the memory allocation mode that tries to minimize
+ * the number of malloc calls.
+ *
+ * The memory allocation mode (used by @xmlSecBuffer and @xmlSecList).
+ */
+typedef enum {
+ xmlSecAllocModeExact = 0,
+ xmlSecAllocModeDouble
+} xmlSecAllocMode;
+
+/*****************************************************************************
+ *
+ * xmlSecBuffer
+ *
+ ****************************************************************************/
+
+/**
+ * xmlSecBuffer:
+ * @data: the pointer to buffer data.
+ * @size: the current data size.
+ * @maxSize: the max data size (allocated buffer size).
+ * @allocMode: the buffer memory allocation mode.
+ *
+ * Binary data buffer.
+ */
+struct _xmlSecBuffer {
+ xmlSecByte* data;
+ xmlSecSize size;
+ xmlSecSize maxSize;
+ xmlSecAllocMode allocMode;
+};
+
+XMLSEC_EXPORT void xmlSecBufferSetDefaultAllocMode (xmlSecAllocMode defAllocMode,
+ xmlSecSize defInitialSize);
+
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecBufferCreate (xmlSecSize size);
+XMLSEC_EXPORT void xmlSecBufferDestroy (xmlSecBufferPtr buf);
+XMLSEC_EXPORT int xmlSecBufferInitialize (xmlSecBufferPtr buf,
+ xmlSecSize size);
+XMLSEC_EXPORT void xmlSecBufferFinalize (xmlSecBufferPtr buf);
+XMLSEC_EXPORT xmlSecByte* xmlSecBufferGetData (xmlSecBufferPtr buf);
+XMLSEC_EXPORT int xmlSecBufferSetData (xmlSecBufferPtr buf,
+ const xmlSecByte* data,
+ xmlSecSize size);
+XMLSEC_EXPORT xmlSecSize xmlSecBufferGetSize (xmlSecBufferPtr buf);
+XMLSEC_EXPORT int xmlSecBufferSetSize (xmlSecBufferPtr buf,
+ xmlSecSize size);
+XMLSEC_EXPORT xmlSecSize xmlSecBufferGetMaxSize (xmlSecBufferPtr buf);
+XMLSEC_EXPORT int xmlSecBufferSetMaxSize (xmlSecBufferPtr buf,
+ xmlSecSize size);
+XMLSEC_EXPORT void xmlSecBufferEmpty (xmlSecBufferPtr buf);
+XMLSEC_EXPORT int xmlSecBufferAppend (xmlSecBufferPtr buf,
+ const xmlSecByte* data,
+ xmlSecSize size);
+XMLSEC_EXPORT int xmlSecBufferPrepend (xmlSecBufferPtr buf,
+ const xmlSecByte* data,
+ xmlSecSize size);
+XMLSEC_EXPORT int xmlSecBufferRemoveHead (xmlSecBufferPtr buf,
+ xmlSecSize size);
+XMLSEC_EXPORT int xmlSecBufferRemoveTail (xmlSecBufferPtr buf,
+ xmlSecSize size);
+
+XMLSEC_EXPORT int xmlSecBufferReadFile (xmlSecBufferPtr buf,
+ const char* filename);
+
+XMLSEC_EXPORT int xmlSecBufferBase64NodeContentRead(xmlSecBufferPtr buf,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecBufferBase64NodeContentWrite(xmlSecBufferPtr buf,
+ xmlNodePtr node,
+ int columns);
+
+XMLSEC_EXPORT xmlOutputBufferPtr xmlSecBufferCreateOutputBuffer (xmlSecBufferPtr buf);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_BUFFER_H__ */
+
diff --git a/include/xmlsec/crypto.h b/include/xmlsec/crypto.h
new file mode 100644
index 00000000..f388aa1e
--- /dev/null
+++ b/include/xmlsec/crypto.h
@@ -0,0 +1,75 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Crypto engine selection.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_CRYPTO_H__
+#define __XMLSEC_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+
+/* include nothing if we compile xmlsec library itself */
+#ifndef IN_XMLSEC
+#ifndef IN_XMLSEC_CRYPTO
+
+#if defined(XMLSEC_NO_CRYPTO_DYNAMIC_LOADING) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error Dynamic loading for xmlsec-crypto libraries is disabled during library compilation
+#endif /* defined(XMLSEC_NO_CRYPTO_DYNAMIC_LOADING) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING
+#include <xmlsec/app.h>
+#else /* XMLSEC_CRYPTO_DYNAMIC_LOADING */
+#ifdef XMLSEC_CRYPTO_OPENSSL
+#include <xmlsec/openssl/app.h>
+#include <xmlsec/openssl/crypto.h>
+#include <xmlsec/openssl/x509.h>
+#include <xmlsec/openssl/symbols.h>
+#else /* XMLSEC_CRYPTO_OPENSSL */
+#ifdef XMLSEC_CRYPTO_MSCRYPTO
+#include <xmlsec/mscrypto/app.h>
+#include <xmlsec/mscrypto/crypto.h>
+#include <xmlsec/mscrypto/x509.h>
+#include <xmlsec/mscrypto/symbols.h>
+#else /* XMLSEC_CRYPTO_MSCRYPTO */
+#ifdef XMLSEC_CRYPTO_NSS
+#include <xmlsec/nss/app.h>
+#include <xmlsec/nss/crypto.h>
+#include <xmlsec/nss/x509.h>
+#include <xmlsec/nss/symbols.h>
+#else /* XMLSEC_CRYPTO_NSS */
+#ifdef XMLSEC_CRYPTO_GNUTLS
+#include <xmlsec/gnutls/app.h>
+#include <xmlsec/gnutls/crypto.h>
+#include <xmlsec/gnutls/symbols.h>
+#else /* XMLSEC_CRYPTO_GNUTLS */
+#ifdef XMLSEC_CRYPTO_GCRYPT
+#include <xmlsec/gcrypt/app.h>
+#include <xmlsec/gcrypt/crypto.h>
+#include <xmlsec/gcrypt/symbols.h>
+#else /* XMLSEC_CRYPTO_GCRYPT */
+#error No crypto library defined
+#endif /* XMLSEC_CRYPTO_GCRYPT */
+#endif /* XMLSEC_CRYPTO_GNUTLS */
+#endif /* XMLSEC_CRYPTO_NSS */
+#endif /* XMLSEC_CRYPTO_MSCRYPTO */
+#endif /* XMLSEC_CRYPTO_OPENSSL */
+#endif /* XMLSEC_CRYPTO_DYNAMIC_LOADING */
+
+#endif /* IN_XMLSEC_CRYPTO */
+#endif /* IN_XMLSEC */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_CRYPTO_H__ */
+
diff --git a/include/xmlsec/dl.h b/include/xmlsec/dl.h
new file mode 100644
index 00000000..86391a78
--- /dev/null
+++ b/include/xmlsec/dl.h
@@ -0,0 +1,56 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_DL_H__
+#define __XMLSEC_DL_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef struct _xmlSecCryptoDLFunctions xmlSecCryptoDLFunctions,
+ *xmlSecCryptoDLFunctionsPtr;
+
+XMLSEC_EXPORT int xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms
+ (xmlSecCryptoDLFunctionsPtr functions);
+
+#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
+
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keysdata.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+/****************************************************************************
+ *
+ * Dynamic load functions
+ *
+ ****************************************************************************/
+XMLSEC_EXPORT int xmlSecCryptoDLInit (void);
+XMLSEC_EXPORT int xmlSecCryptoDLShutdown (void);
+
+XMLSEC_EXPORT int xmlSecCryptoDLLoadLibrary (const xmlChar* crypto);
+XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetLibraryFunctions(const xmlChar* crypto);
+XMLSEC_EXPORT int xmlSecCryptoDLUnloadLibrary (const xmlChar* crypto);
+
+XMLSEC_EXPORT int xmlSecCryptoDLSetFunctions (xmlSecCryptoDLFunctionsPtr functions);
+XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetFunctions (void);
+
+#endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_APP_H__ */
+
diff --git a/include/xmlsec/errors.h b/include/xmlsec/errors.h
new file mode 100644
index 00000000..6e23620c
--- /dev/null
+++ b/include/xmlsec/errors.h
@@ -0,0 +1,504 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Error codes and error reporting functions.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_ERRORS_H__
+#define __XMLSEC_ERRORS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/***************************************************************
+ *
+ * Error codes
+ *
+ **************************************************************/
+/**
+ * XMLSEC_ERRORS_R_XMLSEC_FAILED:
+ *
+ * An XMLSec function failed (error subject is the failed function).
+ */
+#define XMLSEC_ERRORS_R_XMLSEC_FAILED 1
+
+/**
+ * XMLSEC_ERRORS_R_MALLOC_FAILED:
+ *
+ * Failed to allocate memory error.
+ */
+#define XMLSEC_ERRORS_R_MALLOC_FAILED 2
+
+/**
+ * XMLSEC_ERRORS_R_STRDUP_FAILED:
+ *
+ * Failed to duplicate string error.
+ */
+#define XMLSEC_ERRORS_R_STRDUP_FAILED 3
+
+/**
+ * XMLSEC_ERRORS_R_CRYPTO_FAILED:
+ *
+ * Crypto (OpenSSL) function failed (error subject is the failed function).
+ */
+#define XMLSEC_ERRORS_R_CRYPTO_FAILED 4
+
+/**
+ * XMLSEC_ERRORS_R_XML_FAILED:
+ *
+ * LibXML function failed (error subject is the failed function).
+ */
+#define XMLSEC_ERRORS_R_XML_FAILED 5
+
+/**
+ * XMLSEC_ERRORS_R_XSLT_FAILED:
+ *
+ * LibXSLT function failed (error subject is the failed function).
+ */
+#define XMLSEC_ERRORS_R_XSLT_FAILED 6
+
+/**
+ * XMLSEC_ERRORS_R_IO_FAILED:
+ *
+ * IO operation failed.
+ */
+#define XMLSEC_ERRORS_R_IO_FAILED 7
+
+/**
+ * XMLSEC_ERRORS_R_DISABLED:
+ *
+ * The feature is disabled during compilation.
+ * Check './configure --help' for details on how to
+ * enable it.
+ */
+#define XMLSEC_ERRORS_R_DISABLED 8
+
+/**
+ * XMLSEC_ERRORS_R_NOT_IMPLEMENTED:
+ *
+ * Feature is not implemented.
+ */
+#define XMLSEC_ERRORS_R_NOT_IMPLEMENTED 9
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_SIZE:
+ *
+ * Invalid size.
+ */
+#define XMLSEC_ERRORS_R_INVALID_SIZE 11
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_DATA:
+ *
+ * Invalid data.
+ */
+#define XMLSEC_ERRORS_R_INVALID_DATA 12
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_RESULT:
+ *
+ * Invalid result.
+ */
+#define XMLSEC_ERRORS_R_INVALID_RESULT 13
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_TYPE:
+ *
+ * Invalid type.
+ */
+#define XMLSEC_ERRORS_R_INVALID_TYPE 14
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_OPERATION:
+ *
+ * Invalid operation.
+ */
+#define XMLSEC_ERRORS_R_INVALID_OPERATION 15
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_STATUS:
+ *
+ * Invalid status.
+ */
+#define XMLSEC_ERRORS_R_INVALID_STATUS 16
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_FORMAT:
+ *
+ * Invalid format.
+ */
+#define XMLSEC_ERRORS_R_INVALID_FORMAT 17
+
+/**
+ * XMLSEC_ERRORS_R_DATA_NOT_MATCH:
+ *
+ * The data do not match our expectation.
+ */
+#define XMLSEC_ERRORS_R_DATA_NOT_MATCH 18
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_NODE:
+ *
+ * Invalid node (error subject is the node name).
+ */
+#define XMLSEC_ERRORS_R_INVALID_NODE 21
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_NODE_CONTENT:
+ *
+ * Invalid node content (error subject is the node name).
+ */
+#define XMLSEC_ERRORS_R_INVALID_NODE_CONTENT 22
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE:
+ *
+ * Invalid node attribute (error subject is the node name).
+ */
+#define XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE 23
+
+/**
+ * XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE:
+ *
+ * Missing node attribute (error subject is the node name).
+ */
+#define XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE 25
+
+/**
+ * XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT:
+ *
+ * Node already present,
+ */
+#define XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT 26
+
+/**
+ * XMLSEC_ERRORS_R_UNEXPECTED_NODE:
+ *
+ * Unexpected node (error subject is the node name).
+ */
+#define XMLSEC_ERRORS_R_UNEXPECTED_NODE 27
+
+/**
+ * XMLSEC_ERRORS_R_NODE_NOT_FOUND:
+ *
+ * Node not found (error subject is the required node name).
+ */
+#define XMLSEC_ERRORS_R_NODE_NOT_FOUND 28
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_TRANSFORM:
+ *
+ * This transform is invlaid here.
+ */
+#define XMLSEC_ERRORS_R_INVALID_TRANSFORM 31
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY:
+ *
+ * Key is invalid for this transform.
+ */
+#define XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY 32
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_URI_TYPE:
+ *
+ * Invalid URI type.
+ */
+#define XMLSEC_ERRORS_R_INVALID_URI_TYPE 33
+
+/**
+ * XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED:
+ *
+ * The transform requires the input document to be the same as context.
+ */
+#define XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED 34
+
+/**
+ * XMLSEC_ERRORS_R_TRANSFORM_DISABLED:
+ *
+ * The transform is disabled.
+ */
+#define XMLSEC_ERRORS_R_TRANSFORM_DISABLED 35
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_KEY_DATA:
+ *
+ * Key data is invalid.
+ */
+#define XMLSEC_ERRORS_R_INVALID_KEY_DATA 41
+
+/**
+ * XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND:
+ *
+ * Data is not found (error subject is the data name).
+ */
+#define XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND 42
+
+/**
+ * XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST:
+ *
+ * The key data is already exist.
+ */
+#define XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST 43
+
+/**
+ * XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE:
+ *
+ * Invalid key size.
+ */
+#define XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE 44
+
+/**
+ * XMLSEC_ERRORS_R_KEY_NOT_FOUND:
+ *
+ * Key not found.
+ */
+#define XMLSEC_ERRORS_R_KEY_NOT_FOUND 45
+
+/**
+ * XMLSEC_ERRORS_R_KEYDATA_DISABLED:
+ *
+ * The key data type disabled.
+ */
+#define XMLSEC_ERRORS_R_KEYDATA_DISABLED 46
+
+/**
+ * XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL:
+ *
+ * Max allowed retrievals level reached.
+ */
+#define XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL 51
+
+/**
+ * XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH:
+ *
+ * The retrieved key data type does not match the one specified
+ * in the <dsig:RetrievalMethod/> node.
+ */
+#define XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH 52
+
+/**
+ * XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL:
+ *
+ * Max EncryptedKey level reached.
+ */
+#define XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL 61
+
+/**
+ * XMLSEC_ERRORS_R_CERT_VERIFY_FAILED:
+ *
+ * Certificate verification failed.
+ */
+#define XMLSEC_ERRORS_R_CERT_VERIFY_FAILED 71
+
+/**
+ * XMLSEC_ERRORS_R_CERT_NOT_FOUND:
+ *
+ * Requested certificate is not found.
+ */
+#define XMLSEC_ERRORS_R_CERT_NOT_FOUND 72
+
+/**
+ * XMLSEC_ERRORS_R_CERT_REVOKED:
+ *
+ * The certificate is revoked.
+ */
+#define XMLSEC_ERRORS_R_CERT_REVOKED 73
+
+/**
+ * XMLSEC_ERRORS_R_CERT_ISSUER_FAILED:
+ *
+ * Failed to get certificate issuer.
+ */
+#define XMLSEC_ERRORS_R_CERT_ISSUER_FAILED 74
+
+/**
+ * XMLSEC_ERRORS_R_CERT_NOT_YET_VALID:
+ *
+ * "Not valid before" verification failed.
+ */
+#define XMLSEC_ERRORS_R_CERT_NOT_YET_VALID 75
+
+/**
+ * XMLSEC_ERRORS_R_CERT_HAS_EXPIRED:
+ *
+ * "Not valid after" verification failed.
+ */
+#define XMLSEC_ERRORS_R_CERT_HAS_EXPIRED 76
+
+/**
+ * XMLSEC_ERRORS_R_DSIG_NO_REFERENCES:
+ *
+ * The <dsig:Reference> nodes not found.
+ */
+#define XMLSEC_ERRORS_R_DSIG_NO_REFERENCES 81
+
+/**
+ * XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE:
+ *
+ * The <dsig:Reference> validation failed.
+ */
+#define XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE 82
+
+/**
+ * XMLSEC_ERRORS_R_ASSERTION:
+ *
+ * Invalid assertion.
+ */
+#define XMLSEC_ERRORS_R_ASSERTION 100
+
+/**
+ * XMLSEC_ERRORS_MAX_NUMBER:
+ *
+ * The maximum xmlsec errors number.
+ */
+#define XMLSEC_ERRORS_MAX_NUMBER 256
+
+
+
+/*******************************************************************
+ *
+ * Error functions
+ *
+ *******************************************************************/
+/**
+ * xmlSecErrorsCallback:
+ * @file: the error location file name (__FILE__ macro).
+ * @line: the error location line number (__LINE__ macro).
+ * @func: the error location function name (__FUNCTION__ macro).
+ * @errorObject: the error specific error object
+ * @errorSubject: the error specific error subject.
+ * @reason: the error code.
+ * @msg: the additional error message.
+ *
+ * The errors reporting callback function.
+ */
+typedef void (*xmlSecErrorsCallback) (const char* file,
+ int line,
+ const char* func,
+ const char* errorObject,
+ const char* errorSubject,
+ int reason,
+ const char* msg);
+
+
+XMLSEC_EXPORT void xmlSecErrorsInit (void);
+XMLSEC_EXPORT void xmlSecErrorsShutdown (void);
+XMLSEC_EXPORT void xmlSecErrorsSetCallback (xmlSecErrorsCallback callback);
+XMLSEC_EXPORT void xmlSecErrorsDefaultCallback (const char* file,
+ int line,
+ const char* func,
+ const char* errorObject,
+ const char* errorSubject,
+ int reason,
+ const char* msg);
+XMLSEC_EXPORT void xmlSecErrorsDefaultCallbackEnableOutput
+ (int enabled);
+
+XMLSEC_EXPORT int xmlSecErrorsGetCode (xmlSecSize pos);
+XMLSEC_EXPORT const char* xmlSecErrorsGetMsg (xmlSecSize pos);
+
+
+
+/* __FUNCTION__ is defined for MSC compiler < MS VS .NET 2003 */
+#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+#define __XMLSEC_FUNCTION__ __FUNCTION__
+#endif /* _MSC_VER */
+
+/* fallback for __FUNCTION__ */
+#if !defined(__XMLSEC_FUNCTION__)
+#define __XMLSEC_FUNCTION__ ""
+#endif /*!defined(__XMLSEC_FUNCTION__) */
+
+/**
+ * XMLSEC_ERRORS_HERE:
+ *
+ * The macro that specifies the location (file, line and function)
+ * for the xmlSecError() function.
+ */
+#define XMLSEC_ERRORS_HERE __FILE__,__LINE__,__XMLSEC_FUNCTION__
+#ifdef __GNUC__
+#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE __attribute__ ((format (printf, 7, 8)))
+#else /* __GNUC__ */
+#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE
+#endif /* __GNUC__ */
+
+/**
+ * xmlSecErrorsSafeString:
+ * @str: the string.
+ *
+ * Macro. Returns @str if it is not NULL or pointer to "NULL" otherwise.
+ */
+#define xmlSecErrorsSafeString(str) \
+ (((str) != NULL) ? ((char*)(str)) : (char*)"NULL")
+
+/**
+ * XMLSEC_ERRORS_NO_MESSAGE:
+ *
+ * Empty error message " ".
+ */
+#define XMLSEC_ERRORS_NO_MESSAGE " "
+
+
+XMLSEC_EXPORT void xmlSecError (const char* file,
+ int line,
+ const char* func,
+ const char* errorObject,
+ const char* errorSubject,
+ int reason,
+ const char* msg, ...) XMLSEC_ERRORS_PRINTF_ATTRIBUTE;
+
+
+
+/**********************************************************************
+ *
+ * Assertions
+ *
+ **********************************************************************/
+/**
+ * xmlSecAssert:
+ * @p: the expression.
+ *
+ * Macro. Verifies that @p is true and calls return() otherwise.
+ */
+#define xmlSecAssert( p ) \
+ if(!( p ) ) { \
+ xmlSecError(XMLSEC_ERRORS_HERE, \
+ NULL, \
+ #p, \
+ XMLSEC_ERRORS_R_ASSERTION, \
+ XMLSEC_ERRORS_NO_MESSAGE); \
+ return; \
+ }
+
+/**
+ * xmlSecAssert2:
+ * @p: the expression.
+ * @ret: the return value.
+ *
+ * Macro. Verifies that @p is true and calls return(@ret) otherwise.
+ */
+#define xmlSecAssert2( p, ret ) \
+ if(!( p ) ) { \
+ xmlSecError(XMLSEC_ERRORS_HERE, \
+ NULL, \
+ #p, \
+ XMLSEC_ERRORS_R_ASSERTION, \
+ XMLSEC_ERRORS_NO_MESSAGE); \
+ return(ret); \
+ }
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_ERRORS_H__ */
+
+
diff --git a/include/xmlsec/exports.h b/include/xmlsec/exports.h
new file mode 100644
index 00000000..61678c2b
--- /dev/null
+++ b/include/xmlsec/exports.h
@@ -0,0 +1,111 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Export macro declarations for Win32 platform.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_EXPORTS_H__
+#define __XMLSEC_EXPORTS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Now, the export orgy begins. The following we must do for the
+ Windows platform with MSVC compiler. */
+
+#if !defined XMLSEC_EXPORT
+# if defined(_WIN32)
+ /* if we compile libxmlsec itself: */
+# if defined(IN_XMLSEC)
+# if !defined(XMLSEC_STATIC)
+# define XMLSEC_EXPORT __declspec(dllexport)
+# else
+# define XMLSEC_EXPORT extern
+# endif
+ /* if a client program includes this file: */
+# else
+#if 1
+ /* gcc fail by initialisation of global variable with error
+ (as example in .../openssl/ciphers.c):
+ "initializer element is not constant"
+ To avoid this we shouldn't use __declspec(dllimport).
+ This will enable auto-import feature. */
+# define XMLSEC_EXPORT
+#else
+# if !defined(XMLSEC_STATIC)
+# define XMLSEC_EXPORT __declspec(dllimport)
+# else
+# define XMLSEC_EXPORT
+# endif
+#endif
+# endif
+ /* This holds on all other platforms/compilers, which are easier to
+ handle in regard to this. */
+# else
+# define XMLSEC_EXPORT
+# endif
+#endif
+
+#if !defined XMLSEC_CRYPTO_EXPORT
+# if defined(_WIN32)
+ /* if we compile libxmlsec itself: */
+# if defined(IN_XMLSEC_CRYPTO)
+# if !defined(XMLSEC_STATIC)
+# define XMLSEC_CRYPTO_EXPORT __declspec(dllexport)
+# else
+# define XMLSEC_CRYPTO_EXPORT extern
+# endif
+ /* if a client program includes this file: */
+# else
+# if !defined(XMLSEC_STATIC)
+# define XMLSEC_CRYPTO_EXPORT __declspec(dllimport)
+# else
+# define XMLSEC_CRYPTO_EXPORT
+# endif
+# endif
+ /* This holds on all other platforms/compilers, which are easier to
+ handle in regard to this. */
+# else
+# define XMLSEC_CRYPTO_EXPORT
+# endif
+#endif
+
+#if !defined XMLSEC_EXPORT_VAR
+# if defined(_WIN32)
+ /* if we compile libxmlsec itself: */
+# if defined(IN_XMLSEC)
+# if !defined(XMLSEC_STATIC)
+# define XMLSEC_EXPORT_VAR __declspec(dllexport) extern
+# else
+# define XMLSEC_EXPORT_VAR extern
+# endif
+ /* if we compile libxmlsec-crypto itself: */
+# elif defined(IN_XMLSEC_CRYPTO)
+# define XMLSEC_EXPORT_VAR extern
+ /* if a client program includes this file: */
+# else
+# if !defined(XMLSEC_STATIC)
+# define XMLSEC_EXPORT_VAR __declspec(dllimport) extern
+# else
+# define XMLSEC_EXPORT_VAR extern
+# endif
+# endif
+ /* This holds on all other platforms/compilers, which are easier to
+ handle in regard to this. */
+# else
+# define XMLSEC_EXPORT_VAR extern
+# endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_EXPORTS_H__ */
+
+
diff --git a/include/xmlsec/gcrypt/Makefile.am b/include/xmlsec/gcrypt/Makefile.am
new file mode 100644
index 00000000..82f4f90a
--- /dev/null
+++ b/include/xmlsec/gcrypt/Makefile.am
@@ -0,0 +1,13 @@
+NULL =
+
+xmlsecgcryptincdir = $(includedir)/xmlsec1/xmlsec/gcrypt
+
+xmlsecgcryptinc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecgcryptincdir)
+
diff --git a/include/xmlsec/gcrypt/Makefile.in b/include/xmlsec/gcrypt/Makefile.in
new file mode 100644
index 00000000..28044d47
--- /dev/null
+++ b/include/xmlsec/gcrypt/Makefile.in
@@ -0,0 +1,564 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec/gcrypt
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(xmlsecgcryptinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+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__installdirs = "$(DESTDIR)$(xmlsecgcryptincdir)"
+HEADERS = $(xmlsecgcryptinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+xmlsecgcryptincdir = $(includedir)/xmlsec1/xmlsec/gcrypt
+xmlsecgcryptinc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+$(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/gcrypt/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/gcrypt/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecgcryptincHEADERS: $(xmlsecgcryptinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecgcryptincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecgcryptincdir)"
+ @list='$(xmlsecgcryptinc_HEADERS)'; test -n "$(xmlsecgcryptincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecgcryptincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecgcryptincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecgcryptincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecgcryptinc_HEADERS)'; test -n "$(xmlsecgcryptincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecgcryptincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecgcryptincdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlsecgcryptincdir)"; 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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlsecgcryptincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecgcryptincHEADERS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecgcryptincHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am \
+ uninstall-xmlsecgcryptincHEADERS
+
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecgcryptincdir)
+
+# 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/include/xmlsec/gcrypt/app.h b/include/xmlsec/gcrypt/app.h
new file mode 100644
index 00000000..a0759d25
--- /dev/null
+++ b/include/xmlsec/gcrypt/app.h
@@ -0,0 +1,96 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GCRYPT_APP_H__
+#define __XMLSEC_GCRYPT_APP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+/********************************************************************
+ *
+ * Init/shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppInit (const char* config);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppShutdown (void);
+
+/********************************************************************
+ *
+ * Keys Manager
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppDefaultKeysMngrAdoptKey (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppKeysMngrCertLoadMemory (xmlSecKeysMngrPtr mngr,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+#endif /* XMLSEC_NO_X509 */
+
+
+/********************************************************************
+ *
+ * Keys
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGCryptAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGCryptAppKeyLoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGCryptAppPkcs12Load (const char *filename,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGCryptAppPkcs12LoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptAppKeyCertLoadMemory (xmlSecKeyPtr key,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+#endif /* XMLSEC_NO_X509 */
+XMLSEC_CRYPTO_EXPORT void* xmlSecGCryptAppGetDefaultPwdCallback (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GCRYPT_APP_H__ */
+
diff --git a/include/xmlsec/gcrypt/crypto.h b/include/xmlsec/gcrypt/crypto.h
new file mode 100644
index 00000000..e576d8fb
--- /dev/null
+++ b/include/xmlsec/gcrypt/crypto.h
@@ -0,0 +1,460 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GCRYPT_CRYPTO_H__
+#define __XMLSEC_GCRYPT_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_gcrypt(void);
+
+/********************************************************************
+ *
+ * Init shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptShutdown (void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptGenerateRandom (xmlSecBufferPtr buffer,
+ xmlSecSize size);
+
+
+/********************************************************************
+ *
+ * AES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_AES
+/**
+ * xmlSecGCryptKeyDataAesId:
+ *
+ * The AES key data klass.
+ */
+#define xmlSecGCryptKeyDataAesId \
+ xmlSecGCryptKeyDataAesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGCryptKeyDataAesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataAesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+/**
+ * xmlSecGCryptTransformAes128CbcId:
+ *
+ * The AES128 CBC cipher transform klass.
+ */
+#define xmlSecGCryptTransformAes128CbcId \
+ xmlSecGCryptTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformAes128CbcGetKlass(void);
+
+/**
+ * xmlSecGCryptTransformAes192CbcId:
+ *
+ * The AES192 CBC cipher transform klass.
+ */
+#define xmlSecGCryptTransformAes192CbcId \
+ xmlSecGCryptTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformAes192CbcGetKlass(void);
+
+/**
+ * xmlSecGCryptTransformAes256CbcId:
+ *
+ * The AES256 CBC cipher transform klass.
+ */
+#define xmlSecGCryptTransformAes256CbcId \
+ xmlSecGCryptTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformAes256CbcGetKlass(void);
+
+/**
+ * xmlSecGCryptTransformKWAes128Id:
+ *
+ * The AES 128 key wrap transform klass.
+ */
+#define xmlSecGCryptTransformKWAes128Id \
+ xmlSecGCryptTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformKWAes128GetKlass(void);
+
+/**
+ * xmlSecGCryptTransformKWAes192Id:
+ *
+ * The AES 192 key wrap transform klass.
+ */
+#define xmlSecGCryptTransformKWAes192Id \
+ xmlSecGCryptTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformKWAes192GetKlass(void);
+
+/**
+ * xmlSecGCryptTransformKWAes256Id:
+ *
+ * The AES 256 key wrap transform klass.
+ */
+#define xmlSecGCryptTransformKWAes256Id \
+ xmlSecGCryptTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformKWAes256GetKlass(void);
+
+
+#endif /* XMLSEC_NO_AES */
+
+/********************************************************************
+ *
+ * DES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DES
+/**
+ * xmlSecGCryptKeyDataDesId:
+ *
+ * The DES key data klass.
+ */
+#define xmlSecGCryptKeyDataDesId \
+ xmlSecGCryptKeyDataDesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGCryptKeyDataDesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataDesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+/**
+ * xmlSecGCryptTransformDes3CbcId:
+ *
+ * The DES3 CBC cipher transform klass.
+ */
+#define xmlSecGCryptTransformDes3CbcId \
+ xmlSecGCryptTransformDes3CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformDes3CbcGetKlass(void);
+
+/**
+ * xmlSecGCryptTransformKWDes3Id:
+ *
+ * The DES3 KW transform klass.
+ */
+#define xmlSecGCryptTransformKWDes3Id \
+ xmlSecGCryptTransformKWDes3GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformKWDes3GetKlass(void);
+
+#endif /* XMLSEC_NO_DES */
+
+/********************************************************************
+ *
+ * DSA transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DSA
+#include <gcrypt.h>
+
+/**
+ * xmlSecGCryptKeyDataDsaId:
+ *
+ * The DSA key klass.
+ */
+#define xmlSecGCryptKeyDataDsaId \
+ xmlSecGCryptKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGCryptKeyDataDsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataDsaAdoptKey (xmlSecKeyDataPtr data,
+ gcry_sexp_t dsa_key);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataDsaAdoptKeyPair (xmlSecKeyDataPtr data,
+ gcry_sexp_t pub_key,
+ gcry_sexp_t priv_key);
+XMLSEC_CRYPTO_EXPORT gcry_sexp_t xmlSecGCryptKeyDataDsaGetPublicKey (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT gcry_sexp_t xmlSecGCryptKeyDataDsaGetPrivateKey (xmlSecKeyDataPtr data);
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGCryptTransformDsaSha1Id:
+ *
+ * The DSA SHA1 signature transform klass.
+ */
+#define xmlSecGCryptTransformDsaSha1Id \
+ xmlSecGCryptTransformDsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformDsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#endif /* XMLSEC_NO_DSA */
+
+
+
+/********************************************************************
+ *
+ * HMAC transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_HMAC
+
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptHmacGetMinOutputLength(void);
+XMLSEC_CRYPTO_EXPORT void xmlSecGCryptHmacSetMinOutputLength(int min_length);
+
+/**
+ * xmlSecGCryptKeyDataHmacId:
+ *
+ * The HMAC key klass.
+ */
+#define xmlSecGCryptKeyDataHmacId \
+ xmlSecGCryptKeyDataHmacGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGCryptKeyDataHmacGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataHmacSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecGCryptTransformHmacMd5Id:
+ *
+ * The HMAC with MD5 signature transform klass.
+ */
+#define xmlSecGCryptTransformHmacMd5Id \
+ xmlSecGCryptTransformHmacMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformHmacMd5GetKlass(void);
+
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecGCryptTransformHmacRipemd160Id:
+ *
+ * The HMAC with RipeMD160 signature transform klass.
+ */
+#define xmlSecGCryptTransformHmacRipemd160Id \
+ xmlSecGCryptTransformHmacRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformHmacRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGCryptTransformHmacSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecGCryptTransformHmacSha1Id \
+ xmlSecGCryptTransformHmacSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformHmacSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecGCryptTransformHmacSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecGCryptTransformHmacSha256Id \
+ xmlSecGCryptTransformHmacSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformHmacSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecGCryptTransformHmacSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecGCryptTransformHmacSha384Id \
+ xmlSecGCryptTransformHmacSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformHmacSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecGCryptTransformHmacSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecGCryptTransformHmacSha512Id \
+ xmlSecGCryptTransformHmacSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformHmacSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_HMAC */
+
+/********************************************************************
+ *
+ * RSA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RSA
+#include <gcrypt.h>
+
+/**
+ * xmlSecGCryptKeyDataRsaId:
+ *
+ * The RSA key klass.
+ */
+#define xmlSecGCryptKeyDataRsaId \
+ xmlSecGCryptKeyDataRsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGCryptKeyDataRsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataRsaAdoptKey (xmlSecKeyDataPtr data,
+ gcry_sexp_t rsa_key);
+XMLSEC_CRYPTO_EXPORT int xmlSecGCryptKeyDataRsaAdoptKeyPair (xmlSecKeyDataPtr data,
+ gcry_sexp_t pub_key,
+ gcry_sexp_t priv_key);
+XMLSEC_CRYPTO_EXPORT gcry_sexp_t xmlSecGCryptKeyDataRsaGetPublicKey (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT gcry_sexp_t xmlSecGCryptKeyDataRsaGetPrivateKey (xmlSecKeyDataPtr data);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecGCryptTransformRsaMd5Id:
+ *
+ * The RSA-MD5 signature transform klass.
+ */
+#define xmlSecGCryptTransformRsaMd5Id \
+ xmlSecGCryptTransformRsaMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRsaMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecGCryptTransformRsaRipemd160Id:
+ *
+ * The RSA-RIPEMD160 signature transform klass.
+ */
+#define xmlSecGCryptTransformRsaRipemd160Id \
+ xmlSecGCryptTransformRsaRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRsaRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGCryptTransformRsaSha1Id:
+ *
+ * The RSA-SHA1 signature transform klass.
+ */
+#define xmlSecGCryptTransformRsaSha1Id \
+ xmlSecGCryptTransformRsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecGCryptTransformRsaSha256Id:
+ *
+ * The RSA-SHA256 signature transform klass.
+ */
+#define xmlSecGCryptTransformRsaSha256Id \
+ xmlSecGCryptTransformRsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecGCryptTransformRsaSha384Id:
+ *
+ * The RSA-SHA384 signature transform klass.
+ */
+#define xmlSecGCryptTransformRsaSha384Id \
+ xmlSecGCryptTransformRsaSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRsaSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecGCryptTransformRsaSha512Id:
+ *
+ * The RSA-SHA512 signature transform klass.
+ */
+#define xmlSecGCryptTransformRsaSha512Id \
+ xmlSecGCryptTransformRsaSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRsaSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_RSA */
+
+
+/********************************************************************
+ *
+ * SHA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGCryptTransformSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecGCryptTransformSha1Id \
+ xmlSecGCryptTransformSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecGCryptTransformSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecGCryptTransformSha256Id \
+ xmlSecGCryptTransformSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecGCryptTransformSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecGCryptTransformSha384Id \
+ xmlSecGCryptTransformSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecGCryptTransformSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecGCryptTransformSha512Id \
+ xmlSecGCryptTransformSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/********************************************************************
+ *
+ * Md5 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecGCryptTransformMd5Id:
+ *
+ * The MD5 digest transform klass.
+ */
+#define xmlSecGCryptTransformMd5Id \
+ xmlSecGCryptTransformMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+
+/********************************************************************
+ *
+ * RipeMD160 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecGCryptTransformRipemd160Id:
+ *
+ * The RIPEMD160 digest transform klass.
+ */
+#define xmlSecGCryptTransformRipemd160Id \
+ xmlSecGCryptTransformRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGCryptTransformRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GCRYPT_CRYPTO_H__ */
+
+#define __XMLSEC_GCRYPT_CRYPTO_H__
diff --git a/include/xmlsec/gcrypt/symbols.h b/include/xmlsec/gcrypt/symbols.h
new file mode 100644
index 00000000..db6c6e98
--- /dev/null
+++ b/include/xmlsec/gcrypt/symbols.h
@@ -0,0 +1,104 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GCRYPT_SYMBOLS_H__
+#define __XMLSEC_GCRYPT_SYMBOLS_H__
+
+#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef XMLSEC_CRYPTO_GCRYPT
+
+/********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecGCryptInit
+#define xmlSecCryptoShutdown xmlSecGCryptShutdown
+
+#define xmlSecCryptoKeysMngrInit xmlSecGCryptKeysMngrInit
+
+/********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecGCryptKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecGCryptKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecGCryptKeyDataDsaId
+#define xmlSecKeyDataHmacId xmlSecGCryptKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecGCryptKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecGCryptKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecGCryptKeyDataRawX509CertId
+
+/********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+#define xmlSecX509StoreId xmlSecGCryptX509StoreId
+
+/********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+#define xmlSecTransformAes128CbcId xmlSecGCryptTransformAes128CbcId
+#define xmlSecTransformAes192CbcId xmlSecGCryptTransformAes192CbcId
+#define xmlSecTransformAes256CbcId xmlSecGCryptTransformAes256CbcId
+#define xmlSecTransformKWAes128Id xmlSecGCryptTransformKWAes128Id
+#define xmlSecTransformKWAes192Id xmlSecGCryptTransformKWAes192Id
+#define xmlSecTransformKWAes256Id xmlSecGCryptTransformKWAes256Id
+#define xmlSecTransformDes3CbcId xmlSecGCryptTransformDes3CbcId
+#define xmlSecTransformKWDes3Id xmlSecGCryptTransformKWDes3Id
+#define xmlSecTransformDsaSha1Id xmlSecGCryptTransformDsaSha1Id
+#define xmlSecTransformHmacMd5Id xmlSecGCryptTransformHmacMd5Id
+#define xmlSecTransformHmacRipemd160Id xmlSecGCryptTransformHmacRipemd160Id
+#define xmlSecTransformHmacSha1Id xmlSecGCryptTransformHmacSha1Id
+#define xmlSecTransformRipemd160Id xmlSecGCryptTransformRipemd160Id
+#define xmlSecTransformRsaSha1Id xmlSecGCryptTransformRsaSha1Id
+#define xmlSecTransformRsaPkcs1Id xmlSecGCryptTransformRsaPkcs1Id
+#define xmlSecTransformRsaOaepId xmlSecGCryptTransformRsaOaepId
+#define xmlSecTransformSha1Id xmlSecGCryptTransformSha1Id
+
+/********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+#define xmlSecCryptoAppInit xmlSecGCryptAppInit
+#define xmlSecCryptoAppShutdown xmlSecGCryptAppShutdown
+#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecGCryptAppDefaultKeysMngrInit
+#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecGCryptAppDefaultKeysMngrAdoptKey
+#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecGCryptAppDefaultKeysMngrLoad
+#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecGCryptAppDefaultKeysMngrSave
+#define xmlSecCryptoAppKeysMngrCertLoad xmlSecGCryptAppKeysMngrCertLoad
+#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecGCryptAppKeysMngrCertLoadMemory
+#define xmlSecCryptoAppKeyLoad xmlSecGCryptAppKeyLoad
+#define xmlSecCryptoAppPkcs12Load xmlSecGCryptAppPkcs12Load
+#define xmlSecCryptoAppKeyCertLoad xmlSecGCryptAppKeyCertLoad
+#define xmlSecCryptoAppKeyLoadMemory xmlSecGCryptAppKeyLoadMemory
+#define xmlSecCryptoAppPkcs12LoadMemory xmlSecGCryptAppPkcs12LoadMemory
+#define xmlSecCryptoAppKeyCertLoadMemory xmlSecGCryptAppKeyCertLoadMemory
+#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecGCryptAppGetDefaultPwdCallback
+
+#endif /* XMLSEC_CRYPTO_GCRYPT */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GCRYPT_CRYPTO_H__ */
+
+#define __XMLSEC_GCRYPT_CRYPTO_H__
diff --git a/include/xmlsec/gnutls/Makefile.am b/include/xmlsec/gnutls/Makefile.am
new file mode 100644
index 00000000..78235c4c
--- /dev/null
+++ b/include/xmlsec/gnutls/Makefile.am
@@ -0,0 +1,14 @@
+NULL =
+
+xmlsecgnutlsincdir = $(includedir)/xmlsec1/xmlsec/gnutls
+
+xmlsecgnutlsinc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+x509.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecgnutlsincdir)
+
diff --git a/include/xmlsec/gnutls/Makefile.in b/include/xmlsec/gnutls/Makefile.in
new file mode 100644
index 00000000..a650e801
--- /dev/null
+++ b/include/xmlsec/gnutls/Makefile.in
@@ -0,0 +1,565 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec/gnutls
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(xmlsecgnutlsinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+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__installdirs = "$(DESTDIR)$(xmlsecgnutlsincdir)"
+HEADERS = $(xmlsecgnutlsinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+xmlsecgnutlsincdir = $(includedir)/xmlsec1/xmlsec/gnutls
+xmlsecgnutlsinc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+x509.h \
+$(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/gnutls/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/gnutls/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecgnutlsincHEADERS: $(xmlsecgnutlsinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecgnutlsincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecgnutlsincdir)"
+ @list='$(xmlsecgnutlsinc_HEADERS)'; test -n "$(xmlsecgnutlsincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecgnutlsincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecgnutlsincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecgnutlsincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecgnutlsinc_HEADERS)'; test -n "$(xmlsecgnutlsincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecgnutlsincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecgnutlsincdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlsecgnutlsincdir)"; 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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlsecgnutlsincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecgnutlsincHEADERS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecgnutlsincHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am \
+ uninstall-xmlsecgnutlsincHEADERS
+
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecgnutlsincdir)
+
+# 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/include/xmlsec/gnutls/app.h b/include/xmlsec/gnutls/app.h
new file mode 100644
index 00000000..4a2f3e1b
--- /dev/null
+++ b/include/xmlsec/gnutls/app.h
@@ -0,0 +1,96 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GNUTLS_APP_H__
+#define __XMLSEC_GNUTLS_APP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+/********************************************************************
+ *
+ * Init/shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppInit (const char* config);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppShutdown (void);
+
+/********************************************************************
+ *
+ * Keys Manager
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppDefaultKeysMngrAdoptKey (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppKeysMngrCertLoadMemory (xmlSecKeysMngrPtr mngr,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+#endif /* XMLSEC_NO_X509 */
+
+
+/********************************************************************
+ *
+ * Keys
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGnuTLSAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGnuTLSAppKeyLoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGnuTLSAppPkcs12Load (const char *filename,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecGnuTLSAppPkcs12LoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSAppKeyCertLoadMemory (xmlSecKeyPtr key,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+#endif /* XMLSEC_NO_X509 */
+XMLSEC_CRYPTO_EXPORT void* xmlSecGnuTLSAppGetDefaultPwdCallback (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GNUTLS_APP_H__ */
+
diff --git a/include/xmlsec/gnutls/crypto.h b/include/xmlsec/gnutls/crypto.h
new file mode 100644
index 00000000..09ac5b41
--- /dev/null
+++ b/include/xmlsec/gnutls/crypto.h
@@ -0,0 +1,462 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GNUTLS_CRYPTO_H__
+#define __XMLSEC_GNUTLS_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_gnutls(void);
+
+/********************************************************************
+ *
+ * Init shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSShutdown (void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSGenerateRandom (xmlSecBufferPtr buffer,
+ xmlSecSize size);
+
+
+/********************************************************************
+ *
+ * AES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_AES
+/**
+ * xmlSecGnuTLSKeyDataAesId:
+ *
+ * The AES key data klass.
+ */
+#define xmlSecGnuTLSKeyDataAesId \
+ xmlSecGnuTLSKeyDataAesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataAesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataAesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+/**
+ * xmlSecGnuTLSTransformAes128CbcId:
+ *
+ * The AES128 CBC cipher transform klass.
+ */
+#define xmlSecGnuTLSTransformAes128CbcId \
+ xmlSecGnuTLSTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes128CbcGetKlass(void);
+
+/**
+ * xmlSecGnuTLSTransformAes192CbcId:
+ *
+ * The AES192 CBC cipher transform klass.
+ */
+#define xmlSecGnuTLSTransformAes192CbcId \
+ xmlSecGnuTLSTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes192CbcGetKlass(void);
+
+/**
+ * xmlSecGnuTLSTransformAes256CbcId:
+ *
+ * The AES256 CBC cipher transform klass.
+ */
+#define xmlSecGnuTLSTransformAes256CbcId \
+ xmlSecGnuTLSTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes256CbcGetKlass(void);
+
+/**
+ * xmlSecGnuTLSTransformKWAes128Id:
+ *
+ * The AES 128 key wrap transform klass.
+ */
+#define xmlSecGnuTLSTransformKWAes128Id \
+ xmlSecGnuTLSTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformKWAes128GetKlass(void);
+
+/**
+ * xmlSecGnuTLSTransformKWAes192Id:
+ *
+ * The AES 192 key wrap transform klass.
+ */
+#define xmlSecGnuTLSTransformKWAes192Id \
+ xmlSecGnuTLSTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformKWAes192GetKlass(void);
+
+/**
+ * xmlSecGnuTLSTransformKWAes256Id:
+ *
+ * The AES 256 key wrap transform klass.
+ */
+#define xmlSecGnuTLSTransformKWAes256Id \
+ xmlSecGnuTLSTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformKWAes256GetKlass(void);
+
+
+#endif /* XMLSEC_NO_AES */
+
+/********************************************************************
+ *
+ * DES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DES
+/**
+ * xmlSecGnuTLSKeyDataDesId:
+ *
+ * The DES key data klass.
+ */
+#define xmlSecGnuTLSKeyDataDesId \
+ xmlSecGnuTLSKeyDataDesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataDesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataDesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+/**
+ * xmlSecGnuTLSTransformDes3CbcId:
+ *
+ * The DES3 CBC cipher transform klass.
+ */
+#define xmlSecGnuTLSTransformDes3CbcId \
+ xmlSecGnuTLSTransformDes3CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformDes3CbcGetKlass(void);
+
+/**
+ * xmlSecGnuTLSTransformKWDes3Id:
+ *
+ * The DES3 KW transform klass.
+ */
+#define xmlSecGnuTLSTransformKWDes3Id \
+ xmlSecGnuTLSTransformKWDes3GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformKWDes3GetKlass(void);
+
+#endif /* XMLSEC_NO_DES */
+
+/********************************************************************
+ *
+ * DSA transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DSA
+
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+
+/**
+ * xmlSecGnuTLSKeyDataDsaId:
+ *
+ * The DSA key klass.
+ */
+#define xmlSecGnuTLSKeyDataDsaId \
+ xmlSecGnuTLSKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataDsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataDsaAdoptPrivateKey (xmlSecKeyDataPtr data,
+ gnutls_x509_privkey_t dsa_key);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataDsaAdoptPublicKey (xmlSecKeyDataPtr data,
+ gnutls_datum_t * p,
+ gnutls_datum_t * q,
+ gnutls_datum_t * g,
+ gnutls_datum_t * y);
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGnuTLSTransformDsaSha1Id:
+ *
+ * The DSA SHA1 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformDsaSha1Id \
+ xmlSecGnuTLSTransformDsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformDsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#endif /* XMLSEC_NO_DSA */
+
+
+
+/********************************************************************
+ *
+ * HMAC transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_HMAC
+
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSHmacGetMinOutputLength(void);
+XMLSEC_CRYPTO_EXPORT void xmlSecGnuTLSHmacSetMinOutputLength(int min_length);
+
+/**
+ * xmlSecGnuTLSKeyDataHmacId:
+ *
+ * The HMAC key klass.
+ */
+#define xmlSecGnuTLSKeyDataHmacId \
+ xmlSecGnuTLSKeyDataHmacGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataHmacGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataHmacSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecGnuTLSTransformHmacMd5Id:
+ *
+ * The HMAC with MD5 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformHmacMd5Id \
+ xmlSecGnuTLSTransformHmacMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacMd5GetKlass(void);
+
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecGnuTLSTransformHmacRipemd160Id:
+ *
+ * The HMAC with RipeMD160 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformHmacRipemd160Id \
+ xmlSecGnuTLSTransformHmacRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGnuTLSTransformHmacSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformHmacSha1Id \
+ xmlSecGnuTLSTransformHmacSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecGnuTLSTransformHmacSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformHmacSha256Id \
+ xmlSecGnuTLSTransformHmacSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecGnuTLSTransformHmacSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformHmacSha384Id \
+ xmlSecGnuTLSTransformHmacSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecGnuTLSTransformHmacSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformHmacSha512Id \
+ xmlSecGnuTLSTransformHmacSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_HMAC */
+
+/********************************************************************
+ *
+ * RSA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RSA
+
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+
+/**
+ * xmlSecGnuTLSKeyDataRsaId:
+ *
+ * The RSA key klass.
+ */
+#define xmlSecGnuTLSKeyDataRsaId \
+ xmlSecGnuTLSKeyDataRsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataRsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataRsaAdoptPrivateKey (xmlSecKeyDataPtr data,
+ gnutls_x509_privkey_t rsa_key);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataRsaAdoptPublicKey (xmlSecKeyDataPtr data,
+ gnutls_datum_t * m,
+ gnutls_datum_t * e);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecGnuTLSTransformRsaMd5Id:
+ *
+ * The RSA-MD5 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformRsaMd5Id \
+ xmlSecGnuTLSTransformRsaMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRsaMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecGnuTLSTransformRsaRipemd160Id:
+ *
+ * The RSA-RIPEMD160 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformRsaRipemd160Id \
+ xmlSecGnuTLSTransformRsaRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRsaRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGnuTLSTransformRsaSha1Id:
+ *
+ * The RSA-SHA1 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformRsaSha1Id \
+ xmlSecGnuTLSTransformRsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecGnuTLSTransformRsaSha256Id:
+ *
+ * The RSA-SHA256 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformRsaSha256Id \
+ xmlSecGnuTLSTransformRsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecGnuTLSTransformRsaSha384Id:
+ *
+ * The RSA-SHA384 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformRsaSha384Id \
+ xmlSecGnuTLSTransformRsaSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRsaSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecGnuTLSTransformRsaSha512Id:
+ *
+ * The RSA-SHA512 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformRsaSha512Id \
+ xmlSecGnuTLSTransformRsaSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRsaSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_RSA */
+
+
+/********************************************************************
+ *
+ * SHA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecGnuTLSTransformSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformSha1Id \
+ xmlSecGnuTLSTransformSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecGnuTLSTransformSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformSha256Id \
+ xmlSecGnuTLSTransformSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecGnuTLSTransformSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformSha384Id \
+ xmlSecGnuTLSTransformSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecGnuTLSTransformSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecGnuTLSTransformSha512Id \
+ xmlSecGnuTLSTransformSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/********************************************************************
+ *
+ * Md5 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecGnuTLSTransformMd5Id:
+ *
+ * The MD5 digest transform klass.
+ */
+#define xmlSecGnuTLSTransformMd5Id \
+ xmlSecGnuTLSTransformMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+
+/********************************************************************
+ *
+ * RipeMD160 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecGnuTLSTransformRipemd160Id:
+ *
+ * The RIPEMD160 digest transform klass.
+ */
+#define xmlSecGnuTLSTransformRipemd160Id \
+ xmlSecGnuTLSTransformRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GNUTLS_CRYPTO_H__ */
+
+#define __XMLSEC_GNUTLS_CRYPTO_H__
diff --git a/include/xmlsec/gnutls/symbols.h b/include/xmlsec/gnutls/symbols.h
new file mode 100644
index 00000000..818035d6
--- /dev/null
+++ b/include/xmlsec/gnutls/symbols.h
@@ -0,0 +1,104 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GNUTLS_SYMBOLS_H__
+#define __XMLSEC_GNUTLS_SYMBOLS_H__
+
+#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef XMLSEC_CRYPTO_GNUTLS
+
+/********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecGnuTLSInit
+#define xmlSecCryptoShutdown xmlSecGnuTLSShutdown
+
+#define xmlSecCryptoKeysMngrInit xmlSecGnuTLSKeysMngrInit
+
+/********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecGnuTLSKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecGnuTLSKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecGnuTLSKeyDataDsaId
+#define xmlSecKeyDataHmacId xmlSecGnuTLSKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecGnuTLSKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecGnuTLSKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecGnuTLSKeyDataRawX509CertId
+
+/********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+#define xmlSecX509StoreId xmlSecGnuTLSX509StoreId
+
+/********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+#define xmlSecTransformAes128CbcId xmlSecGnuTLSTransformAes128CbcId
+#define xmlSecTransformAes192CbcId xmlSecGnuTLSTransformAes192CbcId
+#define xmlSecTransformAes256CbcId xmlSecGnuTLSTransformAes256CbcId
+#define xmlSecTransformKWAes128Id xmlSecGnuTLSTransformKWAes128Id
+#define xmlSecTransformKWAes192Id xmlSecGnuTLSTransformKWAes192Id
+#define xmlSecTransformKWAes256Id xmlSecGnuTLSTransformKWAes256Id
+#define xmlSecTransformDes3CbcId xmlSecGnuTLSTransformDes3CbcId
+#define xmlSecTransformKWDes3Id xmlSecGnuTLSTransformKWDes3Id
+#define xmlSecTransformDsaSha1Id xmlSecGnuTLSTransformDsaSha1Id
+#define xmlSecTransformHmacMd5Id xmlSecGnuTLSTransformHmacMd5Id
+#define xmlSecTransformHmacRipemd160Id xmlSecGnuTLSTransformHmacRipemd160Id
+#define xmlSecTransformHmacSha1Id xmlSecGnuTLSTransformHmacSha1Id
+#define xmlSecTransformRipemd160Id xmlSecGnuTLSTransformRipemd160Id
+#define xmlSecTransformRsaSha1Id xmlSecGnuTLSTransformRsaSha1Id
+#define xmlSecTransformRsaPkcs1Id xmlSecGnuTLSTransformRsaPkcs1Id
+#define xmlSecTransformRsaOaepId xmlSecGnuTLSTransformRsaOaepId
+#define xmlSecTransformSha1Id xmlSecGnuTLSTransformSha1Id
+
+/********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+#define xmlSecCryptoAppInit xmlSecGnuTLSAppInit
+#define xmlSecCryptoAppShutdown xmlSecGnuTLSAppShutdown
+#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecGnuTLSAppDefaultKeysMngrInit
+#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecGnuTLSAppDefaultKeysMngrAdoptKey
+#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecGnuTLSAppDefaultKeysMngrLoad
+#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecGnuTLSAppDefaultKeysMngrSave
+#define xmlSecCryptoAppKeysMngrCertLoad xmlSecGnuTLSAppKeysMngrCertLoad
+#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecGnuTLSAppKeysMngrCertLoadMemory
+#define xmlSecCryptoAppKeyLoad xmlSecGnuTLSAppKeyLoad
+#define xmlSecCryptoAppPkcs12Load xmlSecGnuTLSAppPkcs12Load
+#define xmlSecCryptoAppKeyCertLoad xmlSecGnuTLSAppKeyCertLoad
+#define xmlSecCryptoAppKeyLoadMemory xmlSecGnuTLSAppKeyLoadMemory
+#define xmlSecCryptoAppPkcs12LoadMemory xmlSecGnuTLSAppPkcs12LoadMemory
+#define xmlSecCryptoAppKeyCertLoadMemory xmlSecGnuTLSAppKeyCertLoadMemory
+#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecGnuTLSAppGetDefaultPwdCallback
+
+#endif /* XMLSEC_CRYPTO_GNUTLS */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GNUTLS_CRYPTO_H__ */
+
+#define __XMLSEC_GNUTLS_CRYPTO_H__
diff --git a/include/xmlsec/gnutls/x509.h b/include/xmlsec/gnutls/x509.h
new file mode 100644
index 00000000..c5c811ad
--- /dev/null
+++ b/include/xmlsec/gnutls/x509.h
@@ -0,0 +1,110 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2010 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_GNUTLS_X509_H__
+#define __XMLSEC_GNUTLS_X509_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifndef XMLSEC_NO_X509
+
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+
+/**************************************************************************
+ *
+ * X509 Key Data
+ *
+ *****************************************************************************/
+/**
+ * xmlSecGnuTLSKeyDataX509Id:
+ *
+ * The GnuTLS X509 data klass.
+ */
+#define xmlSecGnuTLSKeyDataX509Id \
+ xmlSecGnuTLSKeyDataX509GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataX509GetKlass (void);
+
+
+XMLSEC_CRYPTO_EXPORT gnutls_x509_crt_t xmlSecGnuTLSKeyDataX509GetKeyCert (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataX509AdoptKeyCert (xmlSecKeyDataPtr data,
+ gnutls_x509_crt_t cert);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataX509AdoptCert (xmlSecKeyDataPtr data,
+ gnutls_x509_crt_t cert);
+XMLSEC_CRYPTO_EXPORT gnutls_x509_crt_t xmlSecGnuTLSKeyDataX509GetCert (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecGnuTLSKeyDataX509GetCertsSize (xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataX509AdoptCrl (xmlSecKeyDataPtr data,
+ gnutls_x509_crl_t crl);
+XMLSEC_CRYPTO_EXPORT gnutls_x509_crl_t xmlSecGnuTLSKeyDataX509GetCrl (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecGnuTLSKeyDataX509GetCrlsSize (xmlSecKeyDataPtr data);
+
+
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecGnuTLSX509CertGetKey (gnutls_x509_crt_t cert);
+
+/**************************************************************************
+ *
+ * X509 raw cert
+ *
+ *****************************************************************************/
+/**
+ * xmlSecGnuTLSKeyDataRawX509CertId:
+ *
+ * The GnuTLS raw X509 certificate klass.
+ */
+#define xmlSecGnuTLSKeyDataRawX509CertId \
+ xmlSecGnuTLSKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataRawX509CertGetKlass (void);
+
+/**************************************************************************
+ *
+ * X509 certs store
+ *
+ *****************************************************************************/
+/**
+ * xmlSecGnuTLSX509StoreId:
+ *
+ * The GnuTLS X509 store klass.
+ */
+#define xmlSecGnuTLSX509StoreId \
+ xmlSecGnuTLSX509StoreGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecGnuTLSX509StoreGetKlass (void);
+XMLSEC_CRYPTO_EXPORT gnutls_x509_crt_t xmlSecGnuTLSX509StoreFindCert (const xmlSecKeyDataStorePtr store,
+ const xmlChar *subjectName,
+ const xmlChar *issuerName,
+ const xmlChar *issuerSerial,
+ const xmlChar *ski,
+ const xmlSecKeyInfoCtx* keyInfoCtx);
+XMLSEC_CRYPTO_EXPORT gnutls_x509_crt_t xmlSecGnuTLSX509StoreVerify (xmlSecKeyDataStorePtr store,
+ xmlSecPtrListPtr certs,
+ xmlSecPtrListPtr crls,
+ const xmlSecKeyInfoCtx* keyInfoCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSX509StoreAdoptCert (xmlSecKeyDataStorePtr store,
+ gnutls_x509_crt_t cert,
+ xmlSecKeyDataType type);
+
+
+
+
+#endif /* XMLSEC_NO_X509 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_GNUTLS_X509_H__ */
diff --git a/include/xmlsec/io.h b/include/xmlsec/io.h
new file mode 100644
index 00000000..d5a41c11
--- /dev/null
+++ b/include/xmlsec/io.h
@@ -0,0 +1,54 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Input uri transform and utility functions.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_IO_H__
+#define __XMLSEC_IO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/transforms.h>
+
+XMLSEC_EXPORT int xmlSecIOInit (void);
+XMLSEC_EXPORT void xmlSecIOShutdown (void);
+XMLSEC_EXPORT void xmlSecIOCleanupCallbacks (void);
+XMLSEC_EXPORT int xmlSecIORegisterDefaultCallbacks (void);
+XMLSEC_EXPORT int xmlSecIORegisterCallbacks (xmlInputMatchCallback matchFunc,
+ xmlInputOpenCallback openFunc,
+ xmlInputReadCallback readFunc,
+ xmlInputCloseCallback closeFunc);
+
+/********************************************************************
+ *
+ * Input URI transform
+ *
+ *******************************************************************/
+/**
+ * xmlSecTransformInputURIId:
+ *
+ * The Input URI transform id.
+ */
+#define xmlSecTransformInputURIId \
+ xmlSecTransformInputURIGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInputURIGetKlass (void);
+XMLSEC_EXPORT int xmlSecTransformInputURIOpen (xmlSecTransformPtr transform,
+ const xmlChar* uri);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_IO_H__ */
+
diff --git a/include/xmlsec/keyinfo.h b/include/xmlsec/keyinfo.h
new file mode 100644
index 00000000..5d7cf0e0
--- /dev/null
+++ b/include/xmlsec/keyinfo.h
@@ -0,0 +1,285 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * <dsig:KeyInfo> element processing
+ * (http://www.w3.org/TR/xmlSec-core/#sec-KeyInfo:
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_KEYINFO_H__
+#define __XMLSEC_KEYINFO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <time.h>
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/list.h>
+#include <xmlsec/keysdata.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+/****************************************************************************
+ *
+ * High-level functions
+ *
+ ****************************************************************************/
+XMLSEC_EXPORT int xmlSecKeyInfoNodeRead (xmlNodePtr keyInfoNode,
+ xmlSecKeyPtr key,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyInfoNodeWrite (xmlNodePtr keyInfoNode,
+ xmlSecKeyPtr key,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+/**
+ * xmlSecKeyInfoMode:
+ * @xmlSecKeyInfoModeRead: read <dsig:KeyInfo /> element.
+ * @xmlSecKeyInfoModeWrite: write <dsig:KeyInfo /> element.
+ *
+ * The @xmlSecKeyInfoCtx operation mode (read or write).
+ */
+typedef enum {
+ xmlSecKeyInfoModeRead = 0,
+ xmlSecKeyInfoModeWrite
+} xmlSecKeyInfoMode;
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND:
+ *
+ * If flag is set then we will continue reading <dsig:KeyInfo />
+ * element even when key is already found.
+ */
+#define XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND 0x00000001
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD:
+ *
+ * If flag is set then we abort if an unknown <dsig:KeyInfo />
+ * child is found.
+ */
+#define XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD 0x00000002
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_KEYNAME_STOP_ON_UNKNOWN:
+ *
+ * If flags is set then we abort if an unknown key name
+ * (content of <dsig:KeyName /> element) is found.
+ */
+#define XMLSEC_KEYINFO_FLAGS_KEYNAME_STOP_ON_UNKNOWN 0x00000004
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_KEYVALUE_STOP_ON_UNKNOWN_CHILD:
+ *
+ * If flags is set then we abort if an unknown <dsig:KeyValue />
+ * child is found.
+ */
+#define XMLSEC_KEYINFO_FLAGS_KEYVALUE_STOP_ON_UNKNOWN_CHILD 0x00000008
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_UNKNOWN_HREF:
+ *
+ * If flag is set then we abort if an unknown href attribute
+ * of <dsig:RetrievalMethod /> element is found.
+ */
+#define XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_UNKNOWN_HREF 0x00000010
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_MISMATCH_HREF:
+ *
+ * If flag is set then we abort if an href attribute <dsig:RetrievalMethod />
+ * element does not match the real key data type.
+ */
+#define XMLSEC_KEYINFO_FLAGS_RETRMETHOD_STOP_ON_MISMATCH_HREF 0x00000020
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD:
+ *
+ * If flags is set then we abort if an unknown <dsig:X509Data />
+ * child is found.
+ */
+#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD 0x00000100
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS:
+ *
+ * If flag is set then we'll load certificates from <dsig:X509Data />
+ * element without verification.
+ */
+#define XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS 0x00000200
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT:
+ *
+ * If flag is set then we'll stop when we could not resolve reference
+ * to certificate from <dsig:X509IssuerSerial />, <dsig:X509SKI /> or
+ * <dsig:X509SubjectName /> elements.
+ */
+#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT 0x00000400
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_INVALID_CERT:
+ *
+ * If the flag is set then we'll stop when <dsig:X509Data /> element
+ * processing does not return a verified certificate.
+ */
+#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_INVALID_CERT 0x00000800
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_ENCKEY_DONT_STOP_ON_FAILED_DECRYPTION:
+ *
+ * If the flag is set then we'll stop when <enc:EncryptedKey /> element
+ * processing fails.
+ */
+#define XMLSEC_KEYINFO_FLAGS_ENCKEY_DONT_STOP_ON_FAILED_DECRYPTION 0x00001000
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_STOP_ON_EMPTY_NODE:
+ *
+ * If the flag is set then we'll stop when we found an empty node.
+ * Otherwise we just ignore it.
+ */
+#define XMLSEC_KEYINFO_FLAGS_STOP_ON_EMPTY_NODE 0x00002000
+
+/**
+ * XMLSEC_KEYINFO_FLAGS_X509DATA_SKIP_STRICT_CHECKS:
+ *
+ * If the flag is set then we'll skip strict checking of certs and CRLs
+ */
+#define XMLSEC_KEYINFO_FLAGS_X509DATA_SKIP_STRICT_CHECKS 0x00004000
+
+/**
+ * xmlSecKeyInfoCtx:
+ * @userData: the pointer to user data (xmlsec and xmlsec-crypto
+ * never touch this).
+ * @flags: the bit mask for flags that control processin.
+ * @flags2: reserved for future.
+ * @mode: do we read or write <dsig:KeyInfo /> element.
+ * @keysMngr: the pointer to current keys manager.
+ * @enabledKeyData: the list of enabled @xmlSecKeyDataId (if list is
+ * empty then all data ids are enabled).
+ * @base64LineSize: the max columns size for base64 encoding.
+ * @retrievalMethodCtx: the transforms context for <dsig:RetrievalMethod />
+ * element processing.
+ * @maxRetrievalMethodLevel: the max recursion level when processing
+ * <dsig:RetrievalMethod /> element; default level is 1
+ * (see also @curRetrievalMethodLevel).
+ * @encCtx: the encryption context for <dsig:EncryptedKey /> element
+ * processing.
+ * @maxEncryptedKeyLevel: the max recursion level when processing
+ * <enc:EncryptedKey /> element; default level is 1
+ * (see @curEncryptedKeyLevel).
+ * @certsVerificationTime: the time to use for X509 certificates verification
+ * ("not valid before" and "not valid after" checks);
+ * if @certsVerificationTime is equal to 0 (default)
+ * then we verify certificates against the system's
+ * clock "now".
+ * @certsVerificationDepth: the max certifications chain length (default is 9).
+ * @pgpReserved: reserved for PGP.
+ * @curRetrievalMethodLevel: the current <dsig:RetrievalMethod /> element
+ * processing level (see @maxRetrievalMethodLevel).
+ * @curEncryptedKeyLevel: the current <enc:EncryptedKey /> element
+ * processing level (see @maxEncryptedKeyLevel).
+ * @keyReq: the current key requirements.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The <dsig:KeyInfo /> reading or writing context.
+ */
+struct _xmlSecKeyInfoCtx {
+ void* userData;
+ unsigned int flags;
+ unsigned int flags2;
+ xmlSecKeysMngrPtr keysMngr;
+ xmlSecKeyInfoMode mode;
+ xmlSecPtrList enabledKeyData;
+ int base64LineSize;
+
+ /* RetrievalMethod */
+ xmlSecTransformCtx retrievalMethodCtx;
+ int maxRetrievalMethodLevel;
+
+#ifndef XMLSEC_NO_XMLENC
+ /* EncryptedKey */
+ xmlSecEncCtxPtr encCtx;
+ int maxEncryptedKeyLevel;
+#endif /* XMLSEC_NO_XMLENC */
+
+#ifndef XMLSEC_NO_X509
+ /* x509 certificates */
+ time_t certsVerificationTime;
+ int certsVerificationDepth;
+#endif /* XMLSEC_NO_X509 */
+
+ /* PGP */
+ void* pgpReserved; /* TODO */
+
+ /* internal data */
+ int curRetrievalMethodLevel;
+ int curEncryptedKeyLevel;
+ xmlSecKeyReq keyReq;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecKeyInfoCtxPtr xmlSecKeyInfoCtxCreate (xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecKeyInfoCtxDestroy (xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyInfoCtxInitialize (xmlSecKeyInfoCtxPtr keyInfoCtx,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecKeyInfoCtxFinalize (xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT void xmlSecKeyInfoCtxReset (xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyInfoCtxCopyUserPref (xmlSecKeyInfoCtxPtr dst,
+ xmlSecKeyInfoCtxPtr src);
+XMLSEC_EXPORT int xmlSecKeyInfoCtxCreateEncCtx (xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT void xmlSecKeyInfoCtxDebugDump (xmlSecKeyInfoCtxPtr keyInfoCtx,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecKeyInfoCtxDebugXmlDump (xmlSecKeyInfoCtxPtr keyInfoCtx,
+ FILE* output);
+/**
+ * xmlSecKeyDataNameId
+ *
+ * The <dsig:KeyName> processing class.
+ */
+#define xmlSecKeyDataNameId xmlSecKeyDataNameGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataNameGetKlass (void);
+
+/**
+ * xmlSecKeyDataValueId
+ *
+ * The <dsig:KeyValue> processing class.
+ */
+#define xmlSecKeyDataValueId xmlSecKeyDataValueGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataValueGetKlass (void);
+
+/**
+ * xmlSecKeyDataRetrievalMethodId
+ *
+ * The <dsig:RetrievalMethod> processing class.
+ */
+#define xmlSecKeyDataRetrievalMethodId xmlSecKeyDataRetrievalMethodGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlass(void);
+
+#ifndef XMLSEC_NO_XMLENC
+/**
+ * xmlSecKeyDataEncryptedKeyId
+ *
+ * The <enc:EncryptedKey> processing class.
+ */
+#define xmlSecKeyDataEncryptedKeyId xmlSecKeyDataEncryptedKeyGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataEncryptedKeyGetKlass(void);
+#endif /* XMLSEC_NO_XMLENC */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_KEYINFO_H__ */
+
diff --git a/include/xmlsec/keys.h b/include/xmlsec/keys.h
new file mode 100644
index 00000000..620ad492
--- /dev/null
+++ b/include/xmlsec/keys.h
@@ -0,0 +1,278 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Keys.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_KEYS_H__
+#define __XMLSEC_KEYS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <time.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/list.h>
+#include <xmlsec/keysdata.h>
+
+
+/**
+ * xmlSecKeyUsage:
+ *
+ * The key usage.
+ */
+typedef unsigned int xmlSecKeyUsage;
+
+/**
+ * xmlSecKeyUsageSign:
+ *
+ * Key can be used in any way.
+
+ */
+#define xmlSecKeyUsageSign 0x00000001
+
+/**
+ * xmlSecKeyUsageVerify:
+ *
+ * Key for signing.
+ */
+#define xmlSecKeyUsageVerify 0x00000002
+
+/**
+ * xmlSecKeyUsageEncrypt:
+ *
+ * Key for signature verification.
+ */
+#define xmlSecKeyUsageEncrypt 0x00000004
+
+/**
+ * xmlSecKeyUsageDecrypt:
+ *
+ * An encryption key.
+ */
+#define xmlSecKeyUsageDecrypt 0x00000008
+
+/**
+ * xmlSecKeyUsageKeyExchange:
+ *
+ * The key is used for key exchange.
+ */
+#define xmlSecKeyUsageKeyExchange 0x00000010
+
+/**
+ * xmlSecKeyUsageAny:
+ *
+ * A decryption key.
+ */
+#define xmlSecKeyUsageAny 0xFFFFFFFF
+
+
+/**************************************************************************
+ *
+ * xmlSecKeyUseWith
+ *
+ *************************************************************************/
+typedef struct _xmlSecKeyUseWith xmlSecKeyUseWith, *xmlSecKeyUseWithPtr;
+XMLSEC_EXPORT int xmlSecKeyUseWithInitialize (xmlSecKeyUseWithPtr keyUseWith);
+XMLSEC_EXPORT void xmlSecKeyUseWithFinalize (xmlSecKeyUseWithPtr keyUseWith);
+XMLSEC_EXPORT void xmlSecKeyUseWithReset (xmlSecKeyUseWithPtr keyUseWith);
+XMLSEC_EXPORT int xmlSecKeyUseWithCopy (xmlSecKeyUseWithPtr dst,
+ xmlSecKeyUseWithPtr src);
+XMLSEC_EXPORT xmlSecKeyUseWithPtr xmlSecKeyUseWithCreate (const xmlChar* application,
+ const xmlChar* identifier);
+XMLSEC_EXPORT xmlSecKeyUseWithPtr xmlSecKeyUseWithDuplicate (xmlSecKeyUseWithPtr keyUseWith);
+XMLSEC_EXPORT void xmlSecKeyUseWithDestroy (xmlSecKeyUseWithPtr keyUseWith);
+XMLSEC_EXPORT int xmlSecKeyUseWithSet (xmlSecKeyUseWithPtr keyUseWith,
+ const xmlChar* application,
+ const xmlChar* identifier);
+XMLSEC_EXPORT void xmlSecKeyUseWithDebugDump (xmlSecKeyUseWithPtr keyUseWith,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecKeyUseWithDebugXmlDump (xmlSecKeyUseWithPtr keyUseWith,
+ FILE* output);
+
+/**
+ * xmlSecKeyUseWith:
+ * @application: the application.
+ * @identifier: the identifier.
+ * @reserved1: reserved for future use.
+ * @reserved2: reserved for future use.
+ *
+ * Information about application and user of the key.
+ */
+struct _xmlSecKeyUseWith {
+ xmlChar* application;
+ xmlChar* identifier;
+
+ void* reserved1;
+ void* reserved2;
+};
+
+/**
+ * xmlSecKeyUseWithPtrListId:
+ *
+ * The keys list klass.
+ */
+#define xmlSecKeyUseWithPtrListId xmlSecKeyUseWithPtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyUseWithPtrListGetKlass (void);
+
+/**************************************************************************
+ *
+ * xmlSecKeyReq - what key are we looking for?
+ *
+ *************************************************************************/
+typedef struct _xmlSecKeyReq xmlSecKeyReq, *xmlSecKeyReqPtr;
+
+/**
+ * xmlSecKeyReq:
+ * @keyId: the desired key value klass.
+ * @keyType: the desired key type.
+ * @keyUsage: the desired key usage.
+ * @keyBitsSize: the desired key size (in bits!).
+ * @keyUseWithList: the desired key use with application/identifier information.
+ * @reserved1: reserved for future use.
+ * @reserved2: reserved for future use.
+ *
+ * The key requirements information.
+ */
+struct _xmlSecKeyReq {
+ xmlSecKeyDataId keyId;
+ xmlSecKeyDataType keyType;
+ xmlSecKeyUsage keyUsage;
+ xmlSecSize keyBitsSize;
+ xmlSecPtrList keyUseWithList;
+
+ void* reserved1;
+ void* reserved2;
+};
+
+XMLSEC_EXPORT int xmlSecKeyReqInitialize (xmlSecKeyReqPtr keyReq);
+XMLSEC_EXPORT void xmlSecKeyReqFinalize (xmlSecKeyReqPtr keyReq);
+XMLSEC_EXPORT void xmlSecKeyReqReset (xmlSecKeyReqPtr keyReq);
+XMLSEC_EXPORT int xmlSecKeyReqCopy (xmlSecKeyReqPtr dst,
+ xmlSecKeyReqPtr src);
+XMLSEC_EXPORT int xmlSecKeyReqMatchKey (xmlSecKeyReqPtr keyReq,
+ xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecKeyReqMatchKeyValue (xmlSecKeyReqPtr keyReq,
+ xmlSecKeyDataPtr value);
+XMLSEC_EXPORT void xmlSecKeyReqDebugDump (xmlSecKeyReqPtr keyReq,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecKeyReqDebugXmlDump (xmlSecKeyReqPtr keyReq,
+ FILE* output);
+
+/**
+ * xmlSecKey:
+ * @name: the key name.
+ * @value: the key value.
+ * @dataList: the key data list.
+ * @usage: the key usage.
+ * @notValidBefore: the start key validity interval.
+ * @notValidAfter: the end key validity interval.
+ *
+ * The key.
+ */
+struct _xmlSecKey {
+ xmlChar* name;
+ xmlSecKeyDataPtr value;
+ xmlSecPtrListPtr dataList;
+ xmlSecKeyUsage usage;
+ time_t notValidBefore;
+ time_t notValidAfter;
+};
+
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyCreate (void);
+XMLSEC_EXPORT void xmlSecKeyDestroy (xmlSecKeyPtr key);
+XMLSEC_EXPORT void xmlSecKeyEmpty (xmlSecKeyPtr key);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyDuplicate (xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecKeyCopy (xmlSecKeyPtr keyDst,
+ xmlSecKeyPtr keySrc);
+
+XMLSEC_EXPORT const xmlChar* xmlSecKeyGetName (xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecKeySetName (xmlSecKeyPtr key,
+ const xmlChar* name);
+
+XMLSEC_EXPORT xmlSecKeyDataType xmlSecKeyGetType (xmlSecKeyPtr key);
+
+XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyGetValue (xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecKeySetValue (xmlSecKeyPtr key,
+ xmlSecKeyDataPtr value);
+
+XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyGetData (xmlSecKeyPtr key,
+ xmlSecKeyDataId dataId);
+XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyEnsureData (xmlSecKeyPtr key,
+ xmlSecKeyDataId dataId);
+XMLSEC_EXPORT int xmlSecKeyAdoptData (xmlSecKeyPtr key,
+ xmlSecKeyDataPtr data);
+
+XMLSEC_EXPORT void xmlSecKeyDebugDump (xmlSecKeyPtr key,
+ FILE *output);
+XMLSEC_EXPORT void xmlSecKeyDebugXmlDump (xmlSecKeyPtr key,
+ FILE *output);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyGenerate (xmlSecKeyDataId dataId,
+ xmlSecSize sizeBits,
+ xmlSecKeyDataType type);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyGenerateByName (const xmlChar* name,
+ xmlSecSize sizeBits,
+ xmlSecKeyDataType type);
+
+
+XMLSEC_EXPORT int xmlSecKeyMatch (xmlSecKeyPtr key,
+ const xmlChar *name,
+ xmlSecKeyReqPtr keyReq);
+
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadBuffer (xmlSecKeyDataId dataId,
+ xmlSecBuffer* buffer);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadBinaryFile (xmlSecKeyDataId dataId,
+ const char* filename);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadMemory (xmlSecKeyDataId dataId,
+ const xmlSecByte* data,
+ xmlSecSize dataSize);
+
+
+/**
+ * xmlSecKeyIsValid:
+ * @key: the pointer to key.
+ *
+ * Macro. Returns 1 if @key is not NULL and @key->id is not NULL
+ * or 0 otherwise.
+ */
+#define xmlSecKeyIsValid(key) \
+ ((( key ) != NULL) && \
+ (( key )->value != NULL) && \
+ ((( key )->value->id) != NULL))
+/**
+ * xmlSecKeyCheckId:
+ * @key: the pointer to key.
+ * @keyId: the key Id.
+ *
+ * Macro. Returns 1 if @key is valid and @key's id is equal to @keyId.
+ */
+#define xmlSecKeyCheckId(key, keyId) \
+ (xmlSecKeyIsValid(( key )) && \
+ ((( key )->value->id) == ( keyId )))
+
+
+/***********************************************************************
+ *
+ * Keys list
+ *
+ **********************************************************************/
+/**
+ * xmlSecKeyPtrListId:
+ *
+ * The keys list klass.
+ */
+#define xmlSecKeyPtrListId xmlSecKeyPtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyPtrListGetKlass (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_KEYS_H__ */
+
diff --git a/include/xmlsec/keysdata.h b/include/xmlsec/keysdata.h
new file mode 100644
index 00000000..f7554ca4
--- /dev/null
+++ b/include/xmlsec/keysdata.h
@@ -0,0 +1,837 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Key data.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_KEYSDATA_H__
+#define __XMLSEC_KEYSDATA_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/list.h>
+
+/****************************************************************************
+ *
+ * Forward declarations
+ *
+ ****************************************************************************/
+typedef const struct _xmlSecKeyDataKlass xmlSecKeyDataKlass,
+ *xmlSecKeyDataId;
+typedef const struct _xmlSecKeyDataStoreKlass xmlSecKeyDataStoreKlass,
+ *xmlSecKeyDataStoreId;
+typedef struct _xmlSecKeyDataList xmlSecKeyDataList,
+ *xmlSecKeyDataListPtr;
+
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataUsage
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataUsage:
+ *
+ * The bits mask that determines possible keys data usage.
+ */
+typedef unsigned int xmlSecKeyDataUsage;
+
+/**
+ * xmlSecKeyDataUsageUnknown:
+ *
+ * The key data usage is unknown.
+ */
+#define xmlSecKeyDataUsageUnknown 0x00000
+
+/**
+ * xmlSecKeyDataUsageKeyInfoNodeRead:
+ *
+ * The key data could be read from a <dsig:KeyInfo/> child.
+ */
+#define xmlSecKeyDataUsageKeyInfoNodeRead 0x00001
+
+/**
+ * xmlSecKeyDataUsageKeyInfoNodeWrite:
+ *
+ * The key data could be written to a <dsig:KeyInfo /> child.
+ */
+#define xmlSecKeyDataUsageKeyInfoNodeWrite 0x00002
+
+/**
+ * xmlSecKeyDataUsageKeyValueNodeRead:
+ *
+ * The key data could be read from a <dsig:KeyValue /> child.
+ */
+#define xmlSecKeyDataUsageKeyValueNodeRead 0x00004
+
+/**
+ * xmlSecKeyDataUsageKeyValueNodeWrite:
+ *
+ * The key data could be written to a <dsig:KeyValue /> child.
+ */
+#define xmlSecKeyDataUsageKeyValueNodeWrite 0x00008
+
+/**
+ * xmlSecKeyDataUsageRetrievalMethodNodeXml:
+ *
+ * The key data could be retrieved using <dsig:RetrievalMethod /> node
+ * in XML format.
+ */
+#define xmlSecKeyDataUsageRetrievalMethodNodeXml 0x00010
+
+/**
+ * xmlSecKeyDataUsageRetrievalMethodNodeBin:
+ *
+ * The key data could be retrieved using <dsig:RetrievalMethod /> node
+ * in binary format.
+ */
+#define xmlSecKeyDataUsageRetrievalMethodNodeBin 0x00020
+
+/**
+ * xmlSecKeyDataUsageAny:
+ *
+ * Any key data usage.
+ */
+#define xmlSecKeyDataUsageAny 0xFFFFF
+
+/**
+ * xmlSecKeyDataUsageKeyInfoNode:
+ *
+ * The key data could be read and written from/to a <dsig:KeyInfo /> child.
+ */
+#define xmlSecKeyDataUsageKeyInfoNode \
+ (xmlSecKeyDataUsageKeyInfoNodeRead | xmlSecKeyDataUsageKeyInfoNodeWrite)
+
+/**
+ * xmlSecKeyDataUsageKeyValueNode:
+ *
+ * The key data could be read and written from/to a <dsig:KeyValue /> child.
+ */
+#define xmlSecKeyDataUsageKeyValueNode \
+ (xmlSecKeyDataUsageKeyValueNodeRead | xmlSecKeyDataUsageKeyValueNodeWrite)
+
+/**
+ * xmlSecKeyDataUsageRetrievalMethodNode:
+ *
+ * The key data could be retrieved using <dsig:RetrievalMethod /> node
+ * in any format.
+ */
+#define xmlSecKeyDataUsageRetrievalMethodNode \
+ (xmlSecKeyDataUsageRetrievalMethodNodeXml | xmlSecKeyDataUsageRetrievalMethodNodeBin)
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataType
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataType:
+ *
+ * The key data type (public/private, session/permanet, etc.).
+ */
+typedef unsigned int xmlSecKeyDataType;
+
+/**
+ * xmlSecKeyDataTypeUnknown:
+ *
+ * The key data type is unknown (same as #xmlSecKeyDataTypeNone).
+ */
+#define xmlSecKeyDataTypeUnknown 0x0000
+
+/**
+ * xmlSecKeyDataTypeNone:
+ *
+ * The key data type is unknown (same as #xmlSecKeyDataTypeUnknown).
+ */
+#define xmlSecKeyDataTypeNone xmlSecKeyDataTypeUnknown
+
+/**
+ * xmlSecKeyDataTypePublic:
+ *
+ * The key data contain a public key.
+ */
+#define xmlSecKeyDataTypePublic 0x0001
+
+/**
+ * xmlSecKeyDataTypePrivate:
+ *
+ * The key data contain a private key.
+ */
+#define xmlSecKeyDataTypePrivate 0x0002
+
+/**
+ * xmlSecKeyDataTypeSymmetric:
+ *
+ * The key data contain a symmetric key.
+ */
+#define xmlSecKeyDataTypeSymmetric 0x0004
+
+/**
+ * xmlSecKeyDataTypeSession:
+ *
+ * The key data contain session key (one time key, not stored in keys manager).
+ */
+#define xmlSecKeyDataTypeSession 0x0008
+
+/**
+ * xmlSecKeyDataTypePermanent:
+ *
+ * The key data contain permanent key (stored in keys manager).
+ */
+#define xmlSecKeyDataTypePermanent 0x0010
+
+/**
+ * xmlSecKeyDataTypeTrusted:
+ *
+ * The key data is trusted.
+ */
+#define xmlSecKeyDataTypeTrusted 0x0100
+
+/**
+ * xmlSecKeyDataTypeAny:
+ *
+ * Any key data.
+ */
+#define xmlSecKeyDataTypeAny 0xFFFF
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataFormat
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataFormat:
+ * @xmlSecKeyDataFormatUnknown: the key data format is unknown.
+ * @xmlSecKeyDataFormatBinary: the binary key data.
+ * @xmlSecKeyDataFormatPem: the PEM key data (cert or public/private key).
+ * @xmlSecKeyDataFormatDer: the DER key data (cert or public/private key).
+ * @xmlSecKeyDataFormatPkcs8Pem: the PKCS8 PEM private key.
+ * @xmlSecKeyDataFormatPkcs8Der: the PKCS8 DER private key.
+ * @xmlSecKeyDataFormatPkcs12: the PKCS12 format (bag of keys and certs)
+ * @xmlSecKeyDataFormatCertPem: the PEM cert.
+ * @xmlSecKeyDataFormatCertDer: the DER cert.
+ *
+ * The key data format (binary, der, pem, etc.).
+ */
+typedef enum {
+ xmlSecKeyDataFormatUnknown = 0,
+ xmlSecKeyDataFormatBinary,
+ xmlSecKeyDataFormatPem,
+ xmlSecKeyDataFormatDer,
+ xmlSecKeyDataFormatPkcs8Pem,
+ xmlSecKeyDataFormatPkcs8Der,
+ xmlSecKeyDataFormatPkcs12,
+ xmlSecKeyDataFormatCertPem,
+ xmlSecKeyDataFormatCertDer
+} xmlSecKeyDataFormat;
+
+/**************************************************************************
+ *
+ * Global xmlSecKeyDataIds methods
+ *
+ *************************************************************************/
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecKeyDataIdsGet (void);
+XMLSEC_EXPORT int xmlSecKeyDataIdsInit (void);
+XMLSEC_EXPORT void xmlSecKeyDataIdsShutdown (void);
+XMLSEC_EXPORT int xmlSecKeyDataIdsRegisterDefault (void);
+XMLSEC_EXPORT int xmlSecKeyDataIdsRegister (xmlSecKeyDataId id);
+
+/**************************************************************************
+ *
+ * xmlSecKeyData
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyData:
+ * @id: the data id (#xmlSecKeyDataId).
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The key data: key value (crypto material), x509 data, pgp data, etc.
+ */
+struct _xmlSecKeyData {
+ xmlSecKeyDataId id;
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyDataCreate (xmlSecKeyDataId id);
+XMLSEC_EXPORT xmlSecKeyDataPtr xmlSecKeyDataDuplicate (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT void xmlSecKeyDataDestroy (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT int xmlSecKeyDataGenerate (xmlSecKeyDataPtr data,
+ xmlSecSize sizeBits,
+ xmlSecKeyDataType type);
+XMLSEC_EXPORT xmlSecKeyDataType xmlSecKeyDataGetType (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT xmlSecSize xmlSecKeyDataGetSize (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT const xmlChar* xmlSecKeyDataGetIdentifier (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT void xmlSecKeyDataDebugDump (xmlSecKeyDataPtr data,
+ FILE *output);
+XMLSEC_EXPORT void xmlSecKeyDataDebugXmlDump (xmlSecKeyDataPtr data,
+ FILE *output);
+XMLSEC_EXPORT int xmlSecKeyDataXmlRead (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlNodePtr node,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyDataXmlWrite (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlNodePtr node,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyDataBinRead (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyDataBinWrite (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlSecByte** buf,
+ xmlSecSize* bufSize,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+/**
+ * xmlSecKeyDataGetName:
+ * @data: the pointer to key data.
+ *
+ * Macro. Returns the key data name.
+ */
+#define xmlSecKeyDataGetName(data) \
+ ((xmlSecKeyDataIsValid((data))) ? \
+ xmlSecKeyDataKlassGetName((data)->id) : NULL)
+
+/**
+ * xmlSecKeyDataIsValid:
+ * @data: the pointer to data.
+ *
+ * Macro. Returns 1 if @data is not NULL and @data->id is not NULL
+ * or 0 otherwise.
+ */
+#define xmlSecKeyDataIsValid(data) \
+ ((( data ) != NULL) && \
+ (( data )->id != NULL) && \
+ (( data )->id->klassSize >= sizeof(xmlSecKeyDataKlass)) && \
+ (( data )->id->objSize >= sizeof(xmlSecKeyData)) && \
+ (( data )->id->name != NULL))
+/**
+ * xmlSecKeyDataCheckId:
+ * @data: the pointer to data.
+ * @dataId: the data Id.
+ *
+ * Macro. Returns 1 if @data is valid and @data's id is equal to @dataId.
+ */
+#define xmlSecKeyDataCheckId(data, dataId) \
+ (xmlSecKeyDataIsValid(( data )) && \
+ ((( data )->id) == ( dataId )))
+
+/**
+ * xmlSecKeyDataCheckUsage:
+ * @data: the pointer to data.
+ * @usg: the data usage.
+ *
+ * Macro. Returns 1 if @data is valid and could be used for @usg.
+ */
+#define xmlSecKeyDataCheckUsage(data, usg) \
+ (xmlSecKeyDataIsValid(( data )) && \
+ (((( data )->id->usage) & ( usg )) != 0))
+
+/**
+ * xmlSecKeyDataCheckSize:
+ * @data: the pointer to data.
+ * @size: the expected size.
+ *
+ * Macro. Returns 1 if @data is valid and @data's object has at least @size bytes.
+ */
+#define xmlSecKeyDataCheckSize(data, size) \
+ (xmlSecKeyDataIsValid(( data )) && \
+ (( data )->id->objSize >= size))
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataKlass
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataIdUnknown:
+ *
+ * The "unknown" id.
+ */
+#define xmlSecKeyDataIdUnknown ((xmlSecKeyDataId)NULL)
+
+/**
+ * xmlSecKeyDataInitMethod:
+ * @data: the pointer to key data.
+ *
+ * Key data specific initialization method.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataInitMethod) (xmlSecKeyDataPtr data);
+
+/**
+ * xmlSecKeyDataDuplicateMethod:
+ * @dst: the pointer to destination key data.
+ * @src: the poiniter to source key data.
+ *
+ * Key data specific duplication (copy) method.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataDuplicateMethod) (xmlSecKeyDataPtr dst,
+ xmlSecKeyDataPtr src);
+
+/**
+ * xmlSecKeyDataFinalizeMethod:
+ * @data: the data.
+ *
+ * Key data specific finalization method. All the objects and resources allocated
+ * by the key data object must be freed inside this method.
+ */
+typedef void (*xmlSecKeyDataFinalizeMethod) (xmlSecKeyDataPtr data);
+
+/**
+ * xmlSecKeyDataXmlReadMethod:
+ * @id: the data id.
+ * @key: the key.
+ * @node: the pointer to data's value XML node.
+ * @keyInfoCtx: the <dsig:KeyInfo/> node processing context.
+ *
+ * Key data specific method for reading XML node.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataXmlReadMethod) (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlNodePtr node,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+/**
+ * xmlSecKeyDataXmlWriteMethod:
+ * @id: the data id.
+ * @key: the key.
+ * @node: the pointer to data's value XML node.
+ * @keyInfoCtx: the <dsig:KeyInfo> node processing context.
+ *
+ * Key data specific method for writing XML node.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataXmlWriteMethod) (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlNodePtr node,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+/**
+ * xmlSecKeyDataBinReadMethod:
+ * @id: the data id.
+ * @key: the key.
+ * @buf: the input buffer.
+ * @bufSize: the buffer size.
+ * @keyInfoCtx: the <dsig:KeyInfo/> node processing context.
+ *
+ * Key data specific method for reading binary buffer.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataBinReadMethod) (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+/**
+ * xmlSecKeyDataBinWriteMethod:
+ * @id: the data id.
+ * @key: the key.
+ * @buf: the output buffer.
+ * @bufSize: the buffer size.
+ * @keyInfoCtx: the <dsig:KeyInfo/> node processing context.
+ *
+ * Key data specific method for reading binary buffer.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataBinWriteMethod) (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlSecByte** buf,
+ xmlSecSize* bufSize,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+/**
+ * xmlSecKeyDataGenerateMethod:
+ * @data: the pointer to key data.
+ * @sizeBits: the key data specific size.
+ * @type: the required key type (session/permanent, etc.)
+ *
+ * Key data specific method for generating new key data.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataGenerateMethod) (xmlSecKeyDataPtr data,
+ xmlSecSize sizeBits,
+ xmlSecKeyDataType type);
+
+/**
+ * xmlSecKeyDataGetTypeMethod:
+ * @data: the data.
+ *
+ * Key data specific method to get the key type.
+ *
+ * Returns: the key type.
+ */
+typedef xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod) (xmlSecKeyDataPtr data);
+
+/**
+ * xmlSecKeyDataGetSizeMethod:
+ * @data: the pointer to key data.
+ *
+ * Key data specific method to get the key size.
+ *
+ * Returns: the key size in bits.
+ */
+typedef xmlSecSize (*xmlSecKeyDataGetSizeMethod) (xmlSecKeyDataPtr data);
+
+/**
+ * xmlSecKeyDataGetIdentifierMethod:
+ * @data: the pointer to key data.
+ *
+ * Key data specific method to get the key data identifier string (for example,
+ * X509 data identifier is the subject of the verified cert).
+ *
+ * Returns: the identifier string or NULL if an error occurs.
+ */
+typedef const xmlChar* (*xmlSecKeyDataGetIdentifierMethod) (xmlSecKeyDataPtr data);
+
+/**
+ * xmlSecKeyDataDebugDumpMethod:
+ * @data: the data.
+ * @output: the FILE to print debug info (should be open for writing).
+ *
+ * Key data specific method for printing debug info.
+ */
+typedef void (*xmlSecKeyDataDebugDumpMethod) (xmlSecKeyDataPtr data,
+ FILE* output);
+
+/**
+ * xmlSecKeyDataKlass:
+ * @klassSize: the klass size.
+ * @objSize: the object size.
+ * @name: the object name.
+ * @usage: the allowed data usage.
+ * @href: the identification string (href).
+ * @dataNodeName: the data's XML node name.
+ * @dataNodeNs: the data's XML node namespace.
+ * @initialize: the initialization method.
+ * @duplicate: the duplicate (copy) method.
+ * @finalize: the finalization (destroy) method.
+ * @generate: the new data generation method.
+ * @getType: the method to access data's type information.
+ * @getSize: the method to access data's size.
+ * @getIdentifier: the method to access data's string identifier.
+ * @xmlRead: the method for reading data from XML node.
+ * @xmlWrite: the method for writing data to XML node.
+ * @binRead: the method for reading data from a binary buffer.
+ * @binWrite: the method for writing data to binary buffer.
+ * @debugDump: the method for printing debug data information.
+ * @debugXmlDump: the method for printing debug data information in XML format.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The data id (klass).
+ */
+struct _xmlSecKeyDataKlass {
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
+
+ /* data */
+ const xmlChar* name;
+ xmlSecKeyDataUsage usage;
+ const xmlChar* href;
+ const xmlChar* dataNodeName;
+ const xmlChar* dataNodeNs;
+
+ /* constructors/destructor */
+ xmlSecKeyDataInitMethod initialize;
+ xmlSecKeyDataDuplicateMethod duplicate;
+ xmlSecKeyDataFinalizeMethod finalize;
+ xmlSecKeyDataGenerateMethod generate;
+
+ /* get info */
+ xmlSecKeyDataGetTypeMethod getType;
+ xmlSecKeyDataGetSizeMethod getSize;
+ xmlSecKeyDataGetIdentifierMethod getIdentifier;
+
+ /* read/write */
+ xmlSecKeyDataXmlReadMethod xmlRead;
+ xmlSecKeyDataXmlWriteMethod xmlWrite;
+ xmlSecKeyDataBinReadMethod binRead;
+ xmlSecKeyDataBinWriteMethod binWrite;
+
+ /* debug */
+ xmlSecKeyDataDebugDumpMethod debugDump;
+ xmlSecKeyDataDebugDumpMethod debugXmlDump;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+/**
+ * xmlSecKeyDataKlassGetName:
+ * @klass: the data klass.
+ *
+ * Macro. Returns data klass name.
+ */
+#define xmlSecKeyDataKlassGetName(klass) \
+ (((klass)) ? ((klass)->name) : NULL)
+
+/***********************************************************************
+ *
+ * Key Data list
+ *
+ **********************************************************************/
+/**
+ * xmlSecKeyDataListId:
+ *
+ *
+ * The key data klasses list klass id.
+ */
+#define xmlSecKeyDataListId xmlSecKeyDataListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataListGetKlass (void);
+
+/***********************************************************************
+ *
+ * Key Data Ids list
+ *
+ **********************************************************************/
+/**
+ * xmlSecKeyDataIdListId:
+ *
+ *
+ * The key data list klass id.
+ */
+#define xmlSecKeyDataIdListId xmlSecKeyDataIdListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataIdListGetKlass (void);
+XMLSEC_EXPORT int xmlSecKeyDataIdListFind (xmlSecPtrListPtr list,
+ xmlSecKeyDataId dataId);
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByNode (xmlSecPtrListPtr list,
+ const xmlChar* nodeName,
+ const xmlChar* nodeNs,
+ xmlSecKeyDataUsage usage);
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByHref (xmlSecPtrListPtr list,
+ const xmlChar* href,
+ xmlSecKeyDataUsage usage);
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataIdListFindByName (xmlSecPtrListPtr list,
+ const xmlChar* name,
+ xmlSecKeyDataUsage usage);
+XMLSEC_EXPORT void xmlSecKeyDataIdListDebugDump (xmlSecPtrListPtr list,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecKeyDataIdListDebugXmlDump (xmlSecPtrListPtr list,
+ FILE* output);
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataBinary
+ *
+ * key (xmlSecBuffer) is located after xmlSecKeyData structure
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataBinarySize:
+ *
+ * The binary key data object size.
+ */
+#define xmlSecKeyDataBinarySize \
+ (sizeof(xmlSecKeyData) + sizeof(xmlSecBuffer))
+
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueInitialize (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueDuplicate (xmlSecKeyDataPtr dst,
+ xmlSecKeyDataPtr src);
+XMLSEC_EXPORT void xmlSecKeyDataBinaryValueFinalize (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueXmlRead (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlNodePtr node,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueXmlWrite (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlNodePtr node,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueBinRead (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueBinWrite (xmlSecKeyDataId id,
+ xmlSecKeyPtr key,
+ xmlSecByte** buf,
+ xmlSecSize* bufSize,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT void xmlSecKeyDataBinaryValueDebugDump (xmlSecKeyDataPtr data,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecKeyDataBinaryValueDebugXmlDump (xmlSecKeyDataPtr data,
+ FILE* output);
+
+XMLSEC_EXPORT xmlSecSize xmlSecKeyDataBinaryValueGetSize (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecKeyDataBinaryValueGetBuffer (xmlSecKeyDataPtr data);
+XMLSEC_EXPORT int xmlSecKeyDataBinaryValueSetBuffer (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataStore
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataStore:
+ * @id: the store id (#xmlSecKeyDataStoreId).
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The key data store. Key data store holds common key data specific information
+ * required for key data processing. For example, X509 data store may hold
+ * information about trusted (root) certificates.
+ */
+struct _xmlSecKeyDataStore {
+ xmlSecKeyDataStoreId id;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate (xmlSecKeyDataStoreId id);
+XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyDataStorePtr store);
+
+/**
+ * xmlSecKeyDataStoreGetName:
+ * @store: the pointer to store.
+ *
+ * Macro. Returns key data store name.
+ */
+#define xmlSecKeyDataStoreGetName(store) \
+ ((xmlSecKeyDataStoreIsValid((store))) ? \
+ xmlSecKeyDataStoreKlassGetName((store)->id) : NULL)
+
+/**
+ * xmlSecKeyDataStoreIsValid:
+ * @store: the pointer to store.
+ *
+ * Macro. Returns 1 if @store is not NULL and @store->id is not NULL
+ * or 0 otherwise.
+ */
+#define xmlSecKeyDataStoreIsValid(store) \
+ ((( store ) != NULL) && ((( store )->id) != NULL))
+/**
+ * xmlSecKeyDataStoreCheckId:
+ * @store: the pointer to store.
+ * @storeId: the store Id.
+ *
+ * Macro. Returns 1 if @store is valid and @store's id is equal to @storeId.
+ */
+#define xmlSecKeyDataStoreCheckId(store, storeId) \
+ (xmlSecKeyDataStoreIsValid(( store )) && \
+ ((( store )->id) == ( storeId )))
+
+/**
+ * xmlSecKeyDataStoreCheckSize:
+ * @store: the pointer to store.
+ * @size: the expected size.
+ *
+ * Macro. Returns 1 if @data is valid and @stores's object has at least @size bytes.
+ */
+#define xmlSecKeyDataStoreCheckSize(store, size) \
+ (xmlSecKeyDataStoreIsValid(( store )) && \
+ (( store )->id->objSize >= size))
+
+
+/**************************************************************************
+ *
+ * xmlSecKeyDataStoreKlass
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyDataStoreIdUnknown:
+ *
+ * The "unknown" id.
+ */
+#define xmlSecKeyDataStoreIdUnknown NULL
+
+/**
+ * xmlSecKeyDataStoreInitializeMethod:
+ * @store: the data store.
+ *
+ * Key data store specific initialization method.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyDataStoreInitializeMethod) (xmlSecKeyDataStorePtr store);
+
+/**
+ * xmlSecKeyDataStoreFinalizeMethod:
+ * @store: the data store.
+ *
+ * Key data store specific finalization (destroy) method.
+ */
+typedef void (*xmlSecKeyDataStoreFinalizeMethod) (xmlSecKeyDataStorePtr store);
+
+/**
+ * xmlSecKeyDataStoreKlass:
+ * @klassSize: the data store klass size.
+ * @objSize: the data store obj size.
+ * @name: the store's name.
+ * @initialize: the store's initialization method.
+ * @finalize: the store's finalization (destroy) method.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The data store id (klass).
+ */
+struct _xmlSecKeyDataStoreKlass {
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
+
+ /* data */
+ const xmlChar* name;
+
+ /* constructors/destructor */
+ xmlSecKeyDataStoreInitializeMethod initialize;
+ xmlSecKeyDataStoreFinalizeMethod finalize;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+/**
+ * xmlSecKeyDataStoreKlassGetName:
+ * @klass: the pointer to store klass.
+ *
+ * Macro. Returns store klass name.
+ */
+#define xmlSecKeyDataStoreKlassGetName(klass) \
+ (((klass)) ? ((klass)->name) : NULL)
+
+/***********************************************************************
+ *
+ * Key Data Store list
+ *
+ **********************************************************************/
+/**
+ * xmlSecKeyDataStorePtrListId:
+ *
+ * The data store list id (klass).
+ */
+#define xmlSecKeyDataStorePtrListId xmlSecKeyDataStorePtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass (void);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_KEYSDATA_H__ */
diff --git a/include/xmlsec/keysmngr.h b/include/xmlsec/keysmngr.h
new file mode 100644
index 00000000..289da4c1
--- /dev/null
+++ b/include/xmlsec/keysmngr.h
@@ -0,0 +1,264 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Keys Manager
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_KEYSMGMR_H__
+#define __XMLSEC_KEYSMGMR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/list.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysdata.h>
+#include <xmlsec/keyinfo.h>
+
+typedef const struct _xmlSecKeyKlass xmlSecKeyKlass,
+ *xmlSecKeyId;
+typedef const struct _xmlSecKeyStoreKlass xmlSecKeyStoreKlass,
+ *xmlSecKeyStoreId;
+
+
+/****************************************************************************
+ *
+ * Keys Manager
+ *
+ ***************************************************************************/
+XMLSEC_EXPORT xmlSecKeysMngrPtr xmlSecKeysMngrCreate (void);
+XMLSEC_EXPORT void xmlSecKeysMngrDestroy (xmlSecKeysMngrPtr mngr);
+
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrFindKey (xmlSecKeysMngrPtr mngr,
+ const xmlChar* name,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+XMLSEC_EXPORT int xmlSecKeysMngrAdoptKeysStore (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyStorePtr store);
+XMLSEC_EXPORT xmlSecKeyStorePtr xmlSecKeysMngrGetKeysStore (xmlSecKeysMngrPtr mngr);
+
+XMLSEC_EXPORT int xmlSecKeysMngrAdoptDataStore (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyDataStorePtr store);
+XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeysMngrGetDataStore (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyDataStoreId id);
+
+/**
+ * xmlSecGetKeyCallback:
+ * @keyInfoNode: the pointer to <dsig:KeyInfo/> node.
+ * @keyInfoCtx: the pointer to <dsig:KeyInfo/> node processing context.
+ *
+ * Reads the <dsig:KeyInfo/> node @keyInfoNode and extracts the key.
+ *
+ * Returns: the pointer to key or NULL if the key is not found or
+ * an error occurs.
+ */
+typedef xmlSecKeyPtr (*xmlSecGetKeyCallback) (xmlNodePtr keyInfoNode,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+/**
+ * xmlSecKeysMngr:
+ * @keysStore: the key store (list of keys known to keys manager).
+ * @storesList: the list of key data stores known to keys manager.
+ * @getKey: the callback used to read <dsig:KeyInfo/> node.
+ *
+ * The keys manager structure.
+ */
+struct _xmlSecKeysMngr {
+ xmlSecKeyStorePtr keysStore;
+ xmlSecPtrList storesList;
+ xmlSecGetKeyCallback getKey;
+};
+
+
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrGetKey (xmlNodePtr keyInfoNode,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+
+/**************************************************************************
+ *
+ * xmlSecKeyStore
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyStore:
+ * @id: the store id (#xmlSecKeyStoreId).
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The keys store.
+ */
+struct _xmlSecKeyStore {
+ xmlSecKeyStoreId id;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecKeyStorePtr xmlSecKeyStoreCreate (xmlSecKeyStoreId id);
+XMLSEC_EXPORT void xmlSecKeyStoreDestroy (xmlSecKeyStorePtr store);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyStoreFindKey (xmlSecKeyStorePtr store,
+ const xmlChar* name,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+/**
+ * xmlSecKeyStoreGetName:
+ * @store: the pointer to store.
+ *
+ * Macro. Returns key store name.
+ */
+#define xmlSecKeyStoreGetName(store) \
+ ((xmlSecKeyStoreIsValid((store))) ? \
+ xmlSecKeyStoreKlassGetName((store)->id) : NULL)
+
+/**
+ * xmlSecKeyStoreIsValid:
+ * @store: the pointer to store.
+ *
+ * Macro. Returns 1 if @store is not NULL and @store->id is not NULL
+ * or 0 otherwise.
+ */
+#define xmlSecKeyStoreIsValid(store) \
+ ((( store ) != NULL) && ((( store )->id) != NULL))
+/**
+ * xmlSecKeyStoreCheckId:
+ * @store: the pointer to store.
+ * @storeId: the store Id.
+ *
+ * Macro. Returns 1 if @store is valid and @store's id is equal to @storeId.
+ */
+#define xmlSecKeyStoreCheckId(store, storeId) \
+ (xmlSecKeyStoreIsValid(( store )) && \
+ ((( store )->id) == ( storeId )))
+
+/**
+ * xmlSecKeyStoreCheckSize:
+ * @store: the pointer to store.
+ * @size: the expected size.
+ *
+ * Macro. Returns 1 if @store is valid and @stores's object has at least @size bytes.
+ */
+#define xmlSecKeyStoreCheckSize(store, size) \
+ (xmlSecKeyStoreIsValid(( store )) && \
+ (( store )->id->objSize >= size))
+
+
+/**************************************************************************
+ *
+ * xmlSecKeyStoreKlass
+ *
+ *************************************************************************/
+/**
+ * xmlSecKeyStoreIdUnknown:
+ *
+ * The "unknown" id.
+ */
+#define xmlSecKeyStoreIdUnknown ((xmlSecKeyDataStoreId)NULL)
+
+/**
+ * xmlSecKeyStoreInitializeMethod:
+ * @store: the store.
+ *
+ * Keys store specific initialization method.
+ *
+ * Returns: 0 on success or a negative value if an error occurs.
+ */
+typedef int (*xmlSecKeyStoreInitializeMethod) (xmlSecKeyStorePtr store);
+
+/**
+ * xmlSecKeyStoreFinalizeMethod:
+ * @store: the store.
+ *
+ * Keys store specific finalization (destroy) method.
+ */
+typedef void (*xmlSecKeyStoreFinalizeMethod) (xmlSecKeyStorePtr store);
+
+/**
+ * xmlSecKeyStoreFindKeyMethod:
+ * @store: the store.
+ * @name: the desired key name.
+ * @keyInfoCtx: the pointer to key info context.
+ *
+ * Keys store specific find method. The caller is responsible for destroying
+ * the returned key using #xmlSecKeyDestroy method.
+ *
+ * Returns: the pointer to a key or NULL if key is not found or an error occurs.
+ */
+typedef xmlSecKeyPtr (*xmlSecKeyStoreFindKeyMethod) (xmlSecKeyStorePtr store,
+ const xmlChar* name,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+/**
+ * xmlSecKeyStoreKlass:
+ * @klassSize: the store klass size.
+ * @objSize: the store obj size.
+ * @name: the store's name.
+ * @initialize: the store's initialization method.
+ * @finalize: the store's finalization (destroy) method.
+ * @findKey: the store's find method.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The keys store id (klass).
+ */
+struct _xmlSecKeyStoreKlass {
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
+
+ /* data */
+ const xmlChar* name;
+
+ /* constructors/destructor */
+ xmlSecKeyStoreInitializeMethod initialize;
+ xmlSecKeyStoreFinalizeMethod finalize;
+ xmlSecKeyStoreFindKeyMethod findKey;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+/**
+ * xmlSecKeyStoreKlassGetName:
+ * @klass: the pointer to store klass.
+ *
+ * Macro. Returns store klass name.
+ */
+#define xmlSecKeyStoreKlassGetName(klass) \
+ (((klass)) ? ((klass)->name) : NULL)
+
+
+/****************************************************************************
+ *
+ * Simple Keys Store
+ *
+ ***************************************************************************/
+/**
+ * xmlSecSimpleKeysStoreId:
+ *
+ * A simple keys store klass id.
+ */
+#define xmlSecSimpleKeysStoreId xmlSecSimpleKeysStoreGetKlass()
+XMLSEC_EXPORT xmlSecKeyStoreId xmlSecSimpleKeysStoreGetKlass (void);
+XMLSEC_EXPORT int xmlSecSimpleKeysStoreAdoptKey (xmlSecKeyStorePtr store,
+ xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecSimpleKeysStoreLoad (xmlSecKeyStorePtr store,
+ const char *uri,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT int xmlSecSimpleKeysStoreSave (xmlSecKeyStorePtr store,
+ const char *filename,
+ xmlSecKeyDataType type);
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecSimpleKeysStoreGetKeys (xmlSecKeyStorePtr store);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_KEYSMGMR_H__ */
+
diff --git a/include/xmlsec/list.h b/include/xmlsec/list.h
new file mode 100644
index 00000000..fed98706
--- /dev/null
+++ b/include/xmlsec/list.h
@@ -0,0 +1,194 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * List of pointers.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_LIST_H__
+#define __XMLSEC_LIST_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+
+typedef const struct _xmlSecPtrListKlass xmlSecPtrListKlass,
+ *xmlSecPtrListId;
+typedef struct _xmlSecPtrList xmlSecPtrList,
+ *xmlSecPtrListPtr;
+
+/**
+ * xmlSecPtrList:
+ * @id: the list items description.
+ * @data: the list data.
+ * @use: the current list size.
+ * @max: the max (allocated) list size.
+ * @allocMode: the memory allocation mode.
+ *
+ * The pointers list.
+ */
+struct _xmlSecPtrList {
+ xmlSecPtrListId id;
+
+ xmlSecPtr* data;
+ xmlSecSize use;
+ xmlSecSize max;
+ xmlSecAllocMode allocMode;
+};
+
+XMLSEC_EXPORT void xmlSecPtrListSetDefaultAllocMode(xmlSecAllocMode defAllocMode,
+ xmlSecSize defInitialSize);
+
+
+XMLSEC_EXPORT int xmlSecPtrListInitialize (xmlSecPtrListPtr list,
+ xmlSecPtrListId id);
+XMLSEC_EXPORT void xmlSecPtrListFinalize (xmlSecPtrListPtr list);
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecPtrListCreate (xmlSecPtrListId id);
+XMLSEC_EXPORT void xmlSecPtrListDestroy (xmlSecPtrListPtr list);
+XMLSEC_EXPORT void xmlSecPtrListEmpty (xmlSecPtrListPtr list);
+
+XMLSEC_EXPORT int xmlSecPtrListCopy (xmlSecPtrListPtr dst,
+ xmlSecPtrListPtr src);
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecPtrListDuplicate (xmlSecPtrListPtr list);
+
+XMLSEC_EXPORT xmlSecSize xmlSecPtrListGetSize (xmlSecPtrListPtr list);
+XMLSEC_EXPORT xmlSecPtr xmlSecPtrListGetItem (xmlSecPtrListPtr list,
+ xmlSecSize pos);
+XMLSEC_EXPORT int xmlSecPtrListAdd (xmlSecPtrListPtr list,
+ xmlSecPtr item);
+XMLSEC_EXPORT int xmlSecPtrListSet (xmlSecPtrListPtr list,
+ xmlSecPtr item,
+ xmlSecSize pos);
+XMLSEC_EXPORT int xmlSecPtrListRemove (xmlSecPtrListPtr list,
+ xmlSecSize pos);
+XMLSEC_EXPORT xmlSecPtr xmlSecPtrListRemoveAndReturn (xmlSecPtrListPtr list,
+ xmlSecSize pos);
+XMLSEC_EXPORT void xmlSecPtrListDebugDump (xmlSecPtrListPtr list,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecPtrListDebugXmlDump (xmlSecPtrListPtr list,
+ FILE* output);
+
+/**
+ * xmlSecPtrListGetName:
+ * @list: the ponter to list.
+ *
+ * Macro. Returns lists's name.
+ */
+#define xmlSecPtrListGetName(list) \
+ (((list) != NULL) ? xmlSecPtrListKlassGetName((list)->id) : NULL)
+
+/**
+ * xmlSecPtrListIsValid:
+ * @list: the pointer to list.
+ *
+ * Macro. Returns 1 if @list is not NULL and @list->id is not NULL
+ * or 0 otherwise.
+ */
+#define xmlSecPtrListIsValid(list) \
+ ((( list ) != NULL) && ((( list )->id) != NULL))
+/**
+ * xmlSecPtrListCheckId:
+ * @list: the pointer to list.
+ * @dataId: the list Id.
+ *
+ * Macro. Returns 1 if @list is valid and @list's id is equal to @dataId.
+ */
+#define xmlSecPtrListCheckId(list, dataId) \
+ (xmlSecPtrListIsValid(( list )) && \
+ ((( list )->id) == ( dataId )))
+
+
+/**************************************************************************
+ *
+ * List klass
+ *
+ *************************************************************************/
+/**
+ * xmlSecPtrListIdUnknown:
+ *
+ * The "unknown" id.
+ */
+#define xmlSecPtrListIdUnknown NULL
+
+/**
+ * xmlSecPtrDuplicateItemMethod:
+ * @ptr: the poinetr to list item.
+ *
+ * Duplicates item @ptr.
+ *
+ * Returns: pointer to new item copy or NULL if an error occurs.
+ */
+typedef xmlSecPtr (*xmlSecPtrDuplicateItemMethod) (xmlSecPtr ptr);
+
+/**
+ * xmlSecPtrDestroyItemMethod:
+ * @ptr: the poinetr to list item.
+ *
+ * Destroys list item @ptr.
+ */
+typedef void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr ptr);
+
+/**
+ * xmlSecPtrDebugDumpItemMethod:
+ * @ptr: the poinetr to list item.
+ * @output: the output FILE.
+ *
+ * Prints debug information about @item to @output.
+ */
+typedef void (*xmlSecPtrDebugDumpItemMethod) (xmlSecPtr ptr,
+ FILE* output);
+
+/**
+ * xmlSecPtrListKlass:
+ * @name: the list klass name.
+ * @duplicateItem: the duplciate item method.
+ * @destroyItem: the destroy item method.
+ * @debugDumpItem: the debug dump item method.
+ * @debugXmlDumpItem: the debug dump item in xml format method.
+ *
+ * List klass.
+ */
+struct _xmlSecPtrListKlass {
+ const xmlChar* name;
+ xmlSecPtrDuplicateItemMethod duplicateItem;
+ xmlSecPtrDestroyItemMethod destroyItem;
+ xmlSecPtrDebugDumpItemMethod debugDumpItem;
+ xmlSecPtrDebugDumpItemMethod debugXmlDumpItem;
+};
+
+/**
+ * xmlSecPtrListKlassGetName:
+ * @klass: the list klass.
+ *2
+
+ * Macro. Returns the list klass name.
+ */
+#define xmlSecPtrListKlassGetName(klass) \
+ (((klass) != NULL) ? ((klass)->name) : NULL)
+
+/**************************************************************************
+ *
+ * xmlSecStringListKlass
+ *
+ *************************************************************************/
+/**
+ * xmlSecStringListId:
+ *
+ * Strings list klass.
+ */
+#define xmlSecStringListId \
+ xmlSecStringListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecStringListGetKlass (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_LIST_H__ */
+
diff --git a/include/xmlsec/membuf.h b/include/xmlsec/membuf.h
new file mode 100644
index 00000000..fbe6da41
--- /dev/null
+++ b/include/xmlsec/membuf.h
@@ -0,0 +1,44 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Memory buffer transform
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_MEMBUF_H__
+#define __XMLSEC_MEMBUF_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/transforms.h>
+
+/********************************************************************
+ *
+ * Memory Buffer transform
+ *
+ *******************************************************************/
+/**
+ * xmlSecTransformMemBufId:
+ *
+ * The Memory Buffer transform klass.
+ */
+#define xmlSecTransformMemBufId \
+ xmlSecTransformMemBufGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMemBufGetKlass (void);
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecTransformMemBufGetBuffer (xmlSecTransformPtr transform);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MEMBUF_H__ */
+
diff --git a/include/xmlsec/mscrypto/Makefile.am b/include/xmlsec/mscrypto/Makefile.am
new file mode 100644
index 00000000..18dff94c
--- /dev/null
+++ b/include/xmlsec/mscrypto/Makefile.am
@@ -0,0 +1,16 @@
+NULL =
+
+xmlsecmscryptoincdir = $(includedir)/xmlsec1/xmlsec/mscrypto
+
+xmlsecmscryptoinc_HEADERS = \
+app.h \
+certkeys.h \
+crypto.h \
+keysstore.h \
+symbols.h \
+x509.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecmscryptoincdir)
+
diff --git a/include/xmlsec/mscrypto/Makefile.in b/include/xmlsec/mscrypto/Makefile.in
new file mode 100644
index 00000000..477c5cb3
--- /dev/null
+++ b/include/xmlsec/mscrypto/Makefile.in
@@ -0,0 +1,567 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec/mscrypto
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(xmlsecmscryptoinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+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__installdirs = "$(DESTDIR)$(xmlsecmscryptoincdir)"
+HEADERS = $(xmlsecmscryptoinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+xmlsecmscryptoincdir = $(includedir)/xmlsec1/xmlsec/mscrypto
+xmlsecmscryptoinc_HEADERS = \
+app.h \
+certkeys.h \
+crypto.h \
+keysstore.h \
+symbols.h \
+x509.h \
+$(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/mscrypto/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/mscrypto/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecmscryptoincHEADERS: $(xmlsecmscryptoinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecmscryptoincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecmscryptoincdir)"
+ @list='$(xmlsecmscryptoinc_HEADERS)'; test -n "$(xmlsecmscryptoincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecmscryptoincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecmscryptoincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecmscryptoincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecmscryptoinc_HEADERS)'; test -n "$(xmlsecmscryptoincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecmscryptoincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecmscryptoincdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlsecmscryptoincdir)"; 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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlsecmscryptoincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecmscryptoincHEADERS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecmscryptoincHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am \
+ uninstall-xmlsecmscryptoincHEADERS
+
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecmscryptoincdir)
+
+# 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/include/xmlsec/mscrypto/app.h b/include/xmlsec/mscrypto/app.h
new file mode 100644
index 00000000..3d23d0e5
--- /dev/null
+++ b/include/xmlsec/mscrypto/app.h
@@ -0,0 +1,116 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
+ */
+#ifndef __XMLSEC_MSCRYPTO_APP_H__
+#define __XMLSEC_MSCRYPTO_APP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+#include <windows.h>
+#include <wincrypt.h>
+
+/********************************************************************
+ *
+ * Init/shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppInit (const char* config);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppShutdown (void);
+XMLSEC_CRYPTO_EXPORT LPCTSTR xmlSecMSCryptoAppGetCertStoreName (void);
+
+/********************************************************************
+ *
+ * Keys Manager
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptKey (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrPrivateKeyLoad (xmlSecKeysMngrPtr mngr,
+ HCRYPTKEY hKey);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrPublicKeyLoad (xmlSecKeysMngrPtr mngr,
+ HCRYPTKEY hKey);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrSymKeyLoad (xmlSecKeysMngrPtr mngr,
+ HCRYPTKEY hKey);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptKeyStore (xmlSecKeysMngrPtr mngr,
+ HCERTSTORE keyStore);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptTrustedStore(xmlSecKeysMngrPtr mngr,
+ HCERTSTORE trustedStore);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppDefaultKeysMngrAdoptUntrustedStore(xmlSecKeysMngrPtr mngr,
+ HCERTSTORE untrustedStore);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeysMngrCertLoadMemory (xmlSecKeysMngrPtr mngr,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+
+#endif /* XMLSEC_NO_X509 */
+
+
+/********************************************************************
+ *
+ * Keys
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppKeyLoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppPkcs12Load (const char *filename,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecMSCryptoAppPkcs12LoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoAppKeyCertLoadMemory (xmlSecKeyPtr key,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+#endif /* XMLSEC_NO_X509 */
+XMLSEC_CRYPTO_EXPORT void* xmlSecMSCryptoAppGetDefaultPwdCallback (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MSCRYPTO_APP_H__ */
+
diff --git a/include/xmlsec/mscrypto/certkeys.h b/include/xmlsec/mscrypto/certkeys.h
new file mode 100644
index 00000000..1f285656
--- /dev/null
+++ b/include/xmlsec/mscrypto/certkeys.h
@@ -0,0 +1,42 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
+ */
+#ifndef __XMLSEC_MSCRYPTO_CERTKEYS_H__
+#define __XMLSEC_MSCRYPTO_CERTKEYS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <windows.h>
+#include <wincrypt.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+
+XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT xmlSecMSCryptoKeyDataGetCert (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT HCRYPTKEY xmlSecMSCryptoKeyDataGetKey (xmlSecKeyDataPtr data,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT HCRYPTKEY xmlSecMSCryptoKeyDataGetDecryptKey(xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT xmlSecMSCryptoCertDup (PCCERT_CONTEXT pCert);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecMSCryptoCertAdopt (PCCERT_CONTEXT pCert,
+ xmlSecKeyDataType type);
+
+XMLSEC_CRYPTO_EXPORT HCRYPTPROV xmlSecMSCryptoKeyDataGetMSCryptoProvider(xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT DWORD xmlSecMSCryptoKeyDataGetMSCryptoKeySpec(xmlSecKeyDataPtr data);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MSCRYPTO_PCCERT_CONTEXT_H__ */
+
+
diff --git a/include/xmlsec/mscrypto/crypto.h b/include/xmlsec/mscrypto/crypto.h
new file mode 100644
index 00000000..5f3142fc
--- /dev/null
+++ b/include/xmlsec/mscrypto/crypto.h
@@ -0,0 +1,516 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
+ */
+#ifndef __XMLSEC_MSCRYPTO_CRYPTO_H__
+#define __XMLSEC_MSCRYPTO_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <windows.h>
+#include <wincrypt.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_mscrypto(void);
+
+/********************************************************************
+ *
+ * Init shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoShutdown (void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoGenerateRandom (xmlSecBufferPtr buffer,
+ size_t size);
+
+XMLSEC_CRYPTO_EXPORT void xmlSecMSCryptoErrorsDefaultCallback(const char* file,
+ int line,
+ const char* func,
+ const char* errorObject,
+ const char* errorSubject,
+ int reason,
+ const char* msg);
+
+/******************************************************************************
+ *
+ * String encoding conversion utils
+ *
+ ******************************************************************************/
+XMLSEC_CRYPTO_EXPORT LPWSTR xmlSecMSCryptoConvertLocaleToUnicode(const char* str);
+
+XMLSEC_CRYPTO_EXPORT LPWSTR xmlSecMSCryptoConvertUtf8ToUnicode (const xmlChar* str);
+XMLSEC_CRYPTO_EXPORT xmlChar* xmlSecMSCryptoConvertUnicodeToUtf8 (LPCWSTR str);
+
+XMLSEC_CRYPTO_EXPORT xmlChar* xmlSecMSCryptoConvertLocaleToUtf8 (const char* str);
+XMLSEC_CRYPTO_EXPORT char* xmlSecMSCryptoConvertUtf8ToLocale (const xmlChar* str);
+
+XMLSEC_CRYPTO_EXPORT xmlChar* xmlSecMSCryptoConvertTstrToUtf8 (LPCTSTR str);
+XMLSEC_CRYPTO_EXPORT LPTSTR xmlSecMSCryptoConvertUtf8ToTstr (const xmlChar* str);
+
+
+/********************************************************************
+ *
+ * DSA transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DSA
+
+/**
+ * xmlSecMSCryptoKeyDataDsaId:
+ *
+ * The DSA key klass.
+ */
+#define xmlSecMSCryptoKeyDataDsaId \
+ xmlSecMSCryptoKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDsaGetKlass (void);
+
+/**
+ * xmlSecMSCryptoTransformDsaSha1Id:
+ *
+ * The DSA SHA1 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformDsaSha1Id \
+ xmlSecMSCryptoTransformDsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformDsaSha1GetKlass(void);
+
+#endif /* XMLSEC_NO_DSA */
+
+/********************************************************************
+ *
+ * GOST2001 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_GOST
+
+/**
+ * xmlSecMSCryptoKeyDataGost2001Id:
+ *
+ * The GOST2001 key klass.
+ */
+#define xmlSecMSCryptoKeyDataGost2001Id \
+ xmlSecMSCryptoKeyDataGost2001GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataGost2001GetKlass (void);
+
+/**
+ * xmlSecMSCryptoTransformGost2001GostR3411_94Id:
+ *
+ * The GOST2001 GOSTR3411_94 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformGost2001GostR3411_94Id \
+ xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass(void);
+
+#endif /* XMLSEC_NO_GOST */
+
+/********************************************************************
+ *
+ * RSA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RSA
+
+/**
+ * xmlSecMSCryptoKeyDataRsaId:
+ *
+ * The RSA key klass.
+ */
+#define xmlSecMSCryptoKeyDataRsaId \
+ xmlSecMSCryptoKeyDataRsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataRsaGetKlass(void);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecMSCryptoTransformRsaMd5Id:
+ *
+ * The RSA-MD5 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaMd5Id \
+ xmlSecMSCryptoTransformRsaMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecMSCryptoTransformRsaSha1Id:
+ *
+ * The RSA-SHA1 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaSha1Id \
+ xmlSecMSCryptoTransformRsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecMSCryptoTransformRsaSha256Id:
+ *
+ * The RSA-SHA256 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaSha256Id \
+ xmlSecMSCryptoTransformRsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecMSCryptoTransformRsaSha384Id:
+ *
+ * The RSA-SHA384 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaSha384Id \
+ xmlSecMSCryptoTransformRsaSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecMSCryptoTransformRsaSha512Id:
+ *
+ * The RSA-SHA512 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaSha512Id \
+ xmlSecMSCryptoTransformRsaSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/**
+ * xmlSecMSCryptoTransformRsaPkcs1Id:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaPkcs1Id \
+ xmlSecMSCryptoTransformRsaPkcs1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaPkcs1GetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformRsaOaepId:
+ *
+ * The RSA OAEP key transport transform klass.
+ */
+#define xmlSecMSCryptoTransformRsaOaepId \
+ xmlSecMSCryptoTransformRsaOaepGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaOaepGetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformRsaOaepId:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+/*
+#define xmlSecMSCryptoTransformRsaOaepId \
+ xmlSecMSCryptoTransformRsaOaepGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaOaepGetKlass(void);
+*/
+#endif /* XMLSEC_NO_RSA */
+
+/********************************************************************
+ *
+ * Md5 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecMSCryptoTransformMd5Id:
+ *
+ * The MD5 digest transform klass.
+ */
+#define xmlSecMSCryptoTransformMd5Id \
+ xmlSecMSCryptoTransformMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+
+/********************************************************************
+ *
+ * SHA1 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA1
+
+/**
+ * xmlSecMSCryptoTransformSha1Id:
+ *
+ * The SHA1 digest transform klass.
+ */
+#define xmlSecMSCryptoTransformSha1Id \
+ xmlSecMSCryptoTransformSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+/********************************************************************
+ *
+ * SHA256 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA256
+
+/**
+ * xmlSecMSCryptoTransformSha256Id:
+ *
+ * The SHA256 digest transform klass.
+ */
+#define xmlSecMSCryptoTransformSha256Id \
+ xmlSecMSCryptoTransformSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+/********************************************************************
+ *
+ * SHA384 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA384
+
+/**
+ * xmlSecMSCryptoTransformSha384Id:
+ *
+ * The SHA384 digest transform klass.
+ */
+#define xmlSecMSCryptoTransformSha384Id \
+ xmlSecMSCryptoTransformSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+/********************************************************************
+ *
+ * SHA512 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA512
+
+/**
+ * xmlSecMSCryptoTransformSha512Id:
+ *
+ * The SHA512 digest transform klass.
+ */
+#define xmlSecMSCryptoTransformSha512Id \
+ xmlSecMSCryptoTransformSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/********************************************************************
+ *
+ * GOSTR3411_94 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_GOST
+
+/**
+ * xmlSecMSCryptoTransformGostR3411_94Id:
+ *
+ * The GOSTR3411_94 digest transform klass.
+ */
+#define xmlSecMSCryptoTransformGostR3411_94Id \
+ xmlSecMSCryptoTransformGostR3411_94GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGostR3411_94GetKlass(void);
+#endif /* XMLSEC_NO_GOST */
+
+/********************************************************************
+ *
+ * AES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_AES
+/**
+ * xmlSecMSCryptoKeyDataAesId:
+ *
+ * The AES key data klass.
+ */
+#define xmlSecMSCryptoKeyDataAesId \
+ xmlSecMSCryptoKeyDataAesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataAesGetKlass(void);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeyDataAesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+/**
+ * xmlSecMSCryptoTransformAes128CbcId:
+ *
+ * The AES128 CBC cipher transform klass.
+ */
+#define xmlSecMSCryptoTransformAes128CbcId \
+ xmlSecMSCryptoTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes128CbcGetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformAes192CbcId:
+ *
+ * The AES192 CBC cipher transform klass.
+ */
+#define xmlSecMSCryptoTransformAes192CbcId \
+ xmlSecMSCryptoTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes192CbcGetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformAes256CbcId:
+ *
+ * The AES256 CBC cipher transform klass.
+ */
+#define xmlSecMSCryptoTransformAes256CbcId \
+ xmlSecMSCryptoTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes256CbcGetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformKWAes128Id:
+ *
+ * The AES 128 key wrap transform klass.
+ */
+#define xmlSecMSCryptoTransformKWAes128Id \
+ xmlSecMSCryptoTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformKWAes128GetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformKWAes192Id:
+ *
+ * The AES 192 key wrap transform klass.
+ */
+#define xmlSecMSCryptoTransformKWAes192Id \
+ xmlSecMSCryptoTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformKWAes192GetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformKWAes256Id:
+ *
+ * The AES 256 key wrap transform klass.
+ */
+#define xmlSecMSCryptoTransformKWAes256Id \
+ xmlSecMSCryptoTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformKWAes256GetKlass(void);
+
+#endif /* XMLSEC_NO_AES */
+
+
+/********************************************************************
+ *
+ * DES transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DES
+
+/**
+ * xmlSecMSCryptoKeyDataDesId:
+ *
+ * The DES key data klass.
+ */
+#define xmlSecMSCryptoKeyDataDesId \
+ xmlSecMSCryptoKeyDataDesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDesGetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformDes3CbcId:
+ *
+ * The DES3 CBC cipher transform klass.
+ */
+#define xmlSecMSCryptoTransformDes3CbcId \
+ xmlSecMSCryptoTransformDes3CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformDes3CbcGetKlass(void);
+
+/**
+ * xmlSecMSCryptoTransformKWDes3Id:
+ *
+ * The DES3 KW transform klass.
+ */
+#define xmlSecMSCryptoTransformKWDes3Id \
+ xmlSecMSCryptoTransformKWDes3GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformKWDes3GetKlass(void);
+
+#endif /* XMLSEC_NO_DES */
+
+
+/********************************************************************
+ *
+ * HMAC transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_HMAC
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoHmacGetMinOutputLength(void);
+XMLSEC_CRYPTO_EXPORT void xmlSecMSCryptoHmacSetMinOutputLength(int min_length);
+
+/**
+ * xmlSecMSCryptoKeyDataHmacId:
+ *
+ * The DHMAC key klass.
+ */
+#define xmlSecMSCryptoKeyDataHmacId \
+ xmlSecMSCryptoKeyDataHmacGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataHmacGetKlass(void);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeyDataHmacSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecMSCryptoTransformHmacMd5Id:
+ *
+ * The HMAC with MD5 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformHmacMd5Id \
+ xmlSecMSCryptoTransformHmacMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformHmacMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecMSCryptoTransformHmacSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformHmacSha1Id \
+ xmlSecMSCryptoTransformHmacSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformHmacSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecMSCryptoTransformHmacSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformHmacSha256Id \
+ xmlSecMSCryptoTransformHmacSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformHmacSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecMSCryptoTransformHmacSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformHmacSha384Id \
+ xmlSecMSCryptoTransformHmacSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformHmacSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecMSCryptoTransformHmacSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecMSCryptoTransformHmacSha512Id \
+ xmlSecMSCryptoTransformHmacSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformHmacSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_HMAC */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MSCRYPTO_CRYPTO_H__ */
+
+#define __XMLSEC_MSCRYPTO_CRYPTO_H__
diff --git a/include/xmlsec/mscrypto/keysstore.h b/include/xmlsec/mscrypto/keysstore.h
new file mode 100644
index 00000000..afaf6a95
--- /dev/null
+++ b/include/xmlsec/mscrypto/keysstore.h
@@ -0,0 +1,48 @@
+/**
+ * XMLSec library
+ *
+ * MSCrypto keys store
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for precise wording.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
+ */
+#ifndef __XMLSEC_MSCRYPTO_KEYSSTORE_H__
+#define __XMLSEC_MSCRYPTO_KEYSSTORE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+
+/****************************************************************************
+ *
+ * MSCrypto Keys Store
+ *
+ ***************************************************************************/
+/**
+ * xmlSecMSCryptoKeysStoreId:
+ *
+ * A MSCrypto keys store klass id.
+ */
+#define xmlSecMSCryptoKeysStoreId xmlSecMSCryptoKeysStoreGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyStoreId xmlSecMSCryptoKeysStoreGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeysStoreAdoptKey (xmlSecKeyStorePtr store,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeysStoreLoad (xmlSecKeyStorePtr store,
+ const char *uri,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeysStoreSave (xmlSecKeyStorePtr store,
+ const char *filename,
+ xmlSecKeyDataType type);
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MSCRYPTO_KEYSSTORE_H__ */
+
diff --git a/include/xmlsec/mscrypto/symbols.h b/include/xmlsec/mscrypto/symbols.h
new file mode 100644
index 00000000..17000ccf
--- /dev/null
+++ b/include/xmlsec/mscrypto/symbols.h
@@ -0,0 +1,114 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
+ */
+#ifndef __XMLSEC_MSCRYPTO_SYMBOLS_H__
+#define __XMLSEC_MSCRYPTO_SYMBOLS_H__
+
+#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef XMLSEC_CRYPTO_MSCRYPTO
+
+/********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecMSCryptoInit
+#define xmlSecCryptoShutdown xmlSecMSCryptoShutdown
+
+#define xmlSecCryptoKeysMngrInit xmlSecMSCryptoKeysMngrInit
+
+/********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecMSCryptoKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecMSCryptoKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecMSCryptoKeyDataDsaId
+#define xmlSecKeyDataGost2001Id xmlSecMSCryptoKeyDataGost2001Id
+#define xmlSecKeyDataHmacId xmlSecMSCryptoKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecMSCryptoKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecMSCryptoKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecMSCryptoKeyDataRawX509CertId
+
+/********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+#define xmlSecX509StoreId xmlSecMSCryptoX509StoreId
+
+/********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+#define xmlSecTransformAes128CbcId xmlSecMSCryptoTransformAes128CbcId
+#define xmlSecTransformAes192CbcId xmlSecMSCryptoTransformAes192CbcId
+#define xmlSecTransformAes256CbcId xmlSecMSCryptoTransformAes256CbcId
+#define xmlSecTransformKWAes128Id xmlSecMSCryptoTransformKWAes128Id
+#define xmlSecTransformKWAes192Id xmlSecMSCryptoTransformKWAes192Id
+#define xmlSecTransformKWAes256Id xmlSecMSCryptoTransformKWAes256Id
+#define xmlSecTransformDes3CbcId xmlSecMSCryptoTransformDes3CbcId
+#define xmlSecTransformKWDes3Id xmlSecMSCryptoTransformKWDes3Id
+#define xmlSecTransformDsaSha1Id xmlSecMSCryptoTransformDsaSha1Id
+#define xmlSecTransformGost2001GostR3411_94Id xmlSecMSCryptoTransformGost2001GostR3411_94Id
+#define xmlSecTransformHmacMd5Id xmlSecMSCryptoTransformHmacMd5Id
+#define xmlSecTransformHmacRipemd160Id xmlSecMSCryptoTransformHmacRipemd160Id
+#define xmlSecTransformHmacSha1Id xmlSecMSCryptoTransformHmacSha1Id
+#define xmlSecTransformRipemd160Id xmlSecMSCryptoTransformRipemd160Id
+#define xmlSecTransformRsaSha1Id xmlSecMSCryptoTransformRsaSha1Id
+#define xmlSecTransformRsaSha256Id xmlSecMSCryptoTransformRsaSha256Id
+#define xmlSecTransformRsaSha384Id xmlSecMSCryptoTransformRsaSha384Id
+#define xmlSecTransformRsaSha512Id xmlSecMSCryptoTransformRsaSha512Id
+#define xmlSecTransformRsaPkcs1Id xmlSecMSCryptoTransformRsaPkcs1Id
+#define xmlSecTransformRsaOaepId xmlSecMSCryptoTransformRsaOaepId
+#define xmlSecTransformSha1Id xmlSecMSCryptoTransformSha1Id
+#define xmlSecTransformSha256Id xmlSecMSCryptoTransformSha256Id
+#define xmlSecTransformSha384Id xmlSecMSCryptoTransformSha384Id
+#define xmlSecTransformSha512Id xmlSecMSCryptoTransformSha512Id
+#define xmlSecTransformGostR3411_94Id xmlSecMSCryptoTransformGostR3411_94Id
+
+/********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+#define xmlSecCryptoAppInit xmlSecMSCryptoAppInit
+#define xmlSecCryptoAppShutdown xmlSecMSCryptoAppShutdown
+#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecMSCryptoAppDefaultKeysMngrInit
+#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecMSCryptoAppDefaultKeysMngrAdoptKey
+#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecMSCryptoAppDefaultKeysMngrLoad
+#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecMSCryptoAppDefaultKeysMngrSave
+#define xmlSecCryptoAppKeysMngrCertLoad xmlSecMSCryptoAppKeysMngrCertLoad
+#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecMSCryptoAppKeysMngrCertLoadMemory
+#define xmlSecCryptoAppKeyLoad xmlSecMSCryptoAppKeyLoad
+#define xmlSecCryptoAppPkcs12Load xmlSecMSCryptoAppPkcs12Load
+#define xmlSecCryptoAppKeyCertLoad xmlSecMSCryptoAppKeyCertLoad
+#define xmlSecCryptoAppKeyLoadMemory xmlSecMSCryptoAppKeyLoadMemory
+#define xmlSecCryptoAppPkcs12LoadMemory xmlSecMSCryptoAppPkcs12LoadMemory
+#define xmlSecCryptoAppKeyCertLoadMemory xmlSecMSCryptoAppKeyCertLoadMemory
+#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecMSCryptoAppGetDefaultPwdCallback
+
+#endif /* XMLSEC_CRYPTO_MSCRYPTO */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MSCRYPTO_CRYPTO_H__ */
+
+#define __XMLSEC_MSCRYPTO_CRYPTO_H__
+
diff --git a/include/xmlsec/mscrypto/x509.h b/include/xmlsec/mscrypto/x509.h
new file mode 100644
index 00000000..60066bda
--- /dev/null
+++ b/include/xmlsec/mscrypto/x509.h
@@ -0,0 +1,92 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
+ */
+#ifndef __XMLSEC_MSCRYPTO_X509_H__
+#define __XMLSEC_MSCRYPTO_X509_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifndef XMLSEC_NO_X509
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+#include <windows.h>
+#include <wincrypt.h>
+
+/**
+ * xmlSecMSCryptoKeyDataX509Id:
+ *
+ * The MSCrypto X509 data klass.
+ */
+#define xmlSecMSCryptoKeyDataX509Id \
+ xmlSecMSCryptoKeyDataX509GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataX509GetKlass(void);
+
+XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT xmlSecMSCryptoKeyDataX509GetKeyCert (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeyDataX509AdoptKeyCert (xmlSecKeyDataPtr data,
+ PCCERT_CONTEXT cert);
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeyDataX509AdoptCert (xmlSecKeyDataPtr data,
+ PCCERT_CONTEXT cert);
+XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT xmlSecMSCryptoKeyDataX509GetCert (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecMSCryptoKeyDataX509GetCertsSize (xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoKeyDataX509AdoptCrl (xmlSecKeyDataPtr data,
+ PCCRL_CONTEXT crl);
+XMLSEC_CRYPTO_EXPORT PCCRL_CONTEXT xmlSecMSCryptoKeyDataX509GetCrl (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecMSCryptoKeyDataX509GetCrlsSize (xmlSecKeyDataPtr data);
+
+
+/**
+ * xmlSecMSCryptoKeyDataRawX509CertId:
+ *
+ * The MSCrypto raw X509 certificate klass.
+ */
+#define xmlSecMSCryptoKeyDataRawX509CertId \
+ xmlSecMSCryptoKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataRawX509CertGetKlass(void);
+
+/**
+ * xmlSecMSCryptoX509StoreId:
+ *
+ * The MSCrypto X509 store klass.
+ */
+#define xmlSecMSCryptoX509StoreId \
+ xmlSecMSCryptoX509StoreGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecMSCryptoX509StoreGetKlass(void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoX509StoreAdoptCert (xmlSecKeyDataStorePtr store,
+ PCCERT_CONTEXT cert,
+ xmlSecKeyDataType type);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoX509StoreAdoptKeyStore (xmlSecKeyDataStorePtr store,
+ HCERTSTORE keyStore);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoX509StoreAdoptTrustedStore(xmlSecKeyDataStorePtr store,
+ HCERTSTORE trustedStore);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecMSCryptoX509StoreAdoptUntrustedStore(xmlSecKeyDataStorePtr store,
+ HCERTSTORE untrustedStore);
+
+XMLSEC_CRYPTO_EXPORT void xmlSecMSCryptoX509StoreEnableSystemTrustedCerts(xmlSecKeyDataStorePtr store,
+ int val);
+
+
+
+#endif /* XMLSEC_NO_X509 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_MSCRYPTO_X509_H__ */
diff --git a/include/xmlsec/nodeset.h b/include/xmlsec/nodeset.h
new file mode 100644
index 00000000..104e04fa
--- /dev/null
+++ b/include/xmlsec/nodeset.h
@@ -0,0 +1,139 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Enchanced nodes Set
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_NODESET_H__
+#define __XMLSEC_NODESET_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#include <xmlsec/xmlsec.h>
+
+typedef struct _xmlSecNodeSet xmlSecNodeSet, *xmlSecNodeSetPtr;
+
+/**
+ * xmlSecNodeSetType:
+ * @xmlSecNodeSetNormal: nodes set = nodes in the list.
+ * @xmlSecNodeSetInvert: nodes set = all document nodes minus nodes in the list.
+ * @xmlSecNodeSetTree: nodes set = nodes in the list and all their subtress.
+ * @xmlSecNodeSetTreeWithoutComments: nodes set = nodes in the list and
+ * all their subtress but no comment nodes.
+ * @xmlSecNodeSetTreeInvert: nodes set = all document nodes minus nodes in the
+ * list and all their subtress.
+ * @xmlSecNodeSetTreeWithoutCommentsInvert: nodes set = all document nodes
+ * minus (nodes in the list and all their subtress
+ * plus all comment nodes).
+ * @xmlSecNodeSetList: nodes set = all nodes in the chidren list of nodes sets.
+ *
+ * The basic nodes sets types.
+ */
+typedef enum {
+ xmlSecNodeSetNormal = 0,
+ xmlSecNodeSetInvert,
+ xmlSecNodeSetTree,
+ xmlSecNodeSetTreeWithoutComments,
+ xmlSecNodeSetTreeInvert,
+ xmlSecNodeSetTreeWithoutCommentsInvert,
+ xmlSecNodeSetList
+} xmlSecNodeSetType;
+
+/**
+ * xmlSecNodeSetOp:
+ * @xmlSecNodeSetIntersection: intersection.
+ * @xmlSecNodeSetSubtraction: subtraction.
+ * @xmlSecNodeSetUnion: union.
+ *
+ * The simple nodes sets operations.
+ */
+typedef enum {
+ xmlSecNodeSetIntersection = 0,
+ xmlSecNodeSetSubtraction,
+ xmlSecNodeSetUnion
+} xmlSecNodeSetOp;
+
+/**
+ * xmlSecNodeSet:
+ * @nodes: the nodes list.
+ * @doc: the parent XML document.
+ * @destroyDoc: the flag: if set to 1 then @doc will
+ * be destroyed when node set is destroyed.
+ * @type: the nodes set type.
+ * @op: the operation type.
+ * @next: the next nodes set.
+ * @prev: the previous nodes set.
+ * @children: the children list (valid only if type
+ * equal to #xmlSecNodeSetList).
+ *
+ * The enchanced nodes set.
+ */
+struct _xmlSecNodeSet {
+ xmlNodeSetPtr nodes;
+ xmlDocPtr doc;
+ int destroyDoc;
+ xmlSecNodeSetType type;
+ xmlSecNodeSetOp op;
+ xmlSecNodeSetPtr next;
+ xmlSecNodeSetPtr prev;
+ xmlSecNodeSetPtr children;
+};
+
+/**
+ * xmlSecNodeSetWalkCallback:
+ * @nset: the pointer to #xmlSecNodeSet structure.
+ * @cur: the pointer current XML node.
+ * @parent: the pointer to the @cur parent node.
+ * @data: the pointer to application specific data.
+ *
+ * The callback function called once per each node in the nodes set.
+ *
+ * Returns: 0 on success or a negative value if an error occurs
+ * an walk procedure should be interrupted.
+ */
+typedef int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr nset,
+ xmlNodePtr cur,
+ xmlNodePtr parent,
+ void* data);
+
+XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ xmlSecNodeSetType type);
+XMLSEC_EXPORT void xmlSecNodeSetDestroy (xmlSecNodeSetPtr nset);
+XMLSEC_EXPORT void xmlSecNodeSetDocDestroy (xmlSecNodeSetPtr nset);
+XMLSEC_EXPORT int xmlSecNodeSetContains (xmlSecNodeSetPtr nset,
+ xmlNodePtr node,
+ xmlNodePtr parent);
+XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr nset,
+ xmlSecNodeSetPtr newNSet,
+ xmlSecNodeSetOp op);
+XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr nset,
+ xmlSecNodeSetPtr newNSet,
+ xmlSecNodeSetOp op);
+XMLSEC_EXPORT xmlSecNodeSetPtr xmlSecNodeSetGetChildren(xmlDocPtr doc,
+ const xmlNodePtr parent,
+ int withComments,
+ int invert);
+XMLSEC_EXPORT int xmlSecNodeSetWalk (xmlSecNodeSetPtr nset,
+ xmlSecNodeSetWalkCallback walkFunc,
+ void* data);
+XMLSEC_EXPORT int xmlSecNodeSetDumpTextNodes(xmlSecNodeSetPtr nset,
+ xmlOutputBufferPtr out);
+XMLSEC_EXPORT void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr nset,
+ FILE *output);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NODESET_H__ */
+
diff --git a/include/xmlsec/nss/Makefile.am b/include/xmlsec/nss/Makefile.am
new file mode 100644
index 00000000..e3521622
--- /dev/null
+++ b/include/xmlsec/nss/Makefile.am
@@ -0,0 +1,17 @@
+NULL =
+
+xmlsecnssincdir = $(includedir)/xmlsec1/xmlsec/nss
+
+xmlsecnssinc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+bignum.h \
+keysstore.h \
+pkikeys.h \
+x509.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecnssincdir)
+
diff --git a/include/xmlsec/nss/Makefile.in b/include/xmlsec/nss/Makefile.in
new file mode 100644
index 00000000..0fcffb44
--- /dev/null
+++ b/include/xmlsec/nss/Makefile.in
@@ -0,0 +1,568 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec/nss
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(xmlsecnssinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+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__installdirs = "$(DESTDIR)$(xmlsecnssincdir)"
+HEADERS = $(xmlsecnssinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+xmlsecnssincdir = $(includedir)/xmlsec1/xmlsec/nss
+xmlsecnssinc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+bignum.h \
+keysstore.h \
+pkikeys.h \
+x509.h \
+$(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/nss/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/nss/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecnssincHEADERS: $(xmlsecnssinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecnssincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecnssincdir)"
+ @list='$(xmlsecnssinc_HEADERS)'; test -n "$(xmlsecnssincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecnssincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecnssincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecnssincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecnssinc_HEADERS)'; test -n "$(xmlsecnssincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecnssincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecnssincdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlsecnssincdir)"; 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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlsecnssincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecnssincHEADERS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecnssincHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am \
+ uninstall-xmlsecnssincHEADERS
+
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecnssincdir)
+
+# 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/include/xmlsec/nss/app.h b/include/xmlsec/nss/app.h
new file mode 100644
index 00000000..387d34ec
--- /dev/null
+++ b/include/xmlsec/nss/app.h
@@ -0,0 +1,118 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ * Copyright (c) 2003 America Online, Inc. All rights reserved.
+ */
+#ifndef __XMLSEC_NSS_APP_H__
+#define __XMLSEC_NSS_APP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <nspr.h>
+#include <nss.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+/********************************************************************
+ *
+ * Init/shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppInit (const char* config);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppShutdown (void);
+
+/********************************************************************
+ *
+ * Keys Manager
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrAdoptKey(xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr,
+ const xmlSecByte *data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeysMngrCertLoadSECItem(xmlSecKeysMngrPtr mngr,
+ SECItem* secItem,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+#endif /* XMLSEC_NO_X509 */
+
+
+/********************************************************************
+ *
+ * Keys
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyLoadMemory (const xmlSecByte *data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyLoadSECItem (SECItem* secItem,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppPkcs12Load (const char *filename,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppPkcs12LoadMemory (const xmlSecByte *data,
+ xmlSecSize dataSize,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppPkcs12LoadSECItem (SECItem* secItem,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeyCertLoadMemory (xmlSecKeyPtr key,
+ const xmlSecByte *data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssAppKeyCertLoadSECItem (xmlSecKeyPtr key,
+ SECItem* secItem,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecNssAppKeyFromCertLoadSECItem(SECItem* secItem,
+ xmlSecKeyDataFormat format);
+#endif /* XMLSEC_NO_X509 */
+XMLSEC_CRYPTO_EXPORT void* xmlSecNssAppGetDefaultPwdCallback(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_APP_H__ */
+
diff --git a/include/xmlsec/nss/bignum.h b/include/xmlsec/nss/bignum.h
new file mode 100644
index 00000000..6147d20a
--- /dev/null
+++ b/include/xmlsec/nss/bignum.h
@@ -0,0 +1,37 @@
+/**
+ * XMLSec library
+ *
+ * Reading/writing BIGNUM values
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for precise wording.
+ *
+ * Copyright (c) 2003 America Online, Inc. All rights reserved.
+ */
+#ifndef __XMLSEC_NSS_BIGNUM_H__
+#define __XMLSEC_NSS_BIGNUM_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <nspr.h>
+#include <nss.h>
+
+#include <xmlsec/xmlsec.h>
+
+XMLSEC_CRYPTO_EXPORT SECItem* xmlSecNssNodeGetBigNumValue (PRArenaPool *arena,
+ const xmlNodePtr cur,
+ SECItem *a);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssNodeSetBigNumValue (xmlNodePtr cur,
+ const SECItem *a,
+ int addLineBreaks);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_BIGNUM_H__ */
+
diff --git a/include/xmlsec/nss/crypto.h b/include/xmlsec/nss/crypto.h
new file mode 100644
index 00000000..a1c11948
--- /dev/null
+++ b/include/xmlsec/nss/crypto.h
@@ -0,0 +1,469 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ * Copyright (c) 2003 America Online, Inc. All rights reserved.
+ */
+#ifndef __XMLSEC_NSS_CRYPTO_H__
+#define __XMLSEC_NSS_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <nspr.h>
+#include <nss.h>
+#include <pk11func.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_nss(void);
+
+/********************************************************************
+ *
+ * Init shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecNssInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssShutdown (void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssGenerateRandom (xmlSecBufferPtr buffer,
+ xmlSecSize size);
+
+XMLSEC_CRYPTO_EXPORT void xmlSecNssErrorsDefaultCallback (const char* file,
+ int line,
+ const char* func,
+ const char* errorObject,
+ const char* errorSubject,
+ int reason,
+ const char* msg);
+
+XMLSEC_CRYPTO_EXPORT PK11SlotInfo * xmlSecNssGetInternalKeySlot(void);
+
+/********************************************************************
+ *
+ * AES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_AES
+/**
+ * xmlSecNssKeyDataAesId:
+ *
+ * The AES key data klass.
+ */
+#define xmlSecNssKeyDataAesId \
+ xmlSecNssKeyDataAesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataAesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataAesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+/**
+ * xmlSecNssTransformAes128CbcId:
+ *
+ * The AES128 CBC cipher transform klass.
+ */
+#define xmlSecNssTransformAes128CbcId \
+ xmlSecNssTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes128CbcGetKlass(void);
+
+/**
+ * xmlSecNssTransformAes192CbcId:
+ *
+ * The AES192 CBC cipher transform klass.
+ */
+#define xmlSecNssTransformAes192CbcId \
+ xmlSecNssTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes192CbcGetKlass(void);
+
+/**
+ * xmlSecNssTransformAes256CbcId:
+ *
+ * The AES256 CBC cipher transform klass.
+ */
+#define xmlSecNssTransformAes256CbcId \
+ xmlSecNssTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes256CbcGetKlass(void);
+
+/**
+ * xmlSecNssTransformKWAes128Id:
+ *
+ * The AES 128 key wrap transform klass.
+ */
+#define xmlSecNssTransformKWAes128Id \
+ xmlSecNssTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes128GetKlass(void);
+
+/**
+ * xmlSecNssTransformKWAes192Id:
+ *
+ * The AES 192 key wrap transform klass.
+ */
+#define xmlSecNssTransformKWAes192Id \
+ xmlSecNssTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes192GetKlass(void);
+
+/**
+ * xmlSecNssTransformKWAes256Id:
+ *
+ * The AES 256 key wrap transform klass.
+ */
+#define xmlSecNssTransformKWAes256Id \
+ xmlSecNssTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes256GetKlass(void);
+
+#endif /* XMLSEC_NO_AES */
+
+/********************************************************************
+ *
+ * DES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DES
+/**
+ * xmlSecNssKeyDataDesId:
+ *
+ * The DES key data klass.
+ */
+#define xmlSecNssKeyDataDesId \
+ xmlSecNssKeyDataDesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataDesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataDesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+/**
+ * xmlSecNssTransformDes3CbcId:
+ *
+ * The Triple DES CBC cipher transform klass.
+ */
+#define xmlSecNssTransformDes3CbcId \
+ xmlSecNssTransformDes3CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformDes3CbcGetKlass(void);
+
+/**
+* xmlSecNssTransformKWDes3Id:
+*
+* The DES3 KW transform klass.
+*/
+#define xmlSecNssTransformKWDes3Id \
+ xmlSecNssTransformKWDes3GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWDes3GetKlass(void);
+
+
+#endif /* XMLSEC_NO_DES */
+
+/********************************************************************
+ *
+ * DSA transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DSA
+
+/**
+ * xmlSecNssKeyDataDsaId:
+ *
+ * The DSA key klass.
+ */
+#define xmlSecNssKeyDataDsaId \
+ xmlSecNssKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataDsaGetKlass (void);
+
+/**
+ * xmlSecNssTransformDsaSha1Id:
+ *
+ * The DSA SHA1 signature transform klass.
+ */
+#define xmlSecNssTransformDsaSha1Id \
+ xmlSecNssTransformDsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformDsaSha1GetKlass(void);
+
+#endif /* XMLSEC_NO_DSA */
+
+
+/********************************************************************
+ *
+ * HMAC transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_HMAC
+
+XMLSEC_CRYPTO_EXPORT int xmlSecNssHmacGetMinOutputLength(void);
+XMLSEC_CRYPTO_EXPORT void xmlSecNssHmacSetMinOutputLength(int min_length);
+
+/**
+ * xmlSecNssKeyDataHmacId:
+ *
+ * The DHMAC key data klass.
+ */
+#define xmlSecNssKeyDataHmacId \
+ xmlSecNssKeyDataHmacGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataHmacGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataHmacSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecNssTransformHmacMd5Id:
+ *
+ * The HMAC with MD5 signature transform klass.
+ */
+#define xmlSecNssTransformHmacMd5Id \
+ xmlSecNssTransformHmacMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecNssTransformHmacRipemd160Id:
+ *
+ * The HMAC with RipeMD160 signature transform klass.
+ */
+#define xmlSecNssTransformHmacRipemd160Id \
+ xmlSecNssTransformHmacRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecNssTransformHmacSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecNssTransformHmacSha1Id \
+ xmlSecNssTransformHmacSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecNssTransformHmacSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecNssTransformHmacSha256Id \
+ xmlSecNssTransformHmacSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecNssTransformHmacSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecNssTransformHmacSha384Id \
+ xmlSecNssTransformHmacSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecNssTransformHmacSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecNssTransformHmacSha512Id \
+ xmlSecNssTransformHmacSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+
+#endif /* XMLSEC_NO_HMAC */
+
+
+/********************************************************************
+ *
+ * RSA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RSA
+
+/**
+ * xmlSecNssKeyDataRsaId:
+ *
+ * The RSA key klass.
+ */
+#define xmlSecNssKeyDataRsaId \
+ xmlSecNssKeyDataRsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataRsaGetKlass (void);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecNssTransformRsaMd5Id:
+ *
+ * The RSA-MD5 signature transform klass.
+ */
+#define xmlSecNssTransformRsaMd5Id \
+ xmlSecNssTransformRsaMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecNssTransformRsaSha1Id:
+ *
+ * The RSA-SHA1 signature transform klass.
+ */
+#define xmlSecNssTransformRsaSha1Id \
+ xmlSecNssTransformRsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecNssTransformRsaSha256Id:
+ *
+ * The RSA-SHA256 signature transform klass.
+ */
+#define xmlSecNssTransformRsaSha256Id \
+ xmlSecNssTransformRsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecNssTransformRsaSha384Id:
+ *
+ * The RSA-SHA384 signature transform klass.
+ */
+#define xmlSecNssTransformRsaSha384Id \
+ xmlSecNssTransformRsaSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecNssTransformRsaSha512Id:
+ *
+ * The RSA-SHA512 signature transform klass.
+ */
+#define xmlSecNssTransformRsaSha512Id \
+ xmlSecNssTransformRsaSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/**
+ * xmlSecNssTransformRsaPkcs1Id:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+#define xmlSecNssTransformRsaPkcs1Id \
+ xmlSecNssTransformRsaPkcs1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaPkcs1GetKlass(void);
+
+/* aleksey, April 2010: NSS 3.12.6 has CKM_RSA_PKCS_OAEP algorithm but
+ it doesn't implement the SHA1 OAEP PKCS we need
+
+ https://bugzilla.mozilla.org/show_bug.cgi?id=158747
+*/
+#ifdef XMLSEC_NSS_RSA_OAEP_TODO
+/**
+ * xmlSecNssTransformRsaOaepId:
+ *
+ * The RSA OAEP key transport transform klass.
+ */
+#define xmlSecNssTransformRsaOaepId \
+ xmlSecNssTransformRsaOaepGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaOaepGetKlass(void);
+#endif /* XMLSEC_NSS_RSA_OAEP_TODO */
+
+#endif /* XMLSEC_NO_RSA */
+
+
+/********************************************************************
+ *
+ * SHA1 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecNssTransformSha1Id:
+ *
+ * The SHA1 digest transform klass.
+ */
+#define xmlSecNssTransformSha1Id \
+ xmlSecNssTransformSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformSha1GetKlass (void);
+#endif /* XMLSEC_NO_SHA1 */
+
+/********************************************************************
+ *
+ * SHA256 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecNssTransformSha256Id:
+ *
+ * The SHA256 digest transform klass.
+ */
+#define xmlSecNssTransformSha256Id \
+ xmlSecNssTransformSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+/********************************************************************
+ *
+ * SHA384 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecNssTransformSha384Id:
+ *
+ * The SHA384 digest transform klass.
+ */
+#define xmlSecNssTransformSha384Id \
+ xmlSecNssTransformSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+/********************************************************************
+ *
+ * SHA512 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecNssTransformSha512Id:
+ *
+ * The SHA512 digest transform klass.
+ */
+#define xmlSecNssTransformSha512Id \
+ xmlSecNssTransformSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/********************************************************************
+ *
+ * MD5 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecNssTransformMd5Id:
+ *
+ * The MD5 digest transform klass.
+ */
+#define xmlSecNssTransformMd5Id \
+ xmlSecNssTransformMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_CRYPTO_H__ */
+
+#define __XMLSEC_NSS_CRYPTO_H__
diff --git a/include/xmlsec/nss/keysstore.h b/include/xmlsec/nss/keysstore.h
new file mode 100644
index 00000000..a2cc289b
--- /dev/null
+++ b/include/xmlsec/nss/keysstore.h
@@ -0,0 +1,46 @@
+/**
+ * XMLSec library
+ *
+ * Nss keys store
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for precise wording.
+ *
+ * Copyright (c) 2003 America Online, Inc. All rights reserved
+ */
+#ifndef __XMLSEC_NSS_KEYSSTORE_H__
+#define __XMLSEC_NSS_KEYSSTORE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+
+/****************************************************************************
+ *
+ * Nss Keys Store
+ *
+ ***************************************************************************/
+/**
+ * xmlSecNssKeysStoreId:
+ *
+ * A Nss keys store klass id.
+ */
+#define xmlSecNssKeysStoreId xmlSecNssKeysStoreGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyStoreId xmlSecNssKeysStoreGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreAdoptKey (xmlSecKeyStorePtr store,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreLoad (xmlSecKeyStorePtr store,
+ const char *uri,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeysStoreSave (xmlSecKeyStorePtr store,
+ const char *filename,
+ xmlSecKeyDataType type);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_KEYSSTORE_H__ */
+
diff --git a/include/xmlsec/nss/pkikeys.h b/include/xmlsec/nss/pkikeys.h
new file mode 100644
index 00000000..cb498482
--- /dev/null
+++ b/include/xmlsec/nss/pkikeys.h
@@ -0,0 +1,44 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (c) 2003 America Online, Inc. All rights reserved.
+ */
+#ifndef __XMLSEC_NSS_PKIKEYS_H__
+#define __XMLSEC_NSS_PKIKEYS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <nspr.h>
+#include <nss.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssPKIAdoptKey (SECKEYPrivateKey *privkey,
+ SECKEYPublicKey *pubkey);
+
+XMLSEC_CRYPTO_EXPORT SECKEYPublicKey* xmlSecNssPKIKeyDataGetPubKey (xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT SECKEYPrivateKey* xmlSecNssPKIKeyDataGetPrivKey (xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT KeyType xmlSecNssPKIKeyDataGetKeyType (xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecNssPKIKeyDataDuplicate (xmlSecKeyDataPtr dst,
+ xmlSecKeyDataPtr src);
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_PKIKEYS_H__ */
+
+
diff --git a/include/xmlsec/nss/symbols.h b/include/xmlsec/nss/symbols.h
new file mode 100644
index 00000000..9520cb83
--- /dev/null
+++ b/include/xmlsec/nss/symbols.h
@@ -0,0 +1,106 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ * Copyright (c) 2003 America Online, Inc. All rights reserved.
+ */
+#ifndef __XMLSEC_NSS_SYMBOLS_H__
+#define __XMLSEC_NSS_SYMBOLS_H__
+
+#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef XMLSEC_CRYPTO_NSS
+
+/********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecNssInit
+#define xmlSecCryptoShutdown xmlSecNssShutdown
+
+#define xmlSecCryptoKeysMngrInit xmlSecNssKeysMngrInit
+
+/********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecNssKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecNssKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecNssKeyDataDsaId
+#define xmlSecKeyDataHmacId xmlSecNssKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecNssKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecNssKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecNssKeyDataRawX509CertId
+
+/********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+#define xmlSecX509StoreId xmlSecNssX509StoreId
+
+/********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+#define xmlSecTransformAes128CbcId xmlSecNssTransformAes128CbcId
+#define xmlSecTransformAes192CbcId xmlSecNssTransformAes192CbcId
+#define xmlSecTransformAes256CbcId xmlSecNssTransformAes256CbcId
+#define xmlSecTransformKWAes128Id xmlSecNssTransformKWAes128Id
+#define xmlSecTransformKWAes192Id xmlSecNssTransformKWAes192Id
+#define xmlSecTransformKWAes256Id xmlSecNssTransformKWAes256Id
+#define xmlSecTransformDes3CbcId xmlSecNssTransformDes3CbcId
+#define xmlSecTransformKWDes3Id xmlSecNssTransformKWDes3Id
+#define xmlSecTransformDsaSha1Id xmlSecNssTransformDsaSha1Id
+#define xmlSecTransformHmacMd5Id xmlSecNssTransformHmacMd5Id
+#define xmlSecTransformHmacRipemd160Id xmlSecNssTransformHmacRipemd160Id
+#define xmlSecTransformHmacSha1Id xmlSecNssTransformHmacSha1Id
+#define xmlSecTransformRipemd160Id xmlSecNssTransformRipemd160Id
+#define xmlSecTransformRsaSha1Id xmlSecNssTransformRsaSha1Id
+#define xmlSecTransformRsaPkcs1Id xmlSecNssTransformRsaPkcs1Id
+#define xmlSecTransformRsaOaepId xmlSecNssTransformRsaOaepId
+#define xmlSecTransformSha1Id xmlSecNssTransformSha1Id
+
+/********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+#define xmlSecCryptoAppInit xmlSecNssAppInit
+#define xmlSecCryptoAppShutdown xmlSecNssAppShutdown
+#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecNssAppDefaultKeysMngrInit
+#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecNssAppDefaultKeysMngrAdoptKey
+#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecNssAppDefaultKeysMngrLoad
+#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecNssAppDefaultKeysMngrSave
+#define xmlSecCryptoAppKeysMngrCertLoad xmlSecNssAppKeysMngrCertLoad
+#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecNssAppKeysMngrCertLoadMemory
+#define xmlSecCryptoAppKeyLoad xmlSecNssAppKeyLoad
+#define xmlSecCryptoAppPkcs12Load xmlSecNssAppPkcs12Load
+#define xmlSecCryptoAppKeyCertLoad xmlSecNssAppKeyCertLoad
+#define xmlSecCryptoAppKeyLoadMemory xmlSecNssAppKeyLoadMemory
+#define xmlSecCryptoAppPkcs12LoadMemory xmlSecNssAppPkcs12LoadMemory
+#define xmlSecCryptoAppKeyCertLoadMemory xmlSecNssAppKeyCertLoadMemory
+#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecNssAppGetDefaultPwdCallback
+
+#endif /* XMLSEC_CRYPTO_NSS */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_CRYPTO_H__ */
+
+#define __XMLSEC_NSS_CRYPTO_H__
diff --git a/include/xmlsec/nss/x509.h b/include/xmlsec/nss/x509.h
new file mode 100644
index 00000000..fe5ceb4a
--- /dev/null
+++ b/include/xmlsec/nss/x509.h
@@ -0,0 +1,91 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (c) 2003 America Online, Inc. All rights reserved.
+ */
+#ifndef __XMLSEC_NSS_X509_H__
+#define __XMLSEC_NSS_X509_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifndef XMLSEC_NO_X509
+
+#include <nspr.h>
+#include <nss.h>
+#include <cert.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+/**
+ * xmlSecNssKeyDataX509Id:
+ *
+ * The NSS X509 data klass.
+ */
+#define xmlSecNssKeyDataX509Id \
+ xmlSecNssKeyDataX509GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataX509GetKlass(void);
+
+XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssKeyDataX509GetKeyCert(xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptKeyCert(xmlSecKeyDataPtr data,
+ CERTCertificate* cert);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptCert(xmlSecKeyDataPtr data,
+ CERTCertificate* cert);
+XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssKeyDataX509GetCert (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecNssKeyDataX509GetCertsSize(xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecNssKeyDataX509AdoptCrl(xmlSecKeyDataPtr data,
+ CERTSignedCrl* crl);
+XMLSEC_CRYPTO_EXPORT CERTSignedCrl* xmlSecNssKeyDataX509GetCrl (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecNssKeyDataX509GetCrlsSize(xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssX509CertGetKey (CERTCertificate* cert);
+
+
+/**
+ * xmlSecNssKeyDataRawX509CertId:
+ *
+ * The NSS raw X509 certificate klass.
+ */
+#define xmlSecNssKeyDataRawX509CertId \
+ xmlSecNssKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataRawX509CertGetKlass(void);
+
+/**
+ * xmlSecNssX509StoreId:
+ *
+ * The NSS X509 store klass.
+ */
+#define xmlSecNssX509StoreId \
+ xmlSecNssX509StoreGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecNssX509StoreGetKlass(void);
+XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssX509StoreFindCert (xmlSecKeyDataStorePtr store,
+ xmlChar *subjectName,
+ xmlChar *issuerName,
+ xmlChar *issuerSerial,
+ xmlChar *ski,
+ xmlSecKeyInfoCtx* keyInfoCtx);
+
+XMLSEC_CRYPTO_EXPORT CERTCertificate* xmlSecNssX509StoreVerify (xmlSecKeyDataStorePtr store,
+ CERTCertList* certs,
+ xmlSecKeyInfoCtx* keyInfoCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssX509StoreAdoptCert (xmlSecKeyDataStorePtr store,
+ CERTCertificate* cert,
+ xmlSecKeyDataType type);
+
+
+#endif /* XMLSEC_NO_X509 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_NSS_X509_H__ */
diff --git a/include/xmlsec/openssl/Makefile.am b/include/xmlsec/openssl/Makefile.am
new file mode 100644
index 00000000..a7e0be57
--- /dev/null
+++ b/include/xmlsec/openssl/Makefile.am
@@ -0,0 +1,16 @@
+NULL =
+
+xmlsecopensslincdir = $(includedir)/xmlsec1/xmlsec/openssl
+
+xmlsecopensslinc_HEADERS = \
+app.h \
+bn.h \
+crypto.h \
+evp.h \
+symbols.h \
+x509.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecopensslincdir)
+
diff --git a/include/xmlsec/openssl/Makefile.in b/include/xmlsec/openssl/Makefile.in
new file mode 100644
index 00000000..eade143d
--- /dev/null
+++ b/include/xmlsec/openssl/Makefile.in
@@ -0,0 +1,567 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec/openssl
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(xmlsecopensslinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+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__installdirs = "$(DESTDIR)$(xmlsecopensslincdir)"
+HEADERS = $(xmlsecopensslinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+xmlsecopensslincdir = $(includedir)/xmlsec1/xmlsec/openssl
+xmlsecopensslinc_HEADERS = \
+app.h \
+bn.h \
+crypto.h \
+evp.h \
+symbols.h \
+x509.h \
+$(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/openssl/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecopensslincHEADERS: $(xmlsecopensslinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecopensslincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecopensslincdir)"
+ @list='$(xmlsecopensslinc_HEADERS)'; test -n "$(xmlsecopensslincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecopensslincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecopensslincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecopensslincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecopensslinc_HEADERS)'; test -n "$(xmlsecopensslincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecopensslincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecopensslincdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlsecopensslincdir)"; 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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlsecopensslincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecopensslincHEADERS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecopensslincHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am \
+ uninstall-xmlsecopensslincHEADERS
+
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecopensslincdir)
+
+# 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/include/xmlsec/openssl/app.h b/include/xmlsec/openssl/app.h
new file mode 100644
index 00000000..2fd70e8e
--- /dev/null
+++ b/include/xmlsec/openssl/app.h
@@ -0,0 +1,128 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_OPENSSL_APP_H__
+#define __XMLSEC_OPENSSL_APP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+/********************************************************************
+ *
+ * Init/shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppInit (const char* config);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppShutdown (void);
+
+/********************************************************************
+ *
+ * Keys Manager
+ *
+ *******************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrInit(xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrAdoptKey(xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrLoad(xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppDefaultKeysMngrSave(xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrCertLoadBIO(xmlSecKeysMngrPtr mngr,
+ BIO* bio,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrAddCertsPath(xmlSecKeysMngrPtr mngr,
+ const char *path);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeysMngrAddCertsFile(xmlSecKeysMngrPtr mngr,
+ const char *file);
+
+#endif /* XMLSEC_NO_X509 */
+
+
+/********************************************************************
+ *
+ * Keys
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyLoadMemory (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyLoadBIO (BIO* bio,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppPkcs12Load (const char* filename,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppPkcs12LoadMemory(const xmlSecByte* data,
+ xmlSecSize dataSize,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppPkcs12LoadBIO (BIO* bio,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeyCertLoadMemory(xmlSecKeyPtr key,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppKeyCertLoadBIO (xmlSecKeyPtr key,
+ BIO* bio,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecOpenSSLAppKeyFromCertLoadBIO(BIO* bio,
+ xmlSecKeyDataFormat format);
+#endif /* XMLSEC_NO_X509 */
+
+XMLSEC_CRYPTO_EXPORT void* xmlSecOpenSSLAppGetDefaultPwdCallback(void);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_OPENSSL_APP_H__ */
+
+
diff --git a/include/xmlsec/openssl/bn.h b/include/xmlsec/openssl/bn.h
new file mode 100644
index 00000000..bdb9c7cb
--- /dev/null
+++ b/include/xmlsec/openssl/bn.h
@@ -0,0 +1,35 @@
+/**
+ * XMLSec library
+ *
+ * Reading/writing BIGNUM values
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_BN_H__
+#define __XMLSEC_BN_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <openssl/bn.h>
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+
+XMLSEC_CRYPTO_EXPORT BIGNUM* xmlSecOpenSSLNodeGetBNValue (const xmlNodePtr cur,
+ BIGNUM **a);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLNodeSetBNValue (xmlNodePtr cur,
+ const BIGNUM *a,
+ int addLineBreaks);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_BN_H__ */
+
diff --git a/include/xmlsec/openssl/crypto.h b/include/xmlsec/openssl/crypto.h
new file mode 100644
index 00000000..78f907a4
--- /dev/null
+++ b/include/xmlsec/openssl/crypto.h
@@ -0,0 +1,561 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_OPENSSL_CRYPTO_H__
+#define __XMLSEC_OPENSSL_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+#include <openssl/err.h>
+
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_openssl(void);
+
+/********************************************************************
+ *
+ * Init shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLShutdown (void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLGenerateRandom (xmlSecBufferPtr buffer,
+ xmlSecSize size);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLSetDefaultTrustedCertsFolder(const xmlChar* path);
+XMLSEC_CRYPTO_EXPORT const xmlChar* xmlSecOpenSSLGetDefaultTrustedCertsFolder(void);
+
+/********************************************************************
+ *
+ * AES transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_AES
+/**
+ * xmlSecOpenSSLKeyDataAesId:
+ *
+ * The AES key klass.
+ */
+#define xmlSecOpenSSLKeyDataAesId \
+ xmlSecOpenSSLKeyDataAesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataAesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataAesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+/**
+ * xmlSecOpenSSLTransformAes128CbcId:
+ *
+ * The AES128 CBC cipher transform klass.
+ */
+#define xmlSecOpenSSLTransformAes128CbcId \
+ xmlSecOpenSSLTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes128CbcGetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformAes192CbcId:
+ *
+ * The AES192 CBC cipher transform klass.
+ */
+#define xmlSecOpenSSLTransformAes192CbcId \
+ xmlSecOpenSSLTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes192CbcGetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformAes256CbcId:
+ *
+ * The AES256 CBC cipher transform klass.
+ */
+#define xmlSecOpenSSLTransformAes256CbcId \
+ xmlSecOpenSSLTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes256CbcGetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformKWAes128Id:
+ *
+ * The AES 128 key wrap transform klass.
+ */
+#define xmlSecOpenSSLTransformKWAes128Id \
+ xmlSecOpenSSLTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes128GetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformKWAes192Id:
+ *
+ * The AES 192 key wrap transform klass.
+ */
+#define xmlSecOpenSSLTransformKWAes192Id \
+ xmlSecOpenSSLTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes192GetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformKWAes256Id:
+ *
+ * The AES 256 key wrap transform klass.
+ */
+#define xmlSecOpenSSLTransformKWAes256Id \
+ xmlSecOpenSSLTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes256GetKlass(void);
+
+#endif /* XMLSEC_NO_AES */
+
+/********************************************************************
+ *
+ * DES transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DES
+/**
+ * xmlSecOpenSSLKeyDataDesId:
+ *
+ * The DES key klass.
+ */
+#define xmlSecOpenSSLKeyDataDesId \
+ xmlSecOpenSSLKeyDataDesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataDesGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataDesSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+/**
+ * xmlSecOpenSSLTransformDes3CbcId:
+ *
+ * The DES3 CBC cipher transform klass.
+ */
+#define xmlSecOpenSSLTransformDes3CbcId \
+ xmlSecOpenSSLTransformDes3CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDes3CbcGetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformKWDes3Id:
+ *
+ * The DES3 KW transform klass.
+ */
+#define xmlSecOpenSSLTransformKWDes3Id \
+ xmlSecOpenSSLTransformKWDes3GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWDes3GetKlass(void);
+
+#endif /* XMLSEC_NO_DES */
+
+/********************************************************************
+ *
+ * DSA transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_DSA
+#include <openssl/dsa.h>
+#include <openssl/evp.h>
+
+/**
+ * xmlSecOpenSSLKeyDataDsaId:
+ *
+ * The DSA key klass.
+ */
+#define xmlSecOpenSSLKeyDataDsaId \
+ xmlSecOpenSSLKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataDsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataDsaAdoptDsa (xmlSecKeyDataPtr data,
+ DSA* dsa);
+XMLSEC_CRYPTO_EXPORT DSA* xmlSecOpenSSLKeyDataDsaGetDsa (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataDsaAdoptEvp (xmlSecKeyDataPtr data,
+ EVP_PKEY* pKey);
+XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLKeyDataDsaGetEvp (xmlSecKeyDataPtr data);
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecOpenSSLTransformDsaSha1Id:
+ *
+ * The DSA SHA1 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformDsaSha1Id \
+ xmlSecOpenSSLTransformDsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#endif /* XMLSEC_NO_DSA */
+
+/********************************************************************
+ *
+ * HMAC transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_HMAC
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLHmacGetMinOutputLength(void);
+XMLSEC_CRYPTO_EXPORT void xmlSecOpenSSLHmacSetMinOutputLength(int min_length);
+
+/**
+ * xmlSecOpenSSLKeyDataHmacId:
+ *
+ * The DHMAC key klass.
+ */
+#define xmlSecOpenSSLKeyDataHmacId \
+ xmlSecOpenSSLKeyDataHmacGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataHmacGetKlass(void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataHmacSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecOpenSSLTransformHmacMd5Id:
+ *
+ * The HMAC with MD5 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacMd5Id \
+ xmlSecOpenSSLTransformHmacMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecOpenSSLTransformHmacRipemd160Id:
+ *
+ * The HMAC with RipeMD160 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacRipemd160Id \
+ xmlSecOpenSSLTransformHmacRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecOpenSSLTransformHmacSha1Id:
+ *
+ * The HMAC with SHA1 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacSha1Id \
+ xmlSecOpenSSLTransformHmacSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA224
+/**
+ * xmlSecOpenSSLTransformHmacSha224Id:
+ *
+ * The HMAC with SHA224 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacSha224Id \
+ xmlSecOpenSSLTransformHmacSha224GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha224GetKlass(void);
+#endif /* XMLSEC_NO_SHA224 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecOpenSSLTransformHmacSha256Id:
+ *
+ * The HMAC with SHA256 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacSha256Id \
+ xmlSecOpenSSLTransformHmacSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecOpenSSLTransformHmacSha384Id:
+ *
+ * The HMAC with SHA384 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacSha384Id \
+ xmlSecOpenSSLTransformHmacSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecOpenSSLTransformHmacSha512Id:
+ *
+ * The HMAC with SHA512 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformHmacSha512Id \
+ xmlSecOpenSSLTransformHmacSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_HMAC */
+
+/********************************************************************
+ *
+ * Md5 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecOpenSSLTransformMd5Id:
+ *
+ * The MD5 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformMd5Id \
+ xmlSecOpenSSLTransformMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+
+/********************************************************************
+ *
+ * RipeMD160 transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecOpenSSLTransformRipemd160Id:
+ *
+ * The RIPEMD160 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformRipemd160Id \
+ xmlSecOpenSSLTransformRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+/********************************************************************
+ *
+ * RSA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_RSA
+#include <openssl/rsa.h>
+#include <openssl/evp.h>
+
+/**
+ * xmlSecOpenSSLKeyDataRsaId:
+ *
+ * The RSA key klass.
+ */
+#define xmlSecOpenSSLKeyDataRsaId \
+ xmlSecOpenSSLKeyDataRsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataRsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataRsaAdoptRsa (xmlSecKeyDataPtr data,
+ RSA* rsa);
+XMLSEC_CRYPTO_EXPORT RSA* xmlSecOpenSSLKeyDataRsaGetRsa (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataRsaAdoptEvp (xmlSecKeyDataPtr data,
+ EVP_PKEY* pKey);
+XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLKeyDataRsaGetEvp (xmlSecKeyDataPtr data);
+
+#ifndef XMLSEC_NO_MD5
+/**
+ * xmlSecOpenSSLTransformRsaMd5Id:
+ *
+ * The RSA-MD5 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaMd5Id \
+ xmlSecOpenSSLTransformRsaMd5GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaMd5GetKlass(void);
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
+/**
+ * xmlSecOpenSSLTransformRsaRipemd160Id:
+ *
+ * The RSA-RIPEMD160 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaRipemd160Id \
+ xmlSecOpenSSLTransformRsaRipemd160GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaRipemd160GetKlass(void);
+#endif /* XMLSEC_NO_RIPEMD160 */
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecOpenSSLTransformRsaSha1Id:
+ *
+ * The RSA-SHA1 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaSha1Id \
+ xmlSecOpenSSLTransformRsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA224
+/**
+ * xmlSecOpenSSLTransformRsaSha224Id:
+ *
+ * The RSA-SHA224 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaSha224Id \
+ xmlSecOpenSSLTransformRsaSha224GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaSha224GetKlass(void);
+#endif /* XMLSEC_NO_SHA224 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecOpenSSLTransformRsaSha256Id:
+ *
+ * The RSA-SHA256 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaSha256Id \
+ xmlSecOpenSSLTransformRsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecOpenSSLTransformRsaSha384Id:
+ *
+ * The RSA-SHA384 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaSha384Id \
+ xmlSecOpenSSLTransformRsaSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecOpenSSLTransformRsaSha512Id:
+ *
+ * The RSA-SHA512 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaSha512Id \
+ xmlSecOpenSSLTransformRsaSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+/**
+ * xmlSecOpenSSLTransformRsaPkcs1Id:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaPkcs1Id \
+ xmlSecOpenSSLTransformRsaPkcs1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaPkcs1GetKlass(void);
+
+/**
+ * xmlSecOpenSSLTransformRsaOaepId:
+ *
+ * The RSA PKCS1 key transport transform klass.
+ */
+#define xmlSecOpenSSLTransformRsaOaepId \
+ xmlSecOpenSSLTransformRsaOaepGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaOaepGetKlass(void);
+
+#endif /* XMLSEC_NO_RSA */
+
+
+/********************************************************************
+ *
+ * SHA1 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecOpenSSLTransformSha1Id:
+ *
+ * The SHA1 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformSha1Id \
+ xmlSecOpenSSLTransformSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+
+/********************************************************************
+ *
+ * SHA224 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA224
+/**
+ * xmlSecOpenSSLTransformSha224Id:
+ *
+ * The SHA224 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformSha224Id \
+ xmlSecOpenSSLTransformSha224GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha224GetKlass(void);
+#endif /* XMLSEC_NO_SHA224 */
+
+
+/********************************************************************
+ *
+ * SHA256 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecOpenSSLTransformSha256Id:
+ *
+ * The SHA256 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformSha256Id \
+ xmlSecOpenSSLTransformSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+/********************************************************************
+ *
+ * SHA384 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecOpenSSLTransformSha384Id:
+ *
+ * The SHA384 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformSha384Id \
+ xmlSecOpenSSLTransformSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+/********************************************************************
+ *
+ * SHA512 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecOpenSSLTransformSha512Id:
+ *
+ * The SHA512 digest transform klass.
+ */
+#define xmlSecOpenSSLTransformSha512Id \
+ xmlSecOpenSSLTransformSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+
+
+
+/**************************************************************
+ *
+ * Error constants for OpenSSL
+ *
+ *************************************************************/
+/**
+ * XMLSEC_OPENSSL_ERRORS_LIB:
+ *
+ * Macro. The XMLSec library klass for OpenSSL errors reporting functions.
+ */
+#define XMLSEC_OPENSSL_ERRORS_LIB (ERR_LIB_USER + 57)
+
+/**
+ * XMLSEC_OPENSSL_ERRORS_FUNCTION:
+ *
+ * Macro. The XMLSec library functions OpenSSL errors reporting functions.
+ */
+#define XMLSEC_OPENSSL_ERRORS_FUNCTION 0
+
+XMLSEC_CRYPTO_EXPORT void xmlSecOpenSSLErrorsDefaultCallback (const char* file,
+ int line,
+ const char* func,
+ const char* errorObject,
+ const char* errorSubject,
+ int reason,
+ const char* msg);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_OPENSSL_CRYPTO_H__ */
+
+#define __XMLSEC_OPENSSL_CRYPTO_H__
diff --git a/include/xmlsec/openssl/evp.h b/include/xmlsec/openssl/evp.h
new file mode 100644
index 00000000..30db8f43
--- /dev/null
+++ b/include/xmlsec/openssl/evp.h
@@ -0,0 +1,44 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_OPENSSL_EVP_H__
+#define __XMLSEC_OPENSSL_EVP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <openssl/evp.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+#include <xmlsec/openssl/crypto.h>
+
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLEvpKeyDataAdoptEvp (xmlSecKeyDataPtr data,
+ EVP_PKEY* pKey);
+XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDataGetEvp (xmlSecKeyDataPtr data);
+
+/******************************************************************************
+ *
+ * EVP helper functions
+ *
+ *****************************************************************************/
+XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDup (EVP_PKEY* pKey);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecOpenSSLEvpKeyAdopt (EVP_PKEY *pKey);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_OPENSSL_EVP_H__ */
+
+
diff --git a/include/xmlsec/openssl/symbols.h b/include/xmlsec/openssl/symbols.h
new file mode 100644
index 00000000..f99dfb6c
--- /dev/null
+++ b/include/xmlsec/openssl/symbols.h
@@ -0,0 +1,123 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_OPENSSL_SYMBOLS_H__
+#define __XMLSEC_OPENSSL_SYMBOLS_H__
+
+#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef XMLSEC_CRYPTO_OPENSSL
+
+/********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecOpenSSLInit
+#define xmlSecCryptoShutdown xmlSecOpenSSLShutdown
+
+#define xmlSecCryptoKeysMngrInit xmlSecOpenSSLKeysMngrInit
+
+/********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecOpenSSLKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecOpenSSLKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecOpenSSLKeyDataDsaId
+#define xmlSecKeyDataHmacId xmlSecOpenSSLKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecOpenSSLKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecOpenSSLKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecOpenSSLKeyDataRawX509CertId
+
+/********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+#define xmlSecX509StoreId xmlSecOpenSSLX509StoreId
+
+/********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+#define xmlSecTransformAes128CbcId xmlSecOpenSSLTransformAes128CbcId
+#define xmlSecTransformAes192CbcId xmlSecOpenSSLTransformAes192CbcId
+#define xmlSecTransformAes256CbcId xmlSecOpenSSLTransformAes256CbcId
+#define xmlSecTransformKWAes128Id xmlSecOpenSSLTransformKWAes128Id
+#define xmlSecTransformKWAes192Id xmlSecOpenSSLTransformKWAes192Id
+#define xmlSecTransformKWAes256Id xmlSecOpenSSLTransformKWAes256Id
+#define xmlSecTransformDes3CbcId xmlSecOpenSSLTransformDes3CbcId
+#define xmlSecTransformKWDes3Id xmlSecOpenSSLTransformKWDes3Id
+#define xmlSecTransformDsaSha1Id xmlSecOpenSSLTransformDsaSha1Id
+#define xmlSecTransformHmacMd5Id xmlSecOpenSSLTransformHmacMd5Id
+#define xmlSecTransformHmacRipemd160Id xmlSecOpenSSLTransformHmacRipemd160Id
+#define xmlSecTransformHmacSha1Id xmlSecOpenSSLTransformHmacSha1Id
+#define xmlSecTransformHmacSha224Id xmlSecOpenSSLTransformHmacSha224Id
+#define xmlSecTransformHmacSha256Id xmlSecOpenSSLTransformHmacSha256Id
+#define xmlSecTransformHmacSha384Id xmlSecOpenSSLTransformHmacSha384Id
+#define xmlSecTransformHmacSha512Id xmlSecOpenSSLTransformHmacSha512Id
+#define xmlSecTransformMd5Id xmlSecOpenSSLTransformMd5Id
+#define xmlSecTransformRipemd160Id xmlSecOpenSSLTransformRipemd160Id
+#define xmlSecTransformRsaMd5Id xmlSecOpenSSLTransformRsaMd5Id
+#define xmlSecTransformRsaRipemd160Id xmlSecOpenSSLTransformRsaRipemd160Id
+#define xmlSecTransformRsaSha1Id xmlSecOpenSSLTransformRsaSha1Id
+#define xmlSecTransformRsaSha224Id xmlSecOpenSSLTransformRsaSha224Id
+#define xmlSecTransformRsaSha256Id xmlSecOpenSSLTransformRsaSha256Id
+#define xmlSecTransformRsaSha384Id xmlSecOpenSSLTransformRsaSha384Id
+#define xmlSecTransformRsaSha512Id xmlSecOpenSSLTransformRsaSha512Id
+#define xmlSecTransformRsaPkcs1Id xmlSecOpenSSLTransformRsaPkcs1Id
+#define xmlSecTransformRsaOaepId xmlSecOpenSSLTransformRsaOaepId
+#define xmlSecTransformSha1Id xmlSecOpenSSLTransformSha1Id
+#define xmlSecTransformSha224Id xmlSecOpenSSLTransformSha224Id
+#define xmlSecTransformSha256Id xmlSecOpenSSLTransformSha256Id
+#define xmlSecTransformSha384Id xmlSecOpenSSLTransformSha384Id
+#define xmlSecTransformSha512Id xmlSecOpenSSLTransformSha512Id
+
+/********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+#define xmlSecCryptoAppInit xmlSecOpenSSLAppInit
+#define xmlSecCryptoAppShutdown xmlSecOpenSSLAppShutdown
+#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecOpenSSLAppDefaultKeysMngrInit
+#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecOpenSSLAppDefaultKeysMngrAdoptKey
+#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecOpenSSLAppDefaultKeysMngrLoad
+#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecOpenSSLAppDefaultKeysMngrSave
+#define xmlSecCryptoAppKeysMngrCertLoad xmlSecOpenSSLAppKeysMngrCertLoad
+#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecOpenSSLAppKeysMngrCertLoadMemory
+#define xmlSecCryptoAppKeyLoad xmlSecOpenSSLAppKeyLoad
+#define xmlSecCryptoAppPkcs12Load xmlSecOpenSSLAppPkcs12Load
+#define xmlSecCryptoAppKeyCertLoad xmlSecOpenSSLAppKeyCertLoad
+#define xmlSecCryptoAppKeyLoadMemory xmlSecOpenSSLAppKeyLoadMemory
+#define xmlSecCryptoAppPkcs12LoadMemory xmlSecOpenSSLAppPkcs12LoadMemory
+#define xmlSecCryptoAppKeyCertLoadMemory xmlSecOpenSSLAppKeyCertLoadMemory
+#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecOpenSSLAppGetDefaultPwdCallback
+
+
+/* todo: this should go away on next API refresh */
+#define xmlSecCryptoAppKeysMngrAddCertsPath xmlSecOpenSSLAppKeysMngrAddCertsPath
+
+#endif /* XMLSEC_CRYPTO_OPENSSL */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_OPENSSL_CRYPTO_H__ */
+
+#define __XMLSEC_OPENSSL_CRYPTO_H__
diff --git a/include/xmlsec/openssl/x509.h b/include/xmlsec/openssl/x509.h
new file mode 100644
index 00000000..6da3281a
--- /dev/null
+++ b/include/xmlsec/openssl/x509.h
@@ -0,0 +1,109 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_OPENSSL_X509_H__
+#define __XMLSEC_OPENSSL_X509_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifndef XMLSEC_NO_X509
+
+#include <openssl/x509.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+
+/**
+ * XMLSEC_STACK_OF_X509:
+ *
+ * Macro. To make docbook happy.
+ */
+#define XMLSEC_STACK_OF_X509 STACK_OF(X509)
+
+/**
+ * XMLSEC_STACK_OF_X509_CRL:
+ *
+ * Macro. To make docbook happy.
+ */
+#define XMLSEC_STACK_OF_X509_CRL STACK_OF(X509_CRL)
+
+/**
+ * xmlSecOpenSSLKeyDataX509Id:
+ *
+ * The OpenSSL X509 data klass.
+ */
+#define xmlSecOpenSSLKeyDataX509Id \
+ xmlSecOpenSSLKeyDataX509GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataX509GetKlass(void);
+
+XMLSEC_CRYPTO_EXPORT X509* xmlSecOpenSSLKeyDataX509GetKeyCert(xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataX509AdoptKeyCert(xmlSecKeyDataPtr data,
+ X509* cert);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataX509AdoptCert(xmlSecKeyDataPtr data,
+ X509* cert);
+XMLSEC_CRYPTO_EXPORT X509* xmlSecOpenSSLKeyDataX509GetCert (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecOpenSSLKeyDataX509GetCertsSize(xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataX509AdoptCrl(xmlSecKeyDataPtr data,
+ X509_CRL* crl);
+XMLSEC_CRYPTO_EXPORT X509_CRL* xmlSecOpenSSLKeyDataX509GetCrl (xmlSecKeyDataPtr data,
+ xmlSecSize pos);
+XMLSEC_CRYPTO_EXPORT xmlSecSize xmlSecOpenSSLKeyDataX509GetCrlsSize(xmlSecKeyDataPtr data);
+
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecOpenSSLX509CertGetKey (X509* cert);
+
+
+/**
+ * xmlSecOpenSSLKeyDataRawX509CertId:
+ *
+ * The OpenSSL raw X509 certificate klass.
+ */
+#define xmlSecOpenSSLKeyDataRawX509CertId \
+ xmlSecOpenSSLKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataRawX509CertGetKlass(void);
+
+/**
+ * xmlSecOpenSSLX509StoreId:
+ *
+ * The OpenSSL X509 store klass.
+ */
+#define xmlSecOpenSSLX509StoreId \
+ xmlSecOpenSSLX509StoreGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecOpenSSLX509StoreGetKlass(void);
+XMLSEC_CRYPTO_EXPORT X509* xmlSecOpenSSLX509StoreFindCert (xmlSecKeyDataStorePtr store,
+ xmlChar *subjectName,
+ xmlChar *issuerName,
+ xmlChar *issuerSerial,
+ xmlChar *ski,
+ xmlSecKeyInfoCtx* keyInfoCtx);
+XMLSEC_CRYPTO_EXPORT X509* xmlSecOpenSSLX509StoreVerify (xmlSecKeyDataStorePtr store,
+ XMLSEC_STACK_OF_X509* certs,
+ XMLSEC_STACK_OF_X509_CRL* crls,
+ xmlSecKeyInfoCtx* keyInfoCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLX509StoreAdoptCert (xmlSecKeyDataStorePtr store,
+ X509* cert,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLX509StoreAdoptCrl (xmlSecKeyDataStorePtr store,
+ X509_CRL* crl);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLX509StoreAddCertsPath(xmlSecKeyDataStorePtr store,
+ const char* path);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLX509StoreAddCertsFile(xmlSecKeyDataStorePtr store,
+ const char* file);
+
+#endif /* XMLSEC_NO_X509 */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_OPENSSL_X509_H__ */
diff --git a/include/xmlsec/parser.h b/include/xmlsec/parser.h
new file mode 100644
index 00000000..182f2951
--- /dev/null
+++ b/include/xmlsec/parser.h
@@ -0,0 +1,51 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * XML Parser transform and utility functions.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_PARSER_H__
+#define __XMLSEC_PARSER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/transforms.h>
+
+
+XMLSEC_EXPORT xmlDocPtr xmlSecParseFile (const char *filename);
+XMLSEC_EXPORT xmlDocPtr xmlSecParseMemory (const xmlSecByte *buffer,
+ xmlSecSize size,
+ int recovery);
+XMLSEC_EXPORT xmlDocPtr xmlSecParseMemoryExt (const xmlSecByte *prefix,
+ xmlSecSize prefixSize,
+ const xmlSecByte *buffer,
+ xmlSecSize bufferSize,
+ const xmlSecByte *postfix,
+ xmlSecSize postfixSize);
+
+
+/**
+ * xmlSecTransformXmlParserId:
+ *
+ * The XML Parser transform klass.
+ */
+#define xmlSecTransformXmlParserId \
+ xmlSecTransformXmlParserGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXmlParserGetKlass (void);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_PARSER_H__ */
+
diff --git a/include/xmlsec/private.h b/include/xmlsec/private.h
new file mode 100644
index 00000000..3e3bbc95
--- /dev/null
+++ b/include/xmlsec/private.h
@@ -0,0 +1,489 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * These are internal private declarations. You don't want to use this file
+ * unless you are building xmlsec or xmlsec-<crypto> library.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_PRIVATE_H__
+#define __XMLSEC_PRIVATE_H__
+
+#ifndef XMLSEC_PRIVATE
+#error "xmlsec/private.h file contains private xmlsec definitions and should not be used outside xmlsec or xmlsec-<crypto> libraries"
+#endif /* XMLSEC_PRIVATE */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keysdata.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+
+/*****************************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ****************************************************************************/
+/**
+ * xmlSecCryptoInitMethod:
+ *
+ * xmlsec-crypto libraryinitialization method.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoInitMethod) (void);
+/**
+ * xmlSecCryptoShutdownMethod:
+ *
+ * xmlsec-crypto library shutdown method.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoShutdownMethod) (void);
+/**
+ * xmlSecCryptoKeysMngrInitMethod:
+ * @mngr: the pointer to keys manager.
+ *
+ * Initializes @mngr with xmlsec-crypto library specific data.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoKeysMngrInitMethod) (xmlSecKeysMngrPtr mngr);
+
+/*****************************************************************************
+ *
+ * Key data ids
+ *
+ ****************************************************************************/
+/**
+ * xmlSecCryptoKeyDataGetKlassMethod:
+ *
+ * Gets the key data klass.
+ *
+ * Returns: pointer to key data klass or NULL if an error occurs
+ * (the xmlsec-crypto library is not loaded or this key data klass is not
+ * implemented).
+ */
+typedef xmlSecKeyDataId (*xmlSecCryptoKeyDataGetKlassMethod) (void);
+
+/*****************************************************************************
+ *
+ * Key data store ids
+ *
+ ****************************************************************************/
+/**
+ * xmlSecCryptoKeyDataStoreGetKlassMethod:
+ *
+ * Gets the key data store klass.
+ *
+ * Returns: pointer to key data store klass or NULL if an error occurs
+ * (the xmlsec-crypto library is not loaded or this key data store klass is not
+ * implemented).
+ */
+typedef xmlSecKeyDataStoreId (*xmlSecCryptoKeyDataStoreGetKlassMethod)(void);
+
+/*****************************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ****************************************************************************/
+/**
+ * xmlSecCryptoTransformGetKlassMethod:
+ *
+ * Gets the transform klass.
+ *
+ * Returns: pointer to transform klass or NULL if an error occurs
+ * (the xmlsec-crypto library is not loaded or this transform is not
+ * implemented).
+ */
+typedef xmlSecTransformId (*xmlSecCryptoTransformGetKlassMethod) (void);
+
+/*****************************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ****************************************************************************/
+/**
+ * xmlSecCryptoAppInitMethod:
+ * @config: the path to crypto library configuration.
+ *
+ * General crypto engine initialization. This function is used
+ * by XMLSec command line utility and called before
+ * @xmlSecInit function.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppInitMethod) (const char* config);
+/**
+ * xmlSecCryptoAppShutdownMethod:
+ *
+ * General crypto engine shutdown. This function is used
+ * by XMLSec command line utility and called after
+ * @xmlSecShutdown function.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppShutdownMethod) (void);
+/**
+ * xmlSecCryptoAppDefaultKeysMngrInitMethod:
+ * @mngr: the pointer to keys manager.
+ *
+ * Initializes @mngr with simple keys store #xmlSecSimpleKeysStoreId
+ * and a default crypto key data stores.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppDefaultKeysMngrInitMethod)
+ (xmlSecKeysMngrPtr mngr);
+/**
+ * xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod:
+ * @mngr: the pointer to keys manager.
+ * @key: the pointer to key.
+ *
+ * Adds @key to the keys manager @mngr created with #xmlSecCryptoAppDefaultKeysMngrInit
+ * function.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod)
+ (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+/**
+ * xmlSecCryptoAppDefaultKeysMngrLoadMethod:
+ * @mngr: the pointer to keys manager.
+ * @uri: the uri.
+ *
+ * Loads XML keys file from @uri to the keys manager @mngr created
+ * with #xmlSecCryptoAppDefaultKeysMngrInit function.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppDefaultKeysMngrLoadMethod)
+ (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+/**
+ * xmlSecCryptoAppDefaultKeysMngrSaveMethod:
+ * @mngr: the pointer to keys manager.
+ * @filename: the destination filename.
+ * @type: the type of keys to save (public/private/symmetric).
+ *
+ * Saves keys from @mngr to XML keys file.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppDefaultKeysMngrSaveMethod)
+ (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+/**
+ * xmlSecCryptoAppKeysMngrCertLoadMethod:
+ * @mngr: the keys manager.
+ * @filename: the certificate file.
+ * @format: the certificate file format.
+ * @type: the flag that indicates is the certificate in @filename
+ * trusted or not.
+ *
+ * Reads cert from @filename and adds to the list of trusted or known
+ * untrusted certs in @store.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppKeysMngrCertLoadMethod)(xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+/**
+ * xmlSecCryptoAppKeysMngrCertLoadMemoryMethod:
+ * @mngr: the keys manager.
+ * @data: the key data.
+ * @dataSize: the key data size.
+ * @format: the certificate format.
+ * @type: the flag that indicates is the certificate in @data
+ * trusted or not.
+ *
+ * Reads cert from @data and adds to the list of trusted or known
+ * untrusted certs in @store.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppKeysMngrCertLoadMemoryMethod)(xmlSecKeysMngrPtr mngr,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+/**
+ * xmlSecCryptoAppKeyLoadMethod:
+ * @filename: the key filename.
+ * @format: the key file format.
+ * @pwd: the key file password.
+ * @pwdCallback: the key password callback.
+ * @pwdCallbackCtx: the user context for password callback.
+ *
+ * Reads key from the a file.
+ *
+ * Returns: pointer to the key or NULL if an error occurs.
+ */
+typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMethod) (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+
+/**
+ * xmlSecCryptoAppKeyLoadMemoryMethod:
+ * @data: the key data.
+ * @dataSize: the key data size.
+ * @format: the key data format.
+ * @pwd: the key data password.
+ * @pwdCallback: the key password callback.
+ * @pwdCallbackCtx: the user context for password callback.
+ *
+ * Reads key from the binary data buffer.
+ *
+ * Returns: pointer to the key or NULL if an error occurs.
+ */
+typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMemoryMethod) (const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+
+
+/**
+ * xmlSecCryptoAppPkcs12LoadMethod:
+ * @filename: the PKCS12 key filename.
+ * @pwd: the PKCS12 file password.
+ * @pwdCallback: the password callback.
+ * @pwdCallbackCtx: the user context for password callback.
+ *
+ * Reads key and all associated certificates from the PKCS12 file.
+ * For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pass
+ * in format=xmlSecKeyDataFormatPkcs12.
+ *
+ * Returns: pointer to the key or NULL if an error occurs.
+ */
+typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMethod) (const char* filename,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+/**
+ * xmlSecCryptoAppPkcs12LoadMemoryMethod:
+ * @data: the pkcs12 data.
+ * @dataSize: the pkcs12 data size.
+ * @pwd: the PKCS12 data password.
+ * @pwdCallback: the password callback.
+ * @pwdCallbackCtx: the user context for password callback.
+ *
+ * Reads key and all associated certificates from the PKCS12 binary data.
+ * For uniformity, call xmlSecCryptoAppKeyLoad instead of this function. Pass
+ * in format=xmlSecKeyDataFormatPkcs12.
+ *
+ * Returns: pointer to the key or NULL if an error occurs.
+ */
+typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMemoryMethod)(const xmlSecByte* data,
+ xmlSecSize dataSize,
+ const char* pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+/**
+ * xmlSecCryptoAppKeyCertLoadMethod:
+ * @key: the pointer to key.
+ * @filename: the certificate filename.
+ * @format: the certificate file format.
+ *
+ * Reads the certificate from $@filename and adds it to key.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppKeyCertLoadMethod) (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+
+/**
+ * xmlSecCryptoAppKeyCertLoadMemoryMethod:
+ * @key: the pointer to key.
+ * @data: the cert data.
+ * @dataSize: the cert data size.
+ * @format: the certificate data format.
+ *
+ * Reads the certificate from binary @data buffer and adds it to key.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecCryptoAppKeyCertLoadMemoryMethod)(xmlSecKeyPtr key,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+/**
+ * xmlSecCryptoDLFunctions:
+ * @cryptoInit: the xmlsec-crypto library initialization method.
+ * @cryptoShutdown: the xmlsec-crypto library shutdown method.
+ * @cryptoKeysMngrInit: the xmlsec-crypto library keys manager init method.
+ * @keyDataAesGetKlass: the method to get pointer to AES key data klass.
+ * @keyDataDesGetKlass: the method to get pointer to DES key data klass.
+ * @keyDataDsaGetKlass: the method to get pointer to DSA key data klass.
+ * @keyDataGost2001GetKlass: the method to get pointer to GOST 2001 key data klass.
+ * @keyDataHmacGetKlass: the method to get pointer to HMAC key data klass.
+ * @keyDataRsaGetKlass: the method to get pointer to RSA key data klass.
+ * @keyDataX509GetKlass: the method to get pointer to X509 key data klass.
+ * @keyDataRawX509CertGetKlass: the method to get pointer to raw X509 cert key data klass.
+ * @x509StoreGetKlass: the method to get pointer to X509 key data store.
+ * @transformAes128CbcGetKlass: the method to get pointer to AES 128 encryption transform.
+ * @transformAes192CbcGetKlass: the method to get pointer to AES 192 encryption transform.
+ * @transformAes256CbcGetKlass: the method to get pointer to AES 256 encryption transform.
+ * @transformKWAes128GetKlass: the method to get pointer to AES 128 key wrapper transform.
+ * @transformKWAes192GetKlass: the method to get pointer to AES 192 key wrapper transform.
+ * @transformKWAes256GetKlass: the method to get pointer to AES 256 key wrapper transform.
+ * @transformDes3CbcGetKlass: the method to get pointer to Triple DES encryption transform.
+ * @transformKWDes3GetKlass: the method to get pointer to Triple DES key wrapper transform.
+ * @transformDsaSha1GetKlass: the method to get pointer to DSA-SHA1 signature transform.
+ * @transformGost2001GostR3411_94GetKlass: the method to get pointer to GOST2001 transform.
+ * @transformHmacMd5GetKlass: the method to get pointer to HMAC-MD5 transform.
+ * @transformHmacRipemd160GetKlass: the method to get pointer to HMAC-RIPEMD160 transform.
+ * @transformHmacSha1GetKlass: the method to get pointer to HMAC-SHA1 transform.
+ * @transformHmacSha224GetKlass: the method to get pointer to HMAC-SHA224 transform.
+ * @transformHmacSha256GetKlass: the method to get pointer to HMAC-SHA256 transform.
+ * @transformHmacSha384GetKlass: the method to get pointer to HMAC-SHA384 transform.
+ * @transformHmacSha512GetKlass: the method to get pointer to HMAC-SHA512 transform.
+ * @transformMd5GetKlass: the method to get pointer to MD5 digest transform.
+ * @transformRipemd160GetKlass: the method to get pointer to RIPEMD160 digest transform.
+ * @transformRsaMd5GetKlass: the method to get pointer to RSA-MD5 signature transform.
+ * @transformRsaRipemd160GetKlass: the method to get pointer to RSA-RIPEMD160 signature transform.
+ * @transformRsaSha1GetKlass: the method to get pointer to RSA-SHA1 signature transform.
+ * @transformRsaSha224GetKlass: the method to get pointer to RSA-SHA224 signature transform.
+ * @transformRsaSha256GetKlass: the method to get pointer to RSA-SHA256 signature transform.
+ * @transformRsaSha384GetKlass: the method to get pointer to RSA-SHA384 signature transform.
+ * @transformRsaSha512GetKlass: the method to get pointer to RSA-SHA512 signature transform.
+ * @transformRsaPkcs1GetKlass: the method to get pointer to RSA-PKCS1_5 key transport transform.
+ * @transformRsaOaepGetKlass: the method to get pointer to RSA-OAEP key transport transform.
+ * @transformGostR3411_94GetKlass: the method to get pointer to GOST R3411 transform.
+ * @transformSha1GetKlass: the method to get pointer to SHA1 digest transform.
+ * @transformSha224GetKlass: the method to get pointer to SHA224 digest transform.
+ * @transformSha256GetKlass: the method to get pointer to SHA256 digest transform.
+ * @transformSha384GetKlass: the method to get pointer to SHA384 digest transform.
+ * @transformSha512GetKlass: the method to get pointer to SHA512 digest transform.
+ * @cryptoAppInit: the default crypto engine initialization method.
+ * @cryptoAppShutdown: the default crypto engine shutdown method.
+ * @cryptoAppDefaultKeysMngrInit: the default keys manager init method.
+ * @cryptoAppDefaultKeysMngrAdoptKey: the default keys manager adopt key method.
+ * @cryptoAppDefaultKeysMngrLoad: the default keys manager load method.
+ * @cryptoAppDefaultKeysMngrSave: the default keys manager save method.
+ * @cryptoAppKeysMngrCertLoad: the default keys manager file cert load method.
+ * @cryptoAppKeysMngrCertLoadMemory: the default keys manager memory cert load method.
+ * @cryptoAppKeyLoad: the key file load method.
+ * @cryptoAppKeyLoadMemory: the meory key load method.
+ * @cryptoAppPkcs12Load: the pkcs12 file load method.
+ * @cryptoAppPkcs12LoadMemory: the memory pkcs12 load method.
+ * @cryptoAppKeyCertLoad: the cert file load method.
+ * @cryptoAppKeyCertLoadMemory: the memory cert load method.
+ * @cryptoAppDefaultPwdCallback:the default password callback.
+ *
+ * The list of crypto engine functions, key data and transform classes.
+ */
+struct _xmlSecCryptoDLFunctions {
+ /* Crypto Init/shutdown */
+ xmlSecCryptoInitMethod cryptoInit;
+ xmlSecCryptoShutdownMethod cryptoShutdown;
+ xmlSecCryptoKeysMngrInitMethod cryptoKeysMngrInit;
+
+ /* Key data ids */
+ xmlSecCryptoKeyDataGetKlassMethod keyDataAesGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataDesGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataDsaGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataGost2001GetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataHmacGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataRsaGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataX509GetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataRawX509CertGetKlass;
+
+ /* Key data store ids */
+ xmlSecCryptoKeyDataStoreGetKlassMethod x509StoreGetKlass;
+
+ /* Crypto transforms ids */
+ xmlSecCryptoTransformGetKlassMethod transformAes128CbcGetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformAes192CbcGetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformAes256CbcGetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformKWAes128GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformKWAes192GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformKWAes256GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformDes3CbcGetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformKWDes3GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformDsaSha1GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformGost2001GostR3411_94GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacMd5GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacRipemd160GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacSha1GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacSha224GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacSha256GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacSha384GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformHmacSha512GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformMd5GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRipemd160GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaMd5GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaRipemd160GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaSha1GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaSha224GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaSha256GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaSha384GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaSha512GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaPkcs1GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformRsaOaepGetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformGostR3411_94GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformSha1GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformSha224GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformSha256GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformSha384GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformSha512GetKlass;
+
+ /* High level routines form xmlsec command line utility */
+ xmlSecCryptoAppInitMethod cryptoAppInit;
+ xmlSecCryptoAppShutdownMethod cryptoAppShutdown;
+ xmlSecCryptoAppDefaultKeysMngrInitMethod cryptoAppDefaultKeysMngrInit;
+ xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod cryptoAppDefaultKeysMngrAdoptKey;
+ xmlSecCryptoAppDefaultKeysMngrLoadMethod cryptoAppDefaultKeysMngrLoad;
+ xmlSecCryptoAppDefaultKeysMngrSaveMethod cryptoAppDefaultKeysMngrSave;
+ xmlSecCryptoAppKeysMngrCertLoadMethod cryptoAppKeysMngrCertLoad;
+ xmlSecCryptoAppKeysMngrCertLoadMemoryMethod cryptoAppKeysMngrCertLoadMemory;
+ xmlSecCryptoAppKeyLoadMethod cryptoAppKeyLoad;
+ xmlSecCryptoAppKeyLoadMemoryMethod cryptoAppKeyLoadMemory;
+ xmlSecCryptoAppPkcs12LoadMethod cryptoAppPkcs12Load;
+ xmlSecCryptoAppPkcs12LoadMemoryMethod cryptoAppPkcs12LoadMemory;
+ xmlSecCryptoAppKeyCertLoadMethod cryptoAppKeyCertLoad;
+ xmlSecCryptoAppKeyCertLoadMemoryMethod cryptoAppKeyCertLoadMemory;
+ void* cryptoAppDefaultPwdCallback;
+};
+
+#include <libxml/xmlstring.h>
+
+/**
+ * xmlSecStrPrintf:
+ *
+ * Prints a string (see @xmlStrPrintf).
+ */
+#define xmlSecStrPrintf xmlStrPrintf
+
+/**
+ * xmlSecStrVPrintf:
+ *
+ * Prints a string (see @xmlStrVPrintf).
+ */
+#define xmlSecStrVPrintf xmlStrVPrintf
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_PRIVATE_H__ */
+
diff --git a/include/xmlsec/private/Makefile.am b/include/xmlsec/private/Makefile.am
new file mode 100644
index 00000000..74de46a8
--- /dev/null
+++ b/include/xmlsec/private/Makefile.am
@@ -0,0 +1,12 @@
+NULL =
+
+xmlsecprivateincdir = $(includedir)/xmlsec1/xmlsec/private
+
+xmlsecprivateinc_HEADERS = \
+xslt.h \
+xkms.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecprivateincdir)
+
diff --git a/include/xmlsec/private/Makefile.in b/include/xmlsec/private/Makefile.in
new file mode 100644
index 00000000..7cf8a641
--- /dev/null
+++ b/include/xmlsec/private/Makefile.in
@@ -0,0 +1,563 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+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@
+subdir = include/xmlsec/private
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(xmlsecprivateinc_HEADERS)
+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.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+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__installdirs = "$(DESTDIR)$(xmlsecprivateincdir)"
+HEADERS = $(xmlsecprivateinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CP = @CP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
+GCRYPT_CRYPTO_LIB = @GCRYPT_CRYPTO_LIB@
+GCRYPT_LIBS = @GCRYPT_LIBS@
+GCRYPT_MIN_VERSION = @GCRYPT_MIN_VERSION@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_CRYPTO_LIB = @GNUTLS_CRYPTO_LIB@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GNUTLS_MIN_VERSION = @GNUTLS_MIN_VERSION@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+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@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_CONFIG = @LIBXML_CONFIG@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXML_MIN_VERSION = @LIBXML_MIN_VERSION@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_CONFIG = @LIBXSLT_CONFIG@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBXSLT_MIN_VERSION = @LIBXSLT_MIN_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
+MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
+MSCRYPTO_CRYPTO_LIB = @MSCRYPTO_CRYPTO_LIB@
+MSCRYPTO_LIBS = @MSCRYPTO_LIBS@
+MV = @MV@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSPR_MIN_VERSION = @NSPR_MIN_VERSION@
+NSPR_PACKAGE = @NSPR_PACKAGE@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_CRYPTO_LIB = @NSS_CRYPTO_LIB@
+NSS_LIBS = @NSS_LIBS@
+NSS_MIN_VERSION = @NSS_MIN_VERSION@
+NSS_PACKAGE = @NSS_PACKAGE@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_CRYPTO_LIB = @OPENSSL_CRYPTO_LIB@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OPENSSL_MIN_VERSION = @OPENSSL_MIN_VERSION@
+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@
+PKGCONFIG_PRESENT = @PKGCONFIG_PRESENT@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+U = @U@
+VERSION = @VERSION@
+XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
+XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
+XMLSEC_CORE_CFLAGS = @XMLSEC_CORE_CFLAGS@
+XMLSEC_CORE_LIBS = @XMLSEC_CORE_LIBS@
+XMLSEC_CRYPTO = @XMLSEC_CRYPTO@
+XMLSEC_CRYPTO_CFLAGS = @XMLSEC_CRYPTO_CFLAGS@
+XMLSEC_CRYPTO_DISABLED_LIST = @XMLSEC_CRYPTO_DISABLED_LIST@
+XMLSEC_CRYPTO_EXTRA_LDFLAGS = @XMLSEC_CRYPTO_EXTRA_LDFLAGS@
+XMLSEC_CRYPTO_LIB = @XMLSEC_CRYPTO_LIB@
+XMLSEC_CRYPTO_LIBS = @XMLSEC_CRYPTO_LIBS@
+XMLSEC_CRYPTO_LIST = @XMLSEC_CRYPTO_LIST@
+XMLSEC_CRYPTO_PC_FILES_LIST = @XMLSEC_CRYPTO_PC_FILES_LIST@
+XMLSEC_DEFINES = @XMLSEC_DEFINES@
+XMLSEC_DL_INCLUDES = @XMLSEC_DL_INCLUDES@
+XMLSEC_DL_LIBS = @XMLSEC_DL_LIBS@
+XMLSEC_DOCDIR = @XMLSEC_DOCDIR@
+XMLSEC_EXTRA_LDFLAGS = @XMLSEC_EXTRA_LDFLAGS@
+XMLSEC_GCRYPT_CFLAGS = @XMLSEC_GCRYPT_CFLAGS@
+XMLSEC_GCRYPT_LIBS = @XMLSEC_GCRYPT_LIBS@
+XMLSEC_GNUTLS_CFLAGS = @XMLSEC_GNUTLS_CFLAGS@
+XMLSEC_GNUTLS_LIBS = @XMLSEC_GNUTLS_LIBS@
+XMLSEC_LIBDIR = @XMLSEC_LIBDIR@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLSEC_NO_AES = @XMLSEC_NO_AES@
+XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_APPS_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_CRYPTO_DYNAMIC_LOADING = @XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@
+XMLSEC_NO_DES = @XMLSEC_NO_DES@
+XMLSEC_NO_DSA = @XMLSEC_NO_DSA@
+XMLSEC_NO_GCRYPT = @XMLSEC_NO_GCRYPT@
+XMLSEC_NO_GNUTLS = @XMLSEC_NO_GNUTLS@
+XMLSEC_NO_GOST = @XMLSEC_NO_GOST@
+XMLSEC_NO_HMAC = @XMLSEC_NO_HMAC@
+XMLSEC_NO_LIBXSLT = @XMLSEC_NO_LIBXSLT@
+XMLSEC_NO_MD5 = @XMLSEC_NO_MD5@
+XMLSEC_NO_MSCRYPTO = @XMLSEC_NO_MSCRYPTO@
+XMLSEC_NO_NSS = @XMLSEC_NO_NSS@
+XMLSEC_NO_OPENSSL = @XMLSEC_NO_OPENSSL@
+XMLSEC_NO_RIPEMD160 = @XMLSEC_NO_RIPEMD160@
+XMLSEC_NO_RSA = @XMLSEC_NO_RSA@
+XMLSEC_NO_SHA1 = @XMLSEC_NO_SHA1@
+XMLSEC_NO_SHA224 = @XMLSEC_NO_SHA224@
+XMLSEC_NO_SHA256 = @XMLSEC_NO_SHA256@
+XMLSEC_NO_SHA384 = @XMLSEC_NO_SHA384@
+XMLSEC_NO_SHA512 = @XMLSEC_NO_SHA512@
+XMLSEC_NO_X509 = @XMLSEC_NO_X509@
+XMLSEC_NO_XKMS = @XMLSEC_NO_XKMS@
+XMLSEC_NO_XMLDSIG = @XMLSEC_NO_XMLDSIG@
+XMLSEC_NO_XMLENC = @XMLSEC_NO_XMLENC@
+XMLSEC_NSS_CFLAGS = @XMLSEC_NSS_CFLAGS@
+XMLSEC_NSS_LIBS = @XMLSEC_NSS_LIBS@
+XMLSEC_OPENSSL_CFLAGS = @XMLSEC_OPENSSL_CFLAGS@
+XMLSEC_OPENSSL_LIBS = @XMLSEC_OPENSSL_LIBS@
+XMLSEC_PACKAGE = @XMLSEC_PACKAGE@
+XMLSEC_STATIC_BINARIES = @XMLSEC_STATIC_BINARIES@
+XMLSEC_VERSION = @XMLSEC_VERSION@
+XMLSEC_VERSION_INFO = @XMLSEC_VERSION_INFO@
+XMLSEC_VERSION_MAJOR = @XMLSEC_VERSION_MAJOR@
+XMLSEC_VERSION_MINOR = @XMLSEC_VERSION_MINOR@
+XMLSEC_VERSION_SAFE = @XMLSEC_VERSION_SAFE@
+XMLSEC_VERSION_SUBMINOR = @XMLSEC_VERSION_SUBMINOR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+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@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+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_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+xmlsecprivateincdir = $(includedir)/xmlsec1/xmlsec/private
+xmlsecprivateinc_HEADERS = \
+xslt.h \
+xkms.h \
+$(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 include/xmlsec/private/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/xmlsec/private/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlsecprivateincHEADERS: $(xmlsecprivateinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmlsecprivateincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlsecprivateincdir)"
+ @list='$(xmlsecprivateinc_HEADERS)'; test -n "$(xmlsecprivateincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlsecprivateincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlsecprivateincdir)" || exit $$?; \
+ done
+
+uninstall-xmlsecprivateincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlsecprivateinc_HEADERS)'; test -n "$(xmlsecprivateincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmlsecprivateincdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmlsecprivateincdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlsecprivateincdir)"; 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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlsecprivateincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlsecprivateincHEADERS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlsecprivateincHEADERS installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am \
+ uninstall-xmlsecprivateincHEADERS
+
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecprivateincdir)
+
+# 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/include/xmlsec/private/xkms.h b/include/xmlsec/private/xkms.h
new file mode 100644
index 00000000..0c606641
--- /dev/null
+++ b/include/xmlsec/private/xkms.h
@@ -0,0 +1,121 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * "XML Key Management Specification v 2.0" implementation
+ * http://www.w3.org/TR/xkms2/
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_PRIVATE_XKMS_H__
+#define __XMLSEC_PRIVATE_XKMS_H__
+
+#ifndef XMLSEC_PRIVATE
+#error "xmlsec/private/xkms.h file contains private xmlsec definitions and should not be used outside xmlsec or xmlsec-<crypto> libraries"
+#endif /* XMLSEC_PRIVATE */
+
+#ifndef XMLSEC_NO_XKMS
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include <stdio.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/list.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/keyinfo.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/xkms.h>
+
+/************************************************************************
+ *
+ * XKMS RespondWith Klass
+ *
+ ************************************************************************/
+typedef int (*xmlSecXkmsRespondWithNodeReadMethod) (xmlSecXkmsRespondWithId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+typedef int (*xmlSecXkmsRespondWithNodeWriteMethod) (xmlSecXkmsRespondWithId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+struct _xmlSecXkmsRespondWithKlass {
+ const xmlChar* valueName;
+ const xmlChar* valueNs;
+
+ const xmlChar* nodeName;
+ const xmlChar* nodeNs;
+
+ xmlSecXkmsRespondWithNodeReadMethod readNode;
+ xmlSecXkmsRespondWithNodeWriteMethod writeNode;
+
+ void* reserved1;
+ void* reserved2;
+};
+
+#define xmlSecXkmsRespondWithKlassGetName(id) \
+ ((((id) != NULL) && ((id)->valueName != NULL)) ? (id)->valueName : NULL)
+
+/************************************************************************
+ *
+ * XKMS ServerRequest Klass
+ *
+ ************************************************************************/
+typedef int (*xmlSecXkmsServerRequestNodeReadMethod)
+ (xmlSecXkmsServerRequestId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+typedef int (*xmlSecXkmsServerRequestExecuteMethod)
+ (xmlSecXkmsServerRequestId id,
+ xmlSecXkmsServerCtxPtr ctx);
+typedef int (*xmlSecXkmsServerRequestNodeWriteMethod)
+ (xmlSecXkmsServerRequestId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+struct _xmlSecXkmsServerRequestKlass {
+ const xmlChar* name;
+ const xmlChar* requestNodeName;
+ const xmlChar* requestNodeNs;
+ const xmlChar* resultNodeName;
+ const xmlChar* resultNodeNs;
+ xmlSecBitMask flags;
+
+ xmlSecXkmsServerRequestNodeReadMethod readNode;
+ xmlSecXkmsServerRequestNodeWriteMethod writeNode;
+ xmlSecXkmsServerRequestExecuteMethod execute;
+
+ void* reserved1;
+ void* reserved2;
+};
+
+#define xmlSecXkmsServerRequestKlassGetName(id) \
+ ((((id) != NULL) && ((id)->name != NULL)) ? (id)->name : NULL)
+
+
+/************************************************************************
+ *
+ * XKMS ServerRequest Klass flags
+ *
+ ************************************************************************/
+/**
+ * XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND:
+ *
+ * The server request klass is allowed in xkms:CompoundRequest element.
+ */
+#define XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND 0x00000001
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_XKMS */
+
+#endif /* __XMLSEC_PRIVATE_XKMS_H__ */
+
diff --git a/include/xmlsec/private/xslt.h b/include/xmlsec/private/xslt.h
new file mode 100644
index 00000000..e9ba6977
--- /dev/null
+++ b/include/xmlsec/private/xslt.h
@@ -0,0 +1,34 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * XSLT helper functions
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_PRIVATE_XSLT_H__
+#define __XMLSEC_PRIVATE_XSLT_H__
+
+#ifndef XMLSEC_PRIVATE
+#error "xmlsec/private/xslt.h file contains private xmlsec definitions and should not be used outside xmlsec or xmlsec-<crypto> libraries"
+#endif /* XMLSEC_PRIVATE */
+
+#ifndef XMLSEC_NO_XSLT
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+void xmlSecTransformXsltInitialize (void);
+void xmlSecTransformXsltShutdown (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_XSLT */
+
+#endif /* __XMLSEC_PRIVATE_XSLT_H__ */
+
diff --git a/include/xmlsec/skeleton/Makefile.am b/include/xmlsec/skeleton/Makefile.am
new file mode 100644
index 00000000..d520494d
--- /dev/null
+++ b/include/xmlsec/skeleton/Makefile.am
@@ -0,0 +1,13 @@
+NULL =
+
+xmlsecskeletonincdir = $(includedir)/xmlsec1/xmlsec/skeleton
+
+xmlsecskeletoninc_HEADERS = \
+app.h \
+crypto.h \
+symbols.h \
+$(NULL)
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(xmlsecskeletonincdir)
+
diff --git a/include/xmlsec/skeleton/app.h b/include/xmlsec/skeleton/app.h
new file mode 100644
index 00000000..0429f7ba
--- /dev/null
+++ b/include/xmlsec/skeleton/app.h
@@ -0,0 +1,97 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_SKELETON_APP_H__
+#define __XMLSEC_SKELETON_APP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/transforms.h>
+
+/********************************************************************
+ *
+ * Init/shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppInit (const char* config);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppShutdown (void);
+
+/********************************************************************
+ *
+ * Keys Manager
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppDefaultKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppDefaultKeysMngrAdoptKey(xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppDefaultKeysMngrLoad (xmlSecKeysMngrPtr mngr,
+ const char* uri);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppDefaultKeysMngrSave (xmlSecKeysMngrPtr mngr,
+ const char* filename,
+ xmlSecKeyDataType type);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppKeysMngrCertLoad (xmlSecKeysMngrPtr mngr,
+ const char *filename,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppKeysMngrCertLoadMemory (xmlSecKeysMngrPtr mngr,
+ const xmlSecByte *data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ xmlSecKeyDataType type);
+#endif /* XMLSEC_NO_X509 */
+
+
+/********************************************************************
+ *
+ * Keys
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppKeyLoad (const char *filename,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppKeyLoadMemory (const xmlSecByte *data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format,
+ const char *pwd,
+ void *pwdCallback,
+ void* pwdCallbackCtx);
+#ifndef XMLSEC_NO_X509
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppPkcs12Load (const char *filename,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyPtr xmlSecSkeletonAppPkcs12LoadMemory (const xmlSecByte *data,
+ xmlSecSize dataSize,
+ const char *pwd,
+ void* pwdCallback,
+ void* pwdCallbackCtx);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppKeyCertLoad (xmlSecKeyPtr key,
+ const char* filename,
+ xmlSecKeyDataFormat format);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonAppKeyCertLoadMemory (xmlSecKeyPtr key,
+ const xmlSecByte *data,
+ xmlSecSize dataSize,
+ xmlSecKeyDataFormat format);
+#endif /* XMLSEC_NO_X509 */
+
+XMLSEC_CRYPTO_EXPORT void* xmlSecSkeletonAppGetDefaultPwdCallback (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_SKELETON_APP_H__ */
+
diff --git a/include/xmlsec/skeleton/crypto.h b/include/xmlsec/skeleton/crypto.h
new file mode 100644
index 00000000..30346669
--- /dev/null
+++ b/include/xmlsec/skeleton/crypto.h
@@ -0,0 +1,40 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_SKELETON_CRYPTO_H__
+#define __XMLSEC_SKELETON_CRYPTO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/transforms.h>
+#include <xmlsec/dl.h>
+
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_skeleton(void);
+
+/********************************************************************
+ *
+ * Init shutdown
+ *
+ ********************************************************************/
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonShutdown (void);
+
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonKeysMngrInit (xmlSecKeysMngrPtr mngr);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_SKELETON_CRYPTO_H__ */
+
+#define __XMLSEC_SKELETON_CRYPTO_H__
diff --git a/include/xmlsec/skeleton/symbols.h b/include/xmlsec/skeleton/symbols.h
new file mode 100644
index 00000000..7be57a49
--- /dev/null
+++ b/include/xmlsec/skeleton/symbols.h
@@ -0,0 +1,117 @@
+/**
+ * XMLSec library
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_SKELETON_SYMBOLS_H__
+#define __XMLSEC_SKELETON_SYMBOLS_H__
+
+#if !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING)
+#error To disable dynamic loading of xmlsec-crypto libraries undefine XMLSEC_CRYPTO_DYNAMIC_LOADING
+#endif /* !defined(IN_XMLSEC) && defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef XMLSEC_CRYPTO_SKELETON
+
+/********************************************************************
+ *
+ * Crypto Init/shutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecSkeletonInit
+#define xmlSecCryptoShutdown xmlSecSkeletonShutdown
+
+#define xmlSecCryptoKeysMngrInit xmlSecSkeletonKeysMngrInit
+
+/********************************************************************
+ *
+ * Key data ids
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecSkeletonKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecSkeletonKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecSkeletonKeyDataDsaId
+#define xmlSecKeyDataHmacId xmlSecSkeletonKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecSkeletonKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecSkeletonKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecSkeletonKeyDataRawX509CertId
+
+/********************************************************************
+ *
+ * Key data store ids
+ *
+ ********************************************************************/
+#define xmlSecX509StoreId xmlSecSkeletonX509StoreId
+
+/********************************************************************
+ *
+ * Crypto transforms ids
+ *
+ ********************************************************************/
+#define xmlSecTransformAes128CbcId xmlSecSkeletonTransformAes128CbcId
+#define xmlSecTransformAes192CbcId xmlSecSkeletonTransformAes192CbcId
+#define xmlSecTransformAes256CbcId xmlSecSkeletonTransformAes256CbcId
+#define xmlSecTransformKWAes128Id xmlSecSkeletonTransformKWAes128Id
+#define xmlSecTransformKWAes192Id xmlSecSkeletonTransformKWAes192Id
+#define xmlSecTransformKWAes256Id xmlSecSkeletonTransformKWAes256Id
+#define xmlSecTransformDes3CbcId xmlSecSkeletonTransformDes3CbcId
+#define xmlSecTransformKWDes3Id xmlSecSkeletonTransformKWDes3Id
+#define xmlSecTransformDsaSha1Id xmlSecSkeletonTransformDsaSha1Id
+#define xmlSecTransformHmacMd5Id xmlSecSkeletonTransformHmacMd5Id
+#define xmlSecTransformHmacRipemd160Id xmlSecSkeletonTransformHmacRipemd160Id
+#define xmlSecTransformHmacSha1Id xmlSecSkeletonTransformHmacSha1Id
+#define xmlSecTransformHmacSha224Id xmlSecSkeletonTransformHmacSha224Id
+#define xmlSecTransformHmacSha256Id xmlSecSkeletonTransformHmacSha256Id
+#define xmlSecTransformHmacSha384Id xmlSecSkeletonTransformHmacSha384Id
+#define xmlSecTransformHmacSha512Id xmlSecSkeletonTransformHmacSha512Id
+#define xmlSecTransformMd5Id xmlSecSkeletonTransformMd5Id
+#define xmlSecTransformRipemd160Id xmlSecSkeletonTransformRipemd160Id
+#define xmlSecTransformRsaSha1Id xmlSecSkeletonTransformRsaSha1Id
+#define xmlSecTransformRsaSha224Id xmlSecSkeletonTransformRsaSha224Id
+#define xmlSecTransformRsaSha256Id xmlSecSkeletonTransformRsaSha256Id
+#define xmlSecTransformRsaSha384Id xmlSecSkeletonTransformRsaSha384Id
+#define xmlSecTransformRsaSha512Id xmlSecSkeletonTransformRsaSha512Id
+#define xmlSecTransformRsaPkcs1Id xmlSecSkeletonTransformRsaPkcs1Id
+#define xmlSecTransformRsaOaepId xmlSecSkeletonTransformRsaOaepId
+#define xmlSecTransformSha1Id xmlSecSkeletonTransformSha1Id
+#define xmlSecTransformSha224Id xmlSecSkeletonTransformSha224Id
+#define xmlSecTransformSha256Id xmlSecSkeletonTransformSha256Id
+#define xmlSecTransformSha384Id xmlSecSkeletonTransformSha384Id
+#define xmlSecTransformSha512Id xmlSecSkeletonTransformSha512Id
+
+/********************************************************************
+ *
+ * High level routines form xmlsec command line utility
+ *
+ ********************************************************************/
+#define xmlSecCryptoAppInit xmlSecSkeletonAppInit
+#define xmlSecCryptoAppShutdown xmlSecSkeletonAppShutdown
+#define xmlSecCryptoAppDefaultKeysMngrInit xmlSecSkeletonAppDefaultKeysMngrInit
+#define xmlSecCryptoAppDefaultKeysMngrAdoptKey xmlSecSkeletonAppDefaultKeysMngrAdoptKey
+#define xmlSecCryptoAppDefaultKeysMngrLoad xmlSecSkeletonAppDefaultKeysMngrLoad
+#define xmlSecCryptoAppDefaultKeysMngrSave xmlSecSkeletonAppDefaultKeysMngrSave
+#define xmlSecCryptoAppKeysMngrCertLoad xmlSecSkeletonAppKeysMngrCertLoad
+#define xmlSecCryptoAppKeysMngrCertLoadMemory xmlSecSkeletonAppKeysMngrCertLoadMemory
+#define xmlSecCryptoAppKeyLoad xmlSecSkeletonAppKeyLoad
+#define xmlSecCryptoAppPkcs12Load xmlSecSkeletonAppPkcs12Load
+#define xmlSecCryptoAppKeyCertLoad xmlSecSkeletonAppKeyCertLoad
+#define xmlSecCryptoAppKeyLoadMemory xmlSecSkeletonAppKeyLoadMemory
+#define xmlSecCryptoAppPkcs12LoadMemory xmlSecSkeletonAppPkcs12LoadMemory
+#define xmlSecCryptoAppKeyCertLoadMemory xmlSecSkeletonAppKeyCertLoadMemory
+#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecSkeletonAppGetDefaultPwdCallback
+
+#endif /* XMLSEC_CRYPTO_SKELETON */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_SKELETON_CRYPTO_H__ */
+
+#define __XMLSEC_SKELETON_CRYPTO_H__
diff --git a/include/xmlsec/soap.h b/include/xmlsec/soap.h
new file mode 100644
index 00000000..c4efc00f
--- /dev/null
+++ b/include/xmlsec/soap.h
@@ -0,0 +1,130 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Simple SOAP messages parsing/creation.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_SOAP_H__
+#define __XMLSEC_SOAP_H__
+
+#ifndef XMLSEC_NO_SOAP
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <xmlsec/xmlsec.h>
+
+
+/***********************************************************************
+ *
+ * SOAP 1.1
+ *
+ **********************************************************************/
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11CreateEnvelope (xmlDocPtr doc);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11EnsureHeader (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddBodyEntry (xmlNodePtr envNode,
+ xmlNodePtr entryNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddFaultEntry (xmlNodePtr envNode,
+ const xmlChar* faultCodeHref,
+ const xmlChar* faultCodeLocalPart,
+ const xmlChar* faultString,
+ const xmlChar* faultActor);
+XMLSEC_EXPORT int xmlSecSoap11CheckEnvelope (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetHeader (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBody (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlSecSize xmlSecSoap11GetBodyEntriesNumber(xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBodyEntry (xmlNodePtr envNode,
+ xmlSecSize pos);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetFaultEntry (xmlNodePtr envNode);
+
+
+/***********************************************************************
+ *
+ * SOAP 1.2
+ *
+ **********************************************************************/
+/**
+ * xmlSecSoap12FaultCode:
+ * @xmlSecSoap12FaultCodeUnknown: The fault code is not available.
+ * @xmlSecSoap12FaultCodeVersionMismatch: The faulting node found an
+ * invalid element information
+ * item instead of the expected
+ * Envelope element information item.
+ * @xmlSecSoap12FaultCodeMustUnderstand: An immediate child element
+ * information item of the SOAP
+ * Header element information item
+ * targeted at the faulting node
+ * that was not understood by the
+ * faulting node contained a SOAP
+ * mustUnderstand attribute
+ * information item with a value of "true"
+ * @xmlSecSoap12FaultCodeDataEncodingUnknown: A SOAP header block or SOAP
+ * body child element information
+ * item targeted at the faulting
+ * SOAP node is scoped with a data
+ * encoding that the faulting node
+ * does not support.
+ * @xmlSecSoap12FaultCodeSender: The message was incorrectly
+ * formed or did not contain the
+ * appropriate information in order
+ * to succeed.
+ * @xmlSecSoap12FaultCodeReceiver: The message could not be processed
+ * for reasons attributable to the
+ * processing of the message rather
+ * than to the contents of the
+ * message itself.
+ *
+ * The values of the <Value> child element information item of the
+ * <Code> element information item (http://www.w3.org/TR/2003/REC-soap12-part1-20030624/#faultcodes).
+ */
+typedef enum {
+ xmlSecSoap12FaultCodeUnknown = 0,
+ xmlSecSoap12FaultCodeVersionMismatch,
+ xmlSecSoap12FaultCodeMustUnderstand,
+ xmlSecSoap12FaultCodeDataEncodingUnknown,
+ xmlSecSoap12FaultCodeSender,
+ xmlSecSoap12FaultCodeReceiver
+} xmlSecSoap12FaultCode;
+
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12CreateEnvelope (xmlDocPtr doc);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12EnsureHeader (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddBodyEntry (xmlNodePtr envNode,
+ xmlNodePtr entryNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultEntry (xmlNodePtr envNode,
+ xmlSecSoap12FaultCode faultCode,
+ const xmlChar* faultReasonText,
+ const xmlChar* faultReasonLang,
+ const xmlChar* faultNodeURI,
+ const xmlChar* faultRole);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultSubcode (xmlNodePtr faultNode,
+ const xmlChar* subCodeHref,
+ const xmlChar* subCodeName);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultReasonText (xmlNodePtr faultNode,
+ const xmlChar* faultReasonText,
+ const xmlChar* faultReasonLang);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultDetailEntry (xmlNodePtr faultNode,
+ xmlNodePtr detailEntryNode);
+XMLSEC_EXPORT int xmlSecSoap12CheckEnvelope (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetHeader (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBody (xmlNodePtr envNode);
+XMLSEC_EXPORT xmlSecSize xmlSecSoap12GetBodyEntriesNumber(xmlNodePtr envNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBodyEntry (xmlNodePtr envNode,
+ xmlSecSize pos);
+XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetFaultEntry (xmlNodePtr envNode);
+
+
+#endif /* XMLSEC_NO_SOAP */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_SOAP_H__ */
+
diff --git a/include/xmlsec/strings.h b/include/xmlsec/strings.h
new file mode 100644
index 00000000..98650bf6
--- /dev/null
+++ b/include/xmlsec/strings.h
@@ -0,0 +1,610 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * All the string constans.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_STRINGS_H__
+#define __XMLSEC_STRINGS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+
+/*************************************************************************
+ *
+ * Global Namespaces
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNs[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecDSigNs[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecEncNs[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsNs[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXPathNs[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXPath2Ns[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXPointerNs[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoap11Ns[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoap12Ns[];
+
+
+/*************************************************************************
+ *
+ * DSig Nodes
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSignature[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSignedInfo[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSignatureValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCanonicalizationMethod[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSignatureMethod[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDigestMethod[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDigestValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeObject[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeManifest[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSignatureProperties[];
+
+/*************************************************************************
+ *
+ * Encryption Nodes
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeEncryptedData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeEncryptionMethod[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeEncryptionProperties[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeEncryptionProperty[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCipherData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCipherValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCipherReference[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeReferenceList[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDataReference[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeKeyReference[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCarriedKeyName[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecTypeEncContent[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecTypeEncElement[];
+
+/*************************************************************************
+ *
+ * XKMS nodes, attributes and value strings
+ *
+ ************************************************************************/
+#ifndef XMLSEC_NO_XKMS
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsServerRequestResultName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsServerRequestStatusName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsServerRequestLocateName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsServerRequestValidateName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsServerRequestCompoundName[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeResult[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeStatusRequest[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeStatusResult[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeLocateRequest[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeLocateResult[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeValidateRequest[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeValidateResult[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCompoundRequest[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCompoundResult[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeMessageExtension[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeOpaqueClientData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeResponseMechanism[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRespondWith[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodePendingNotification[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeQueryKeyBinding[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeKeyUsage[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeUseKeyWith[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeTimeInstant[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRequestSignatureValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeUnverifiedKeyBinding[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeValidityInterval[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeStatus[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeValidReason[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeInvalidReason[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeIndeterminateReason[];
+
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrService[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrNonce[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrOriginalRequestId[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrResponseLimit[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrMechanism[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrIdentifier[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrApplication[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrResultMajor[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrResultMinor[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrRequestId[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrNotBefore[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrNotOnOrAfter[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrTime[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrStatusValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResponseMechanismPending[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResponseMechanismRepresent[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResponseMechanismRequestSignatureValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithKeyName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithX509Cert[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithX509Chain[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithX509CRL[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithOCSP[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithRetrievalMethod[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithPGP[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithPGPWeb[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithSPKI[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecRespondWithPrivateKey[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecStatusResultSuccess[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecStatusResultFailed[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecStatusResultPending[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyUsageEncryption[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyUsageSignature[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyUsageExchange[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingStatusValid[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingStatusInvalid[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingStatusIndeterminate[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingReasonIssuerTrust[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingReasonRevocationStatus[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingReasonValidityInterval[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecKeyBindingReasonSignature[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMajorCodeSuccess[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMajorCodeVersionMismatch[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMajorCodeSender[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMajorCodeReceiver[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMajorCodeRepresent[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMajorCodePending[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeNoMatch[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeTooManyResponses[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeIncomplete[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeFailure[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeRefused[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeNoAuthentication[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeMessageNotSupported[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeUnknownResponseId[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecResultMinorCodeNotSynchronous[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapFaultReasonLang[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapFaultReasonUnsupportedVersion[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapFaultReasonUnableToProcess[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapFaultReasonServiceUnavailable[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapFaultReasonMessageNotSupported[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapFaultReasonMessageInvalid[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapSubcodeValueMessageNotSupported[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsSoapSubcodeValueBadMessage[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsFormatStrPlain[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsFormatStrSoap11[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXkmsFormatStrSoap12[];
+
+#endif /* XMLSEC_NO_XKMS */
+
+/*************************************************************************
+ *
+ * KeyInfo and Transform Nodes
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeKeyInfo[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeReference[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeTransforms[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeTransform[];
+
+/*************************************************************************
+ *
+ * Attributes
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrId[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrURI[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrType[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrMimeType[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrEncoding[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrAlgorithm[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrTarget[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrFilter[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrRecipient[];
+
+/*************************************************************************
+ *
+ * AES strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameAESKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeAESKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefAESKeyValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameAes128Cbc[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefAes128Cbc[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameAes192Cbc[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefAes192Cbc[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameAes256Cbc[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefAes256Cbc[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameKWAes128[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefKWAes128[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameKWAes192[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefKWAes192[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameKWAes256[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefKWAes256[];
+
+/*************************************************************************
+ *
+ * BASE64 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameBase64[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefBase64[];
+
+/*************************************************************************
+ *
+ * C14N strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14N[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14N[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14NWithComments[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14NWithComments[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14N11[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14N11[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14N11WithComments[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14N11WithComments[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameExcC14N[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefExcC14N[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameExcC14NWithComments[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefExcC14NWithComments[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNsExcC14N[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNsExcC14NWithComments[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeInclusiveNamespaces[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecAttrPrefixList[];
+
+/*************************************************************************
+ *
+ * DES strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameDESKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDESKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefDESKeyValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameDes3Cbc[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefDes3Cbc[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameKWDes3[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefKWDes3[];
+
+/*************************************************************************
+ *
+ * DSA strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameDSAKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefDSAKeyValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAP[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAQ[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAG[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAJ[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAX[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAY[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSASeed[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAPgenCounter[];
+
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameDsaSha1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefDsaSha1[];
+
+/*************************************************************************
+ *
+ * GOST2001 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameGOST2001KeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeGOST2001KeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefGOST2001KeyValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameGost2001GostR3411_94[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefGost2001GostR3411_94[];
+
+/*************************************************************************
+ *
+ * EncryptedKey
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEncryptedKey[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeEncryptedKey[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEncryptedKey[];
+
+/*************************************************************************
+ *
+ * Enveloped transform strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEnveloped[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEnveloped[];
+
+/*************************************************************************
+ *
+ * HMAC strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHMACKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeHMACKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHMACKeyValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeHMACOutputLength[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacMd5[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacMd5[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacRipemd160[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacRipemd160[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacSha1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacSha1[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacSha224[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacSha224[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacSha256[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacSha256[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacSha384[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacSha384[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameHmacSha512[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefHmacSha512[];
+
+/*************************************************************************
+ *
+ * KeyName strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameKeyName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeKeyName[];
+
+/*************************************************************************
+ *
+ * KeyValue strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeKeyValue[];
+
+/*************************************************************************
+ *
+ * Memory Buffer strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameMemBuf[];
+
+/*************************************************************************
+ *
+ * MD5 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameMd5[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefMd5[];
+
+/*************************************************************************
+ *
+ * RetrievalMethod
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRetrievalMethod[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRetrievalMethod[];
+
+/*************************************************************************
+ *
+ * RIPEMD160 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRipemd160[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRipemd160[];
+
+/*************************************************************************
+ *
+ * RSA strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRSAKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRSAKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRSAKeyValue[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRSAModulus[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRSAExponent[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRSAPrivateExponent[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaMd5[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaMd5[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaRipemd160[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaRipemd160[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaSha1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaSha1[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaSha224[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaSha224[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaSha256[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaSha256[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaSha384[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaSha384[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaSha512[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaSha512[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaPkcs1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaPkcs1[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRsaOaep[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRsaOaep[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRsaOAEPparams[];
+
+/*************************************************************************
+ *
+ * GOSTR3411_94 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameGostR3411_94[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefGostR3411_94[];
+
+/*************************************************************************
+ *
+ * SHA1 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameSha1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefSha1[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameSha224[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefSha224[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameSha256[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefSha256[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameSha384[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefSha384[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameSha512[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefSha512[];
+
+/*************************************************************************
+ *
+ * X509 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameX509Data[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509Data[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefX509Data[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509Certificate[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509CRL[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509SubjectName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509IssuerSerial[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509IssuerName[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509SerialNumber[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeX509SKI[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRawX509Cert[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRawX509Cert[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameX509Store[];
+
+/*************************************************************************
+ *
+ * PGP strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNamePGPData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodePGPData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefPGPData[];
+
+/*************************************************************************
+ *
+ * SPKI strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameSPKIData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSPKIData[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefSPKIData[];
+
+/*************************************************************************
+ *
+ * XPath/XPointer strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameXPath[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeXPath[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameXPath2[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeXPath2[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXPath2FilterIntersect[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXPath2FilterSubtract[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecXPath2FilterUnion[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameXPointer[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeXPointer[];
+
+/*************************************************************************
+ *
+ * Xslt strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameXslt[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefXslt[];
+
+#ifndef XMLSEC_NO_SOAP
+/*************************************************************************
+ *
+ * SOAP 1.1/1.2 strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeEnvelope[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeHeader[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeBody[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeFault[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeFaultCode[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeFaultString[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeFaultActor[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeFaultDetail[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeCode[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeReason[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeNode[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRole[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDetail[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeSubcode[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeText[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultCodeVersionMismatch[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultCodeMustUnderstand[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultCodeClient[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultCodeServer[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultCodeReceiver[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultCodeSender[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecSoapFaultDataEncodningUnknown[];
+
+
+#endif /* XMLSEC_NO_SOAP */
+
+/*************************************************************************
+ *
+ * Utility strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecStringEmpty[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecStringCR[];
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_STRINGS_H__ */
+
+
diff --git a/include/xmlsec/templates.h b/include/xmlsec/templates.h
new file mode 100644
index 00000000..815cddce
--- /dev/null
+++ b/include/xmlsec/templates.h
@@ -0,0 +1,162 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * KeyInfo node processing
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_TEMPLATES_H__
+#define __XMLSEC_TEMPALTES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/transforms.h>
+
+/***********************************************************************
+ *
+ * <dsig:Signature> node
+ *
+ **********************************************************************/
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreate (xmlDocPtr doc,
+ xmlSecTransformId c14nMethodId,
+ xmlSecTransformId signMethodId,
+ const xmlChar *id);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreateNsPref (xmlDocPtr doc,
+ xmlSecTransformId c14nMethodId,
+ xmlSecTransformId signMethodId,
+ const xmlChar *id,
+ const xmlChar *nsPrefix);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureEnsureKeyInfo (xmlNodePtr signNode,
+ const xmlChar *id);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureAddReference (xmlNodePtr signNode,
+ xmlSecTransformId digestMethodId,
+ const xmlChar *id,
+ const xmlChar *uri,
+ const xmlChar *type);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureAddObject (xmlNodePtr signNode,
+ const xmlChar *id,
+ const xmlChar *mimeType,
+ const xmlChar *encoding);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureGetSignMethodNode (xmlNodePtr signNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureGetC14NMethodNode (xmlNodePtr signNode);
+
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceAddTransform (xmlNodePtr referenceNode,
+ xmlSecTransformId transformId);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplObjectAddSignProperties (xmlNodePtr objectNode,
+ const xmlChar *id,
+ const xmlChar *target);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplObjectAddManifest (xmlNodePtr objectNode,
+ const xmlChar *id);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplManifestAddReference (xmlNodePtr manifestNode,
+ xmlSecTransformId digestMethodId,
+ const xmlChar *id,
+ const xmlChar *uri,
+ const xmlChar *type);
+
+/***********************************************************************
+ *
+ * <enc:EncryptedData> node
+ *
+ **********************************************************************/
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataCreate (xmlDocPtr doc,
+ xmlSecTransformId encMethodId,
+ const xmlChar *id,
+ const xmlChar *type,
+ const xmlChar *mimeType,
+ const xmlChar *encoding);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureKeyInfo (xmlNodePtr encNode,
+ const xmlChar *id);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureEncProperties (xmlNodePtr encNode,
+ const xmlChar *id);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataAddEncProperty (xmlNodePtr encNode,
+ const xmlChar *id,
+ const xmlChar *target);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureCipherValue (xmlNodePtr encNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataEnsureCipherReference (xmlNodePtr encNode,
+ const xmlChar *uri);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplEncDataGetEncMethodNode (xmlNodePtr encNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplCipherReferenceAddTransform (xmlNodePtr cipherReferenceNode,
+ xmlSecTransformId transformId);
+
+/***********************************************************************
+ *
+ * <enc:EncryptedKey> node
+ *
+ **********************************************************************/
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceListAddDataReference(xmlNodePtr encNode,
+ const xmlChar *uri);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplReferenceListAddKeyReference (xmlNodePtr encNode,
+ const xmlChar *uri);
+
+/***********************************************************************
+ *
+ * <dsig:KeyInfo> node
+ *
+ **********************************************************************/
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddKeyName (xmlNodePtr keyInfoNode,
+ const xmlChar* name);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddKeyValue (xmlNodePtr keyInfoNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddX509Data (xmlNodePtr keyInfoNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddRetrievalMethod (xmlNodePtr keyInfoNode,
+ const xmlChar *uri,
+ const xmlChar *type);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplRetrievalMethodAddTransform (xmlNodePtr retrMethodNode,
+ xmlSecTransformId transformId);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplKeyInfoAddEncryptedKey (xmlNodePtr keyInfoNode,
+ xmlSecTransformId encMethodId,
+ const xmlChar *id,
+ const xmlChar *type,
+ const xmlChar *recipient);
+
+/***********************************************************************
+ *
+ * <dsig:X509Data> node
+ *
+ **********************************************************************/
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddIssuerSerial (xmlNodePtr x509DataNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509IssuerSerialAddIssuerName(xmlNodePtr x509IssuerSerialNode, const xmlChar* issuerName);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509IssuerSerialAddSerialNumber(xmlNodePtr x509IssuerSerialNode, const xmlChar* serial);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddSubjectName (xmlNodePtr x509DataNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddSKI (xmlNodePtr x509DataNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddCertificate (xmlNodePtr x509DataNode);
+XMLSEC_EXPORT xmlNodePtr xmlSecTmplX509DataAddCRL (xmlNodePtr x509DataNode);
+
+/***********************************************************************
+ *
+ * <dsig:Transform> node
+ *
+ **********************************************************************/
+XMLSEC_EXPORT int xmlSecTmplTransformAddHmacOutputLength (xmlNodePtr transformNode,
+ xmlSecSize bitsLen);
+XMLSEC_EXPORT int xmlSecTmplTransformAddRsaOaepParam (xmlNodePtr transformNode,
+ const xmlSecByte *buf,
+ xmlSecSize size);
+XMLSEC_EXPORT int xmlSecTmplTransformAddXsltStylesheet (xmlNodePtr transformNode,
+ const xmlChar *xslt);
+XMLSEC_EXPORT int xmlSecTmplTransformAddC14NInclNamespaces(xmlNodePtr transformNode,
+ const xmlChar *prefixList);
+XMLSEC_EXPORT int xmlSecTmplTransformAddXPath (xmlNodePtr transformNode,
+ const xmlChar *expression,
+ const xmlChar **nsList);
+XMLSEC_EXPORT int xmlSecTmplTransformAddXPath2 (xmlNodePtr transformNode,
+ const xmlChar* type,
+ const xmlChar *expression,
+ const xmlChar **nsList);
+XMLSEC_EXPORT int xmlSecTmplTransformAddXPointer (xmlNodePtr transformNode,
+ const xmlChar *expression,
+ const xmlChar **nsList);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_KEYINFO_TEMPLATES_H__ */
+
diff --git a/include/xmlsec/transforms.h b/include/xmlsec/transforms.h
new file mode 100644
index 00000000..f0c70c91
--- /dev/null
+++ b/include/xmlsec/transforms.h
@@ -0,0 +1,994 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * The transforms engine
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_TRANSFORMS_H__
+#define __XMLSEC_TRANSFORMS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/list.h>
+#include <xmlsec/nodeset.h>
+#include <xmlsec/keys.h>
+
+typedef const struct _xmlSecTransformKlass xmlSecTransformKlass,
+ *xmlSecTransformId;
+
+/**
+ * XMLSEC_TRANSFORM_BINARY_CHUNK:
+ *
+ * The binary data chunks size. XMLSec processes binary data one chunk
+ * at a time. Changing this impacts xmlsec memory usage and performance.
+ */
+#define XMLSEC_TRANSFORM_BINARY_CHUNK 64
+
+/**********************************************************************
+ *
+ * High-level functions
+ *
+ *********************************************************************/
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecTransformIdsGet (void);
+XMLSEC_EXPORT int xmlSecTransformIdsInit (void);
+XMLSEC_EXPORT void xmlSecTransformIdsShutdown (void);
+XMLSEC_EXPORT int xmlSecTransformIdsRegisterDefault(void);
+XMLSEC_EXPORT int xmlSecTransformIdsRegister (xmlSecTransformId id);
+
+/**
+ * xmlSecTransformStatus:
+ * @xmlSecTransformStatusNone: the status unknown.
+ * @xmlSecTransformStatusWorking: the transform is executed.
+ * @xmlSecTransformStatusFinished: the transform finished
+ * @xmlSecTransformStatusOk: the transform succeeded.
+ * @xmlSecTransformStatusFail: the transform failed (an error occur).
+ *
+ * The transform execution status.
+ */
+typedef enum {
+ xmlSecTransformStatusNone = 0,
+ xmlSecTransformStatusWorking,
+ xmlSecTransformStatusFinished,
+ xmlSecTransformStatusOk,
+ xmlSecTransformStatusFail
+} xmlSecTransformStatus;
+
+/**
+ * xmlSecTransformMode:
+ * @xmlSecTransformModeNone: the mode is unknown.
+ * @xmlSecTransformModePush: pushing data thru transform.
+ * @xmlSecTransformModePop: popping data from transform.
+ *
+ * The transform operation mode
+ */
+typedef enum {
+ xmlSecTransformModeNone = 0,
+ xmlSecTransformModePush,
+ xmlSecTransformModePop
+} xmlSecTransformMode;
+
+/**
+ * xmlSecTransformOperation:
+ * @xmlSecTransformOperationNone: the operation is unknown.
+ * @xmlSecTransformOperationEncode: the encode operation (for base64 transform).
+ * @xmlSecTransformOperationDecode: the decode operation (for base64 transform).
+ * @xmlSecTransformOperationSign: the sign or digest operation.
+ * @xmlSecTransformOperationVerify: the verification of signature or digest operation.
+ * @xmlSecTransformOperationEncrypt: the encryption operation.
+ * @xmlSecTransformOperationDecrypt: the decryption operation.
+ *
+ * The transform operation.
+ */
+typedef enum {
+ xmlSecTransformOperationNone = 0,
+ xmlSecTransformOperationEncode,
+ xmlSecTransformOperationDecode,
+ xmlSecTransformOperationSign,
+ xmlSecTransformOperationVerify,
+ xmlSecTransformOperationEncrypt,
+ xmlSecTransformOperationDecrypt
+} xmlSecTransformOperation;
+
+/**************************************************************************
+ *
+ * xmlSecTransformUriType:
+ *
+ *************************************************************************/
+/**
+ * xmlSecTransformUriType:
+ *
+ * URI transform type bit mask.
+ */
+typedef unsigned int xmlSecTransformUriType;
+
+/**
+ * xmlSecTransformUriTypeNone:
+ *
+ * The URI type is unknown or not set.
+ */
+#define xmlSecTransformUriTypeNone 0x0000
+
+/**
+ * xmlSecTransformUriTypeEmpty:
+ *
+ * The empty URI ("") type.
+ */
+#define xmlSecTransformUriTypeEmpty 0x0001
+
+/**
+ * xmlSecTransformUriTypeSameDocument:
+ *
+ * The smae document ("#...") but not empty ("") URI type.
+ */
+#define xmlSecTransformUriTypeSameDocument 0x0002
+
+/**
+ * xmlSecTransformUriTypeLocal:
+ *
+ * The local URI ("file:///....") type.
+ */
+#define xmlSecTransformUriTypeLocal 0x0004
+
+/**
+ * xmlSecTransformUriTypeRemote:
+ *
+ * The remote URI type.
+ */
+#define xmlSecTransformUriTypeRemote 0x0008
+
+/**
+ * xmlSecTransformUriTypeAny:
+ *
+ * Any URI type.
+ */
+#define xmlSecTransformUriTypeAny 0xFFFF
+
+XMLSEC_EXPORT int xmlSecTransformUriTypeCheck (xmlSecTransformUriType type,
+ const xmlChar* uri);
+/**************************************************************************
+ *
+ * xmlSecTransformDataType
+ *
+ *************************************************************************/
+/**
+ * xmlSecTransformDataType:
+ *
+ * Transform data type bit mask.
+ */
+typedef xmlSecByte xmlSecTransformDataType;
+
+/**
+ * xmlSecTransformDataTypeUnknown:
+ *
+ * The transform data type is unknown or nor data expected.
+ */
+#define xmlSecTransformDataTypeUnknown 0x0000
+
+/**
+ * xmlSecTransformDataTypeBin:
+ *
+ * The binary transform data.
+ */
+#define xmlSecTransformDataTypeBin 0x0001
+
+/**
+ * xmlSecTransformDataTypeXml:
+ *
+ * The xml transform data.
+ */
+#define xmlSecTransformDataTypeXml 0x0002
+
+/**************************************************************************
+ *
+ * xmlSecTransformUsage
+ *
+ *************************************************************************/
+/**
+ * xmlSecTransformUsage:
+ *
+ * The transform usage bit mask.
+ */
+typedef unsigned int xmlSecTransformUsage;
+
+/**
+ * xmlSecTransformUsageUnknown:
+ *
+ * Transforms usage is unknown or undefined.
+ */
+#define xmlSecTransformUsageUnknown 0x0000
+
+/**
+ * xmlSecTransformUsageDSigTransform:
+ *
+ * Transform could be used in <dsig:Transform>.
+ */
+#define xmlSecTransformUsageDSigTransform 0x0001
+
+/**
+ * xmlSecTransformUsageC14NMethod:
+ *
+ * Transform could be used in <dsig:CanonicalizationMethod>.
+ */
+#define xmlSecTransformUsageC14NMethod 0x0002
+
+/**
+ * xmlSecTransformUsageDigestMethod:
+ *
+ * Transform could be used in <dsig:DigestMethod>.
+ */
+#define xmlSecTransformUsageDigestMethod 0x0004
+
+/**
+ * xmlSecTransformUsageSignatureMethod:
+ *
+ * Transform could be used in <dsig:SignatureMethod>.
+ */
+#define xmlSecTransformUsageSignatureMethod 0x0008
+
+/**
+ * xmlSecTransformUsageEncryptionMethod:
+ *
+ * Transform could be used in <enc:EncryptionMethod>.
+ */
+#define xmlSecTransformUsageEncryptionMethod 0x0010
+
+/**
+ * xmlSecTransformUsageAny:
+ *
+ * Transform could be used for operation.
+ */
+#define xmlSecTransformUsageAny 0xFFFF
+
+/**************************************************************************
+ *
+ * xmlSecTransformCtx
+ *
+ *************************************************************************/
+/**
+ * xmlSecTransformCtxPreExecuteCallback:
+ * @transformCtx: the pointer to transform's context.
+ *
+ * The callback called after creating transforms chain but before
+ * starting data processing. Application can use this callback to
+ * do additional transforms chain verification or modification and
+ * aborting transforms execution (if necessary).
+ *
+ * Returns: 0 on success and a negative value otherwise (in this case,
+ * transforms chain will not be executed and xmlsec processing stops).
+ */
+typedef int (*xmlSecTransformCtxPreExecuteCallback) (xmlSecTransformCtxPtr transformCtx);
+
+/**
+ * XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK:
+ *
+ * If this flag is set then URI ID references are resolved directly
+ * without using XPointers. This allows one to sign/verify Visa3D
+ * documents that don't follow XML, XPointer and XML DSig specifications.
+ */
+#define XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK 0x00000001
+
+/**
+ * xmlSecTransformCtx:
+ * @userData: the pointer to user data (xmlsec and xmlsec-crypto never
+ * touch this).
+ * @flags: the bit mask flags to control transforms execution
+ * (reserved for the future).
+ * @flags2: the bit mask flags to control transforms execution
+ * (reserved for the future).
+ * @enabledUris: the allowed transform data source uri types.
+ * @enabledTransforms: the list of enabled transforms; if list is empty (default)
+ * then all registered transforms are enabled.
+ * @preExecCallback: the callback called after preparing transform chain
+ * and right before actual data processing; application
+ * can use this callback to change transforms parameters,
+ * insert additional transforms in the chain or do
+ * additional validation (and abort transform execution
+ * if needed).
+ * @result: the pointer to transforms result buffer.
+ * @status: the transforms chain processng status.
+ * @uri: the data source URI without xpointer expression.
+ * @xptrExpr: the xpointer expression from data source URI (if any).
+ * @first: the first transform in the chain.
+ * @last: the last transform in the chain.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The transform execution context.
+ */
+struct _xmlSecTransformCtx {
+ /* user settings */
+ void* userData;
+ unsigned int flags;
+ unsigned int flags2;
+ xmlSecTransformUriType enabledUris;
+ xmlSecPtrList enabledTransforms;
+ xmlSecTransformCtxPreExecuteCallback preExecCallback;
+
+ /* results */
+ xmlSecBufferPtr result;
+ xmlSecTransformStatus status;
+ xmlChar* uri;
+ xmlChar* xptrExpr;
+ xmlSecTransformPtr first;
+ xmlSecTransformPtr last;
+
+ /* for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecTransformCtxPtr xmlSecTransformCtxCreate (void);
+XMLSEC_EXPORT void xmlSecTransformCtxDestroy (xmlSecTransformCtxPtr ctx);
+XMLSEC_EXPORT int xmlSecTransformCtxInitialize (xmlSecTransformCtxPtr ctx);
+XMLSEC_EXPORT void xmlSecTransformCtxFinalize (xmlSecTransformCtxPtr ctx);
+XMLSEC_EXPORT void xmlSecTransformCtxReset (xmlSecTransformCtxPtr ctx);
+XMLSEC_EXPORT int xmlSecTransformCtxCopyUserPref (xmlSecTransformCtxPtr dst,
+ xmlSecTransformCtxPtr src);
+XMLSEC_EXPORT int xmlSecTransformCtxSetUri (xmlSecTransformCtxPtr ctx,
+ const xmlChar* uri,
+ xmlNodePtr hereNode);
+XMLSEC_EXPORT int xmlSecTransformCtxAppend (xmlSecTransformCtxPtr ctx,
+ xmlSecTransformPtr transform);
+XMLSEC_EXPORT int xmlSecTransformCtxPrepend (xmlSecTransformCtxPtr ctx,
+ xmlSecTransformPtr transform);
+XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxCreateAndAppend(xmlSecTransformCtxPtr ctx,
+ xmlSecTransformId id);
+XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxCreateAndPrepend(xmlSecTransformCtxPtr ctx,
+ xmlSecTransformId id);
+XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCtxNodeRead (xmlSecTransformCtxPtr ctx,
+ xmlNodePtr node,
+ xmlSecTransformUsage usage);
+XMLSEC_EXPORT int xmlSecTransformCtxNodesListRead (xmlSecTransformCtxPtr ctx,
+ xmlNodePtr node,
+ xmlSecTransformUsage usage);
+XMLSEC_EXPORT int xmlSecTransformCtxPrepare (xmlSecTransformCtxPtr ctx,
+ xmlSecTransformDataType inputDataType);
+XMLSEC_EXPORT int xmlSecTransformCtxBinaryExecute (xmlSecTransformCtxPtr ctx,
+ const xmlSecByte* data,
+ xmlSecSize dataSize);
+XMLSEC_EXPORT int xmlSecTransformCtxUriExecute (xmlSecTransformCtxPtr ctx,
+ const xmlChar* uri);
+XMLSEC_EXPORT int xmlSecTransformCtxXmlExecute (xmlSecTransformCtxPtr ctx,
+ xmlSecNodeSetPtr nodes);
+XMLSEC_EXPORT int xmlSecTransformCtxExecute (xmlSecTransformCtxPtr ctx,
+ xmlDocPtr doc);
+XMLSEC_EXPORT void xmlSecTransformCtxDebugDump (xmlSecTransformCtxPtr ctx,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecTransformCtxDebugXmlDump (xmlSecTransformCtxPtr ctx,
+ FILE* output);
+
+/**************************************************************************
+ *
+ * xmlSecTransform
+ *
+ *************************************************************************/
+/**
+ * xmlSecTransform:
+ * @id: the transform id (pointer to #xmlSecTransformId).
+ * @operation: the transform's opertaion.
+ * @status: the current status.
+ * @hereNode: the pointer to transform's <dsig:Transform /> node.
+ * @next: the pointer to next transform in the chain.
+ * @prev: the pointer to previous transform in the chain.
+ * @inBuf: the input binary data buffer.
+ * @outBuf: the output binary data buffer.
+ * @inNodes: the input XML nodes.
+ * @outNodes: the output XML nodes.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The transform structure.
+ */
+struct _xmlSecTransform {
+ xmlSecTransformId id;
+ xmlSecTransformOperation operation;
+ xmlSecTransformStatus status;
+ xmlNodePtr hereNode;
+
+ /* transforms chain */
+ xmlSecTransformPtr next;
+ xmlSecTransformPtr prev;
+
+ /* binary data */
+ xmlSecBuffer inBuf;
+ xmlSecBuffer outBuf;
+
+ /* xml data */
+ xmlSecNodeSetPtr inNodes;
+ xmlSecNodeSetPtr outNodes;
+
+ /* reserved for the future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformCreate (xmlSecTransformId id);
+XMLSEC_EXPORT void xmlSecTransformDestroy (xmlSecTransformPtr transform);
+XMLSEC_EXPORT xmlSecTransformPtr xmlSecTransformNodeRead (xmlNodePtr node,
+ xmlSecTransformUsage usage,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformPump (xmlSecTransformPtr left,
+ xmlSecTransformPtr right,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformSetKey (xmlSecTransformPtr transform,
+ xmlSecKeyPtr key);
+XMLSEC_EXPORT int xmlSecTransformSetKeyReq(xmlSecTransformPtr transform,
+ xmlSecKeyReqPtr keyReq);
+XMLSEC_EXPORT int xmlSecTransformVerify (xmlSecTransformPtr transform,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformVerifyNodeContent(xmlSecTransformPtr transform,
+ xmlNodePtr node,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT xmlSecTransformDataType xmlSecTransformGetDataType(xmlSecTransformPtr transform,
+ xmlSecTransformMode mode,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformPushBin (xmlSecTransformPtr transform,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ int final,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformPopBin (xmlSecTransformPtr transform,
+ xmlSecByte* data,
+ xmlSecSize maxDataSize,
+ xmlSecSize* dataSize,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformPushXml (xmlSecTransformPtr transform,
+ xmlSecNodeSetPtr nodes,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformPopXml (xmlSecTransformPtr transform,
+ xmlSecNodeSetPtr* nodes,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformExecute (xmlSecTransformPtr transform,
+ int last,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT void xmlSecTransformDebugDump(xmlSecTransformPtr transform,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecTransformDebugXmlDump(xmlSecTransformPtr transform,
+ FILE* output);
+/**
+ * xmlSecTransformGetName:
+ * @transform: the pointer to transform.
+ *
+ * Macro. Returns transform name.
+ */
+#define xmlSecTransformGetName(transform) \
+ ((xmlSecTransformIsValid((transform))) ? \
+ xmlSecTransformKlassGetName((transform)->id) : NULL)
+
+/**
+ * xmlSecTransformIsValid:
+ * @transform: the pointer to transform.
+ *
+ * Macro. Returns 1 if the @transform is valid or 0 otherwise.
+ */
+#define xmlSecTransformIsValid(transform) \
+ ((( transform ) != NULL) && \
+ (( transform )->id != NULL) && \
+ (( transform )->id->klassSize >= sizeof(xmlSecTransformKlass)) && \
+ (( transform )->id->objSize >= sizeof(xmlSecTransform)) && \
+ (( transform )->id->name != NULL))
+
+/**
+ * xmlSecTransformCheckId:
+ * @transform: the pointer to transform.
+ * @i: the transform id.
+ *
+ * Macro. Returns 1 if the @transform is valid and has specified id @i
+ * or 0 otherwise.
+ */
+#define xmlSecTransformCheckId(transform, i) \
+ (xmlSecTransformIsValid(( transform )) && \
+ ((((const xmlSecTransformId) (( transform )->id))) == ( i )))
+
+/**
+ * xmlSecTransformCheckSize:
+ * @transform: the pointer to transform.
+ * @size: the transform object size.
+ *
+ * Macro. Returns 1 if the @transform is valid and has at least @size
+ * bytes or 0 otherwise.
+ */
+#define xmlSecTransformCheckSize(transform, size) \
+ (xmlSecTransformIsValid(( transform )) && \
+ ((( transform )->id->objSize) >= ( size )))
+
+
+/************************************************************************
+ *
+ * Operations on transforms chain
+ *
+ ************************************************************************/
+XMLSEC_EXPORT int xmlSecTransformConnect (xmlSecTransformPtr left,
+ xmlSecTransformPtr right,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT void xmlSecTransformRemove (xmlSecTransformPtr transform);
+
+/************************************************************************
+ *
+ * Default callbacks, most of the transforms can use them
+ *
+ ************************************************************************/
+XMLSEC_EXPORT xmlSecTransformDataType xmlSecTransformDefaultGetDataType(xmlSecTransformPtr transform,
+ xmlSecTransformMode mode,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformDefaultPushBin(xmlSecTransformPtr transform,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ int final,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformDefaultPopBin(xmlSecTransformPtr transform,
+ xmlSecByte* data,
+ xmlSecSize maxDataSize,
+ xmlSecSize* dataSize,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformDefaultPushXml(xmlSecTransformPtr transform,
+ xmlSecNodeSetPtr nodes,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT int xmlSecTransformDefaultPopXml(xmlSecTransformPtr transform,
+ xmlSecNodeSetPtr* nodes,
+ xmlSecTransformCtxPtr transformCtx);
+
+/************************************************************************
+ *
+ * IO buffers for transforms
+ *
+ ************************************************************************/
+XMLSEC_EXPORT xmlOutputBufferPtr xmlSecTransformCreateOutputBuffer(xmlSecTransformPtr transform,
+ xmlSecTransformCtxPtr transformCtx);
+XMLSEC_EXPORT xmlParserInputBufferPtr xmlSecTransformCreateInputBuffer(xmlSecTransformPtr transform,
+ xmlSecTransformCtxPtr transformCtx);
+
+/************************************************************************
+ *
+ * Transform Klass
+ *
+ ************************************************************************/
+/**
+ * xmlSecTransformInitializeMethod:
+ * @transform: the pointer to transform object.
+ *
+ * The transform specific initialization method.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformInitializeMethod) (xmlSecTransformPtr transform);
+
+/**
+ * xmlSecTransformFinalizeMethod:
+ * @transform: the pointer to transform object.
+ *
+ * The transform specific destroy method.
+ */
+typedef void (*xmlSecTransformFinalizeMethod) (xmlSecTransformPtr transform);
+
+/**
+ * xmlSecTransformGetDataTypeMethod:
+ * @transform: the pointer to transform object.
+ * @mode: the mode.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to query information about transform
+ * data type in specified mode @mode.
+ *
+ * Returns: transform data type.
+ */
+typedef xmlSecTransformDataType (*xmlSecTransformGetDataTypeMethod)(xmlSecTransformPtr transform,
+ xmlSecTransformMode mode,
+ xmlSecTransformCtxPtr transformCtx);
+
+/**
+ * xmlSecTransformNodeReadMethod:
+ * @transform: the pointer to transform object.
+ * @node: the pointer to <dsig:Transform/> node.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to read the transform data from
+ * the @node.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformNodeReadMethod) (xmlSecTransformPtr transform,
+ xmlNodePtr node,
+ xmlSecTransformCtxPtr transformCtx);
+
+/**
+ * xmlSecTransformNodeWriteMethod:
+ * @transform: the pointer to transform object.
+ * @node: the pointer to <dsig:Transform/> node.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to write transform information to an XML node @node.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformNodeWriteMethod) (xmlSecTransformPtr transform,
+ xmlNodePtr node,
+ xmlSecTransformCtxPtr transformCtx);
+
+/**
+ * xmlSecTransformSetKeyRequirementsMethod:
+ * @transform: the pointer to transform object.
+ * @keyReq: the pointer to key requirements structure.
+ *
+ * Transform specific method to set transform's key requirements.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformSetKeyRequirementsMethod)(xmlSecTransformPtr transform,
+ xmlSecKeyReqPtr keyReq);
+
+/**
+ * xmlSecTransformSetKeyMethod:
+ * @transform: the pointer to transform object.
+ * @key: the pointer to key.
+ *
+ * The transform specific method to set the key for use.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformSetKeyMethod) (xmlSecTransformPtr transform,
+ xmlSecKeyPtr key);
+
+/**
+ * xmlSecTransformVerifyMethod:
+ * @transform: the pointer to transform object.
+ * @data: the input buffer.
+ * @dataSize: the size of input buffer @data.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to verify transform processing results
+ * (used by digest and signature transforms). This method sets @status
+ * member of the #xmlSecTransform structure to either #xmlSecTransformStatusOk
+ * if verification succeeded or #xmlSecTransformStatusFail otherwise.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformVerifyMethod) (xmlSecTransformPtr transform,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ xmlSecTransformCtxPtr transformCtx);
+/**
+ * xmlSecTransformPushBinMethod:
+ * @transform: the pointer to transform object.
+ * @data: the input binary data,
+ * @dataSize: the input data size.
+ * @final: the flag: if set to 1 then it's the last
+ * data chunk.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to process data from @data and push
+ * result to the next transform in the chain.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformPushBinMethod) (xmlSecTransformPtr transform,
+ const xmlSecByte* data,
+ xmlSecSize dataSize,
+ int final,
+ xmlSecTransformCtxPtr transformCtx);
+/**
+ * xmlSecTransformPopBinMethod:
+ * @transform: the pointer to transform object.
+ * @data: the buffer to store result data.
+ * @maxDataSize: the size of the buffer @data.
+ * @dataSize: the pointer to returned data size.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to pop data from previous transform
+ * in the chain and return result in the @data buffer. The size of returned
+ * data is placed in the @dataSize.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformPopBinMethod) (xmlSecTransformPtr transform,
+ xmlSecByte* data,
+ xmlSecSize maxDataSize,
+ xmlSecSize* dataSize,
+ xmlSecTransformCtxPtr transformCtx);
+/**
+ * xmlSecTransformPushXmlMethod:
+ * @transform: the pointer to transform object.
+ * @nodes: the input nodes.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to process @nodes and push result to the next
+ * transform in the chain.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformPushXmlMethod) (xmlSecTransformPtr transform,
+ xmlSecNodeSetPtr nodes,
+ xmlSecTransformCtxPtr transformCtx);
+/**
+ * xmlSecTransformPopXmlMethod:
+ * @transform: the pointer to transform object.
+ * @nodes: the pointer to store popinter to result nodes.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * The transform specific method to pop data from previous transform in the chain,
+ * process the data and return result in @nodes.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformPopXmlMethod) (xmlSecTransformPtr transform,
+ xmlSecNodeSetPtr* nodes,
+ xmlSecTransformCtxPtr transformCtx);
+/**
+ * xmlSecTransformExecuteMethod:
+ * @transform: the pointer to transform object.
+ * @last: the flag: if set to 1 then it's the last data chunk.
+ * @transformCtx: the pointer to transform context object.
+ *
+ * Transform specific method to process a chunk of data.
+ *
+ * Returns: 0 on success or a negative value otherwise.
+ */
+typedef int (*xmlSecTransformExecuteMethod) (xmlSecTransformPtr transform,
+ int last,
+ xmlSecTransformCtxPtr transformCtx);
+
+/**
+ * xmlSecTransformKlass:
+ * @klassSize: the transform klass structure size.
+ * @objSize: the transform object size.
+ * @name: the transform's name.
+ * @href: the transform's identification string (href).
+ * @usage: the allowed transforms usages.
+ * @initialize: the initialization method.
+ * @finalize: the finmalization (destroy) function.
+ * @readNode: the XML node read method.
+ * @writeNode: the XML node write method.
+ * @setKeyReq: the set key requirements method.
+ * @setKey: the set key method.
+ * @verify: the verify method (for digest and signature transforms).
+ * @getDataType: the input/output data type query method.
+ * @pushBin: the binary data "push thru chain" processing method.
+ * @popBin: the binary data "pop from chain" procesing method.
+ * @pushXml: the XML data "push thru chain" processing method.
+ * @popXml: the XML data "pop from chain" procesing method.
+ * @execute: the low level data processing method used by default
+ * implementations of @pushBin, @popBin, @pushXml and @popXml.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The transform klass desccription structure.
+ */
+struct _xmlSecTransformKlass {
+ /* data */
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
+ const xmlChar* name;
+ const xmlChar* href;
+ xmlSecTransformUsage usage;
+
+ /* methods */
+ xmlSecTransformInitializeMethod initialize;
+ xmlSecTransformFinalizeMethod finalize;
+
+ xmlSecTransformNodeReadMethod readNode;
+ xmlSecTransformNodeWriteMethod writeNode;
+
+ xmlSecTransformSetKeyRequirementsMethod setKeyReq;
+ xmlSecTransformSetKeyMethod setKey;
+ xmlSecTransformVerifyMethod verify;
+ xmlSecTransformGetDataTypeMethod getDataType;
+
+ xmlSecTransformPushBinMethod pushBin;
+ xmlSecTransformPopBinMethod popBin;
+ xmlSecTransformPushXmlMethod pushXml;
+ xmlSecTransformPopXmlMethod popXml;
+
+ /* low level method */
+ xmlSecTransformExecuteMethod execute;
+
+ /* reserved for future */
+ void* reserved0;
+ void* reserved1;
+};
+
+/**
+ * xmlSecTransformKlassGetName:
+ * @klass: the transofrm's klass.
+ *
+ * Macro. Returns transform klass name.
+ */
+#define xmlSecTransformKlassGetName(klass) \
+ (((klass)) ? ((klass)->name) : NULL)
+
+/***********************************************************************
+ *
+ * Transform Ids list
+ *
+ **********************************************************************/
+/**
+ * xmlSecTransformIdListId:
+ *
+ * Transform klasses list klass.
+ */
+#define xmlSecTransformIdListId xmlSecTransformIdListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecTransformIdListGetKlass (void);
+XMLSEC_EXPORT int xmlSecTransformIdListFind (xmlSecPtrListPtr list,
+ xmlSecTransformId transformId);
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformIdListFindByHref (xmlSecPtrListPtr list,
+ const xmlChar* href,
+ xmlSecTransformUsage usage);
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformIdListFindByName (xmlSecPtrListPtr list,
+ const xmlChar* name,
+ xmlSecTransformUsage usage);
+XMLSEC_EXPORT void xmlSecTransformIdListDebugDump (xmlSecPtrListPtr list,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecTransformIdListDebugXmlDump(xmlSecPtrListPtr list,
+ FILE* output);
+
+
+/********************************************************************
+ *
+ * XML Sec Library Transform Ids
+ *
+ *******************************************************************/
+/**
+ * xmlSecTransformIdUnknown:
+ *
+ * The "unknown" transform id (NULL).
+ */
+#define xmlSecTransformIdUnknown ((xmlSecTransformId)NULL)
+
+/**
+ * xmlSecTransformBase64Id:
+ *
+ * The base64 encode transform klass.
+ */
+#define xmlSecTransformBase64Id \
+ xmlSecTransformBase64GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformBase64GetKlass (void);
+XMLSEC_EXPORT void xmlSecTransformBase64SetLineSize (xmlSecTransformPtr transform,
+ xmlSecSize lineSize);
+/**
+ * xmlSecTransformInclC14NId:
+ *
+ * The regular (inclusive) C14N without comments transform klass.
+ */
+#define xmlSecTransformInclC14NId \
+ xmlSecTransformInclC14NGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NGetKlass (void);
+
+/**
+ * xmlSecTransformInclC14NWithCommentsId:
+ *
+ * The regular (inclusive) C14N with comments transform klass.
+ */
+#define xmlSecTransformInclC14NWithCommentsId \
+ xmlSecTransformInclC14NWithCommentsGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass(void);
+
+/**
+ * xmlSecTransformInclC14N11Id:
+ *
+ * The regular (inclusive) C14N 1.1 without comments transform klass.
+ */
+#define xmlSecTransformInclC14N11Id \
+ xmlSecTransformInclC14N11GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11GetKlass (void);
+
+/**
+ * xmlSecTransformInclC14N11WithCommentsId:
+ *
+ * The regular (inclusive) C14N 1.1 with comments transform klass.
+ */
+#define xmlSecTransformInclC14N11WithCommentsId \
+ xmlSecTransformInclC14N11WithCommentsGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKlass(void);
+
+/**
+ * xmlSecTransformExclC14NId
+ *
+ * The exclusive C14N without comments transform klass.
+ */
+#define xmlSecTransformExclC14NId \
+ xmlSecTransformExclC14NGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NGetKlass (void);
+
+/**
+ * xmlSecTransformExclC14NWithCommentsId:
+ *
+ * The exclusive C14N with comments transform klass.
+ */
+#define xmlSecTransformExclC14NWithCommentsId \
+ xmlSecTransformExclC14NWithCommentsGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass(void);
+
+/**
+ * xmlSecTransformEnvelopedId:
+ *
+ * The "enveloped" transform klass.
+ */
+#define xmlSecTransformEnvelopedId \
+ xmlSecTransformEnvelopedGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEnvelopedGetKlass (void);
+
+/**
+ * xmlSecTransformXPathId:
+ *
+ * The XPath transform klass.
+ */
+#define xmlSecTransformXPathId \
+ xmlSecTransformXPathGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPathGetKlass (void);
+
+/**
+ * xmlSecTransformXPath2Id:
+ *
+ * The XPath2 transform klass.
+ */
+#define xmlSecTransformXPath2Id \
+ xmlSecTransformXPath2GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPath2GetKlass (void);
+
+/**
+ * xmlSecTransformXPointerId:
+ *
+ * The XPointer transform klass.
+ */
+#define xmlSecTransformXPointerId \
+ xmlSecTransformXPointerGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPointerGetKlass (void);
+XMLSEC_EXPORT int xmlSecTransformXPointerSetExpr (xmlSecTransformPtr transform,
+ const xmlChar* expr,
+ xmlSecNodeSetType nodeSetType,
+ xmlNodePtr hereNode);
+#ifndef XMLSEC_NO_XSLT
+#include <libxslt/security.h>
+
+/**
+ * xmlSecTransformXsltId:
+ *
+ * The XSLT transform klass.
+ */
+#define xmlSecTransformXsltId \
+ xmlSecTransformXsltGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXsltGetKlass (void);
+XMLSEC_EXPORT void xmlSecTransformXsltSetDefaultSecurityPrefs(xsltSecurityPrefsPtr sec);
+#endif /* XMLSEC_NO_XSLT */
+
+/**
+ * xmlSecTransformRemoveXmlTagsC14NId:
+ *
+ * The "remove all xml tags" transform klass (used before base64 transforms).
+ */
+#define xmlSecTransformRemoveXmlTagsC14NId \
+ xmlSecTransformRemoveXmlTagsC14NGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRemoveXmlTagsC14NGetKlass(void);
+
+/**
+ * xmlSecTransformVisa3DHackId:
+ *
+ * Selects node subtree by given node id string. The only reason why we need this
+ * is Visa3D protocol. It doesn't follow XML/XPointer/XMLDSig specs and allows
+ * invalid XPointer expressions in the URI attribute. Since we couldn't evaluate
+ * such expressions thru XPath/XPointer engine, we need to have this hack here.
+ */
+#define xmlSecTransformVisa3DHackId \
+ xmlSecTransformVisa3DHackGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformVisa3DHackGetKlass (void);
+XMLSEC_EXPORT int xmlSecTransformVisa3DHackSetID (xmlSecTransformPtr transform,
+ const xmlChar* id);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_TRANSFORMS_H__ */
+
diff --git a/include/xmlsec/version.h b/include/xmlsec/version.h
new file mode 100644
index 00000000..1874ee0e
--- /dev/null
+++ b/include/xmlsec/version.h
@@ -0,0 +1,61 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Version information
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_VERSION_H__
+#define __XMLSEC_VERSION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * XMLSEC_VERSION:
+ *
+ * The library version string in the format
+ * "<major-number>.<minor-number>.<sub-minor-number>".
+ */
+#define XMLSEC_VERSION "1.2.18"
+
+/**
+ * XMLSEC_VERSION_MAJOR:
+ *
+ * The library major version number.
+ */
+#define XMLSEC_VERSION_MAJOR 1
+
+/**
+ * XMLSEC_VERSION_MINOR:
+ *
+ * The library minor version number.
+ */
+#define XMLSEC_VERSION_MINOR 2
+
+/**
+ * XMLSEC_VERSION_SUBMINOR:
+ *
+ * The library sub-minor version number.
+ */
+#define XMLSEC_VERSION_SUBMINOR 18
+
+/**
+ * XMLSEC_VERSION_INFO:
+ *
+ * The library version info string in the format
+ * "<major-number>+<minor-number>:<sub-minor-number>:<minor-number>".
+ */
+#define XMLSEC_VERSION_INFO "3:18:2"
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_VERSION_H__ */
+
diff --git a/include/xmlsec/version.h.in b/include/xmlsec/version.h.in
new file mode 100644
index 00000000..16bbafa0
--- /dev/null
+++ b/include/xmlsec/version.h.in
@@ -0,0 +1,61 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Version information
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_VERSION_H__
+#define __XMLSEC_VERSION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * XMLSEC_VERSION:
+ *
+ * The library version string in the format
+ * "<major-number>.<minor-number>.<sub-minor-number>".
+ */
+#define XMLSEC_VERSION "@XMLSEC_VERSION@"
+
+/**
+ * XMLSEC_VERSION_MAJOR:
+ *
+ * The library major version number.
+ */
+#define XMLSEC_VERSION_MAJOR @XMLSEC_VERSION_MAJOR@
+
+/**
+ * XMLSEC_VERSION_MINOR:
+ *
+ * The library minor version number.
+ */
+#define XMLSEC_VERSION_MINOR @XMLSEC_VERSION_MINOR@
+
+/**
+ * XMLSEC_VERSION_SUBMINOR:
+ *
+ * The library sub-minor version number.
+ */
+#define XMLSEC_VERSION_SUBMINOR @XMLSEC_VERSION_SUBMINOR@
+
+/**
+ * XMLSEC_VERSION_INFO:
+ *
+ * The library version info string in the format
+ * "<major-number>+<minor-number>:<sub-minor-number>:<minor-number>".
+ */
+#define XMLSEC_VERSION_INFO "@XMLSEC_VERSION_INFO@"
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_VERSION_H__ */
+
diff --git a/include/xmlsec/x509.h b/include/xmlsec/x509.h
new file mode 100644
index 00000000..e58f37c0
--- /dev/null
+++ b/include/xmlsec/x509.h
@@ -0,0 +1,80 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_X509_H__
+#define __XMLSEC_X509_H__
+
+#ifndef XMLSEC_NO_X509
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include <stdio.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/list.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/keyinfo.h>
+#include <xmlsec/transforms.h>
+
+/**
+ * XMLSEC_X509DATA_CERTIFICATE_NODE:
+ *
+ * <dsig:X509Certificate/> node found or would be written back.
+ */
+#define XMLSEC_X509DATA_CERTIFICATE_NODE 0x00000001
+/**
+ * XMLSEC_X509DATA_SUBJECTNAME_NODE:
+ *
+ * <dsig:X509SubjectName/> node found or would be written back.
+ */
+#define XMLSEC_X509DATA_SUBJECTNAME_NODE 0x00000002
+/**
+ * XMLSEC_X509DATA_ISSUERSERIAL_NODE:
+ *
+ * <dsig:X509IssuerSerial/> node found or would be written back.
+ */
+#define XMLSEC_X509DATA_ISSUERSERIAL_NODE 0x00000004
+/**
+ * XMLSEC_X509DATA_SKI_NODE:
+ *
+ * <dsig:/X509SKI> node found or would be written back.
+ */
+#define XMLSEC_X509DATA_SKI_NODE 0x00000008
+/**
+ * XMLSEC_X509DATA_CRL_NODE:
+ *
+ * <dsig:X509CRL/> node found or would be written back.
+ */
+#define XMLSEC_X509DATA_CRL_NODE 0x00000010
+/**
+ * XMLSEC_X509DATA_DEFAULT:
+ *
+ * Default set of nodes to write in case of empty
+ * <dsig:X509Data/> node template.
+ */
+#define XMLSEC_X509DATA_DEFAULT \
+ (XMLSEC_X509DATA_CERTIFICATE_NODE | XMLSEC_X509DATA_CRL_NODE)
+
+XMLSEC_EXPORT int xmlSecX509DataGetNodeContent (xmlNodePtr node,
+ int deleteChildren,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_X509 */
+
+#endif /* __XMLSEC_X509_H__ */
+
diff --git a/include/xmlsec/xkms.h b/include/xmlsec/xkms.h
new file mode 100644
index 00000000..8035035e
--- /dev/null
+++ b/include/xmlsec/xkms.h
@@ -0,0 +1,652 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * "XML Key Management Specification v 2.0" implementation
+ * http://www.w3.org/TR/xkms2/
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_XKMS_H__
+#define __XMLSEC_XKMS_H__
+
+#ifndef XMLSEC_NO_XKMS
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include <stdio.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/list.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/keyinfo.h>
+#include <xmlsec/transforms.h>
+
+/************************************************************************
+ *
+ * Forward declarations. These internal xmlsec library structures are
+ * declared in "xmlsec/private/xkms.h" file.
+ *
+ ************************************************************************/
+typedef struct _xmlSecXkmsRespondWithKlass xmlSecXkmsRespondWithKlass,
+ *xmlSecXkmsRespondWithId;
+
+typedef struct _xmlSecXkmsServerRequestKlass xmlSecXkmsServerRequestKlass,
+ *xmlSecXkmsServerRequestId;
+
+
+/**
+ * xmlSecXkmsResultMajor:
+ * @xmlSecXkmsResultMajorSuccess: The operation succeeded.
+ * @xmlSecXkmsResultMajorVersionMismatch: The service does not support
+ * the protocol version specified
+ * in the request.
+ * @xmlSecXkmsResultMajorSender: An error occurred that was due
+ * to the message sent by the sender.
+ * @xmlSecXkmsResultMajorReceiver: An error occurred at the receiver.
+ * @xmlSecXkmsResultMajorRepresent: The service has not acted on the
+ * request. In order for the request
+ * to be acted upon the request MUST
+ * be represented with the specified
+ * nonce in accordance with the two
+ * phase protocol.
+ * @xmlSecXkmsResultMajorPending: The request has been accepted
+ * for processing and the service
+ * will return the result asynchronously.
+ *
+ * The values for ResultMajor attribute.
+ */
+typedef enum {
+ xmlSecXkmsResultMajorSuccess = 0,
+ xmlSecXkmsResultMajorVersionMismatch,
+ xmlSecXkmsResultMajorSender,
+ xmlSecXkmsResultMajorReceiver,
+ xmlSecXkmsResultMajorRepresent,
+ xmlSecXkmsResultMajorPending
+} xmlSecXkmsResultMajor;
+
+/**
+ * xmlSecXkmsResultMinor:
+ * @xmlSecXkmsResultMinorNone: No minor result code available.
+ * @xmlSecXkmsResultMinorNoMatch: No match was found for the search
+ * prototype provided.
+ * @xmlSecXkmsResultMinorTooManyResponses: The request resulted in the
+ * number of responses that
+ * exceeded either the ResponseLimit
+ * value specified in the request or
+ * some other limit determined by
+ * the service. The service MAY
+ * either return a subset of the
+ * possible responses or none at all.
+ * @xmlSecXkmsResultMinorIncomplete: Only part of the information
+ * requested could be provided.
+ * @xmlSecXkmsResultMinorFailure: The service attempted to perform
+ * the request but the operation
+ * failed for unspecified reasons.
+ * @xmlSecXkmsResultMinorRefused: The operation was refused. The
+ * service did not attempt to
+ * perform the request.
+ * @xmlSecXkmsResultMinorNoAuthentication: The operation was refused
+ * because the necessary authentication
+ * information was incorrect or missing.
+ * @xmlSecXkmsResultMinorMessageNotSupported: The receiver does not implement
+ * the specified operation.
+ * @xmlSecXkmsResultMinorUnknownResponseId: The ResponseId for which pending
+ * status was requested is unknown to
+ * the service.
+ * @xmlSecXkmsResultMinorSynchronous: The receiver does not support
+ * synchronous processing of this
+ * type of request.
+ *
+ * The values for ResultMinor attribute.
+ */
+typedef enum {
+ xmlSecXkmsResultMinorNone = 0,
+ xmlSecXkmsResultMinorNoMatch,
+ xmlSecXkmsResultMinorTooManyResponses,
+ xmlSecXkmsResultMinorIncomplete,
+ xmlSecXkmsResultMinorFailure,
+ xmlSecXkmsResultMinorRefused,
+ xmlSecXkmsResultMinorNoAuthentication,
+ xmlSecXkmsResultMinorMessageNotSupported,
+ xmlSecXkmsResultMinorUnknownResponseId,
+ xmlSecXkmsResultMinorSynchronous
+} xmlSecXkmsResultMinor;
+
+/**
+ * xmlSecXkmsKeyBindingStatus:
+ * @xmlSecXkmsKeyBindingStatusNone: The key status is not available.
+ * @xmlSecXkmsKeyBindingStatusValid: The key is valid.
+ * @xmlSecXkmsKeyBindingStatusInvalid: The key is not valid.
+ * @xmlSecXkmsKeyBindingStatusIndeterminate: Could not determine key status.
+ *
+ * The values for key binding StatusValue attribute.
+ */
+typedef enum {
+ xmlSecXkmsKeyBindingStatusNone,
+ xmlSecXkmsKeyBindingStatusValid,
+ xmlSecXkmsKeyBindingStatusInvalid,
+ xmlSecXkmsKeyBindingStatusIndeterminate
+} xmlSecXkmsKeyBindingStatus;
+
+/**
+ * xmlSecXkmsServerFormat:
+ * @xmlSecXkmsServerFormatUnknown: The format is unknown.
+ * @xmlSecXkmsServerFormatPlain: The request/response are not enveloped.
+ * @xmlSecXkmsServerFormatSoap1_1: The request/response are SOAP 1.1 encapsulated
+ * @xmlSecXkmsServerFormatSoap1_2: The request/response are SOAP 1.2 encapsulated.
+ *
+ * The xkms server request/response format.
+ */
+typedef enum {
+ xmlSecXkmsServerFormatUnknown = 0,
+ xmlSecXkmsServerFormatPlain,
+ xmlSecXkmsServerFormatSoap11,
+ xmlSecXkmsServerFormatSoap12
+} xmlSecXkmsServerFormat;
+
+XMLSEC_EXPORT xmlSecXkmsServerFormat xmlSecXkmsServerFormatFromString
+ (const xmlChar* str);
+XMLSEC_EXPORT const xmlChar* xmlSecXkmsServerFormatToString (xmlSecXkmsServerFormat format);
+
+/************************************************************************
+ *
+ * XKMS requests server side processing klass
+ *
+ ************************************************************************/
+/**
+ * xmlSecXkmsServerCtx:
+ * @userData: the pointer to user data (xmlsec and xmlsec-crypto libraries
+ * never touches this).
+ * @flags: the XML Encryption processing flags.
+ * @flags2: the XML Encryption processing flags.
+ * @keyInfoReadCtx: the reading key context.
+ * @keyInfoWriteCtx: the writing key context (not used for signature verification).
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * XKMS context.
+ */
+struct _xmlSecXkmsServerCtx {
+ /* these data user can set before performing the operation */
+ void* userData;
+ xmlSecBitMask flags;
+ xmlSecBitMask flags2;
+ xmlSecKeyInfoCtx keyInfoReadCtx;
+ xmlSecKeyInfoCtx keyInfoWriteCtx;
+ xmlSecPtrList enabledRespondWithIds;
+ xmlSecPtrList enabledServerRequestIds;
+ xmlChar* expectedService;
+ xmlChar* idPrefix;
+ xmlSecSize idLen;
+
+ /* these data are returned */
+ xmlSecPtrList keys;
+ xmlSecXkmsResultMajor resultMajor;
+ xmlSecXkmsResultMinor resultMinor;
+ xmlSecXkmsServerRequestId requestId;
+ xmlChar* id;
+ xmlChar* service;
+ xmlChar* nonce;
+ xmlChar* originalRequestId;
+ xmlChar* pendingNotificationMechanism;
+ xmlChar* pendingNotificationIdentifier;
+ int responseLimit;
+ xmlSecBitMask responseMechanismMask;
+ xmlSecPtrListPtr compoundRequestContexts;
+
+ /* these are internal data, nobody should change that except us */
+ xmlNodePtr requestNode;
+ xmlNodePtr opaqueClientDataNode;
+ xmlNodePtr firtsMsgExtNode;
+ xmlNodePtr keyInfoNode;
+ xmlSecPtrList respWithList;
+
+ /* reserved for future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecXkmsServerCtxPtr xmlSecXkmsServerCtxCreate (xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecXkmsServerCtxDestroy (xmlSecXkmsServerCtxPtr ctx);
+XMLSEC_EXPORT int xmlSecXkmsServerCtxInitialize (xmlSecXkmsServerCtxPtr ctx,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecXkmsServerCtxFinalize (xmlSecXkmsServerCtxPtr ctx);
+XMLSEC_EXPORT void xmlSecXkmsServerCtxReset (xmlSecXkmsServerCtxPtr ctx);
+XMLSEC_EXPORT int xmlSecXkmsServerCtxCopyUserPref (xmlSecXkmsServerCtxPtr dst,
+ xmlSecXkmsServerCtxPtr src);
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxProcess (xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node,
+ xmlSecXkmsServerFormat format,
+ xmlDocPtr doc);
+XMLSEC_EXPORT int xmlSecXkmsServerCtxRequestRead (xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxResponseWrite(xmlSecXkmsServerCtxPtr ctx,
+ xmlDocPtr doc);
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxRequestUnwrap(xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node,
+ xmlSecXkmsServerFormat format);
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxResponseWrap (xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node,
+ xmlSecXkmsServerFormat format,
+ xmlDocPtr doc);
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxFatalErrorResponseCreate
+ (xmlSecXkmsServerCtxPtr ctx,
+ xmlSecXkmsServerFormat format,
+ xmlDocPtr doc);
+XMLSEC_EXPORT void xmlSecXkmsServerCtxSetResult (xmlSecXkmsServerCtxPtr ctx,
+ xmlSecXkmsResultMajor resultMajor,
+ xmlSecXkmsResultMinor resultMinor);
+XMLSEC_EXPORT void xmlSecXkmsServerCtxDebugDump (xmlSecXkmsServerCtxPtr ctx,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecXkmsServerCtxDebugXmlDump (xmlSecXkmsServerCtxPtr ctx,
+ FILE* output);
+
+/************************************************************************
+ *
+ * xmlSecXkmsServerCtxPtr list
+ *
+ ************************************************************************/
+/**
+ * xmlSecXkmsServerCtxPtrListId:
+ *
+ * zmlSecXkmsServerCtx klasses list klass.
+ */
+#define xmlSecXkmsServerCtxPtrListId xmlSecXkmsServerCtxPtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsServerCtxPtrListGetKlass
+ (void);
+
+/************************************************************************
+ *
+ * xmlSecXkmsServerCtxFlags
+ *
+ ************************************************************************/
+/**
+ * XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPONSE_MECHANISM
+ *
+ * If flag is set then we abort if an unknown <xkms:ResponseMechanism/>
+ * value is found.
+ */
+#define XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPONSE_MECHANISM 0x00000001
+
+/**
+ * XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPOND_WITH
+ *
+ * If flag is set then we abort if an unknown <xkms:RespondWith/>
+ * value is found.
+ */
+#define XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPOND_WITH 0x00000002
+
+/**
+ * XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_KEY_USAGE
+ *
+ * If flag is set then we abort if an unknown <xkms:KeyUsage/>
+ * value is found.
+ */
+#define XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_KEY_USAGE 0x00000004
+
+/************************************************************************
+ *
+ * XKMS ResponseMechanism element values.
+ *
+ ************************************************************************/
+/**
+ * XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REPRESENT:
+ *
+ * XKMS ResponseMechanism element value. The requestor is prepared to
+ * accept a response that uses asynchronous processing, i.e. the service
+ * MAY return the MajorResult code Pending.
+ */
+#define XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_PENDING 0x00000001
+
+/**
+ * XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REPRESENT:
+ *
+ * XKMS ResponseMechanism element value. The requestor is prepared to
+ * accept a response that uses the two phase protocol, i.e. the service
+ * MAY return the MajorResult code Represent.
+ */
+#define XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REPRESENT 0x00000002
+
+/**
+ * XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REQUEST_SIGNATURE_VALUE:
+ *
+ * XKMS ResponseMechanism element value. The requestor is prepared to
+ * accept a response that carries a <RequestSignatureValue> element.
+ */
+#define XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REQUEST_SIGNATURE_VALUE 0x00000004
+
+/************************************************************************
+ *
+ * XKMS ResponseLimit element values
+ *
+ ************************************************************************/
+/**
+ * XMLSEC_XKMS_NO_RESPONSE_LIMIT:
+ *
+ * The ResponseLimit is not specified.
+ */
+#define XMLSEC_XKMS_NO_RESPONSE_LIMIT -1
+
+
+/************************************************************************
+ *
+ * XKMS KeyBinding reason values
+ *
+ ************************************************************************/
+/**
+ * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_ISSUER_TRAST:
+ *
+ * The issuer of the information on which the key binding is based is
+ * considered to be trustworthy by the XKMS service.
+ *
+ * X.509 Equivalents
+ * - Valid: Certificate path anchored by trusted root successfully constructed.
+ * - Invalid: Certificate path could not be constructed to a trusted root.
+ */
+#define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_ISSUER_TRAST 0x00000001
+
+/**
+ * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_REVOCATION_STATUS:
+ *
+ * The XKMS service has affirmatively verified the status of the
+ * key binding with an authoritative source
+ *
+ * X.509 Equivalents
+ * - Valid: Certificate status validated using CRL or OCSP.
+ * - Invalid: Certificate status returned revoked or suspended.
+ */
+#define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_REVOCATION_STATUS 0x00000002
+
+/**
+ * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_VALIDITY_INTERVAL:
+ *
+ * The requested time instant was within the validity interval of
+ * the key binding
+ *
+ * X.509 Equivalents
+ * - Valid: The certificate chain was valid at the requested time instant.
+ * - Invalid: The requested time instant was before or after the certificate
+ * chain validity interval.
+ */
+#define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_VALIDITY_INTERVAL 0x00000004
+
+/**
+ * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_SIGNATURE:
+ *
+ * Signature on signed data provided by the client in the <Keyinfo> element was
+ * successfully verified.
+ *
+ * X.509 Equivalents
+ * - Valid: Certificate Signature verified.
+ * - Invalid: Certificate Signature verification failed.
+ */
+#define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_SIGNATURE 0x00000008
+
+
+/************************************************************************
+ *
+ * XKMS RespondWith Klass
+ *
+ ************************************************************************/
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecXkmsRespondWithIdsGet (void);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithIdsInit (void);
+XMLSEC_EXPORT void xmlSecXkmsRespondWithIdsShutdown(void);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithIdsRegisterDefault
+ (void);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithIdsRegister(xmlSecXkmsRespondWithId id);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithNodeRead (xmlSecXkmsRespondWithId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithNodeWrite (xmlSecXkmsRespondWithId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+XMLSEC_EXPORT void xmlSecXkmsRespondWithDebugDump (xmlSecXkmsRespondWithId id,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecXkmsRespondWithDebugXmlDump
+ (xmlSecXkmsRespondWithId id,
+ FILE* output);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeRead
+ (xmlSecXkmsRespondWithId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeWrite
+ (xmlSecXkmsRespondWithId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+/************************************************************************
+ *
+ * XKMS RespondWith Klass List
+ *
+ ************************************************************************/
+/**
+ * xmlSecXkmsRespondWithIdListId:
+ *
+ * XKMS RespondWith klasses list klass.
+ */
+#define xmlSecXkmsRespondWithIdListId xmlSecXkmsRespondWithIdListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsRespondWithIdListGetKlass
+ (void);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListFind (xmlSecPtrListPtr list,
+ xmlSecXkmsRespondWithId id);
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithIdListFindByNodeValue
+ (xmlSecPtrListPtr list,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListWrite(xmlSecPtrListPtr list,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+
+/********************************************************************
+ *
+ * XML Sec Library RespondWith Ids
+ *
+ *******************************************************************/
+/**
+ * xmlSecXkmsRespondWithIdUnknown:
+ *
+ * The "unknown" RespondWith id (NULL).
+ */
+#define xmlSecXkmsRespondWithIdUnknown NULL
+
+/**
+ * xmlSecXkmsRespondWithKeyNameId:
+ *
+ * The respond with KeyName klass.
+ */
+#define xmlSecXkmsRespondWithKeyNameId \
+ xmlSecXkmsRespondWithKeyNameGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyNameGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithKeyValueId:
+ *
+ * The respond with KeyValue klass.
+ */
+#define xmlSecXkmsRespondWithKeyValueId \
+ xmlSecXkmsRespondWithKeyValueGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyValueGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithPrivateKeyId:
+ *
+ * The respond with PrivateKey klass.
+ */
+#define xmlSecXkmsRespondWithPrivateKeyId \
+ xmlSecXkmsRespondWithPrivateKeyGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPrivateKeyGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithRetrievalMethodId:
+ *
+ * The respond with RetrievalMethod klass.
+ */
+#define xmlSecXkmsRespondWithRetrievalMethodId \
+ xmlSecXkmsRespondWithRetrievalMethodGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithRetrievalMethodGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithX509CertId:
+ *
+ * The respond with X509Cert klass.
+ */
+#define xmlSecXkmsRespondWithX509CertId \
+ xmlSecXkmsRespondWithX509CertGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CertGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithX509ChainId:
+ *
+ * The respond with X509Chain klass.
+ */
+#define xmlSecXkmsRespondWithX509ChainId \
+ xmlSecXkmsRespondWithX509ChainGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509ChainGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithX509CRLId:
+ *
+ * The respond with X509CRL klass.
+ */
+#define xmlSecXkmsRespondWithX509CRLId \
+ xmlSecXkmsRespondWithX509CRLGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CRLGetKlass(void);
+
+
+/**
+ * xmlSecXkmsRespondWithPGPId:
+ *
+ * The respond with PGP klass.
+ */
+#define xmlSecXkmsRespondWithPGPId \
+ xmlSecXkmsRespondWithPGPGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPGPGetKlass(void);
+
+/**
+ * xmlSecXkmsRespondWithSPKIId:
+ *
+ * The respond with SPKI klass.
+ */
+#define xmlSecXkmsRespondWithSPKIId \
+ xmlSecXkmsRespondWithSPKIGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithSPKIGetKlass(void);
+
+
+/************************************************************************
+ *
+ * XKMS ServerRequest Klass
+ *
+ ************************************************************************/
+XMLSEC_EXPORT xmlSecPtrListPtr xmlSecXkmsServerRequestIdsGet (void);
+XMLSEC_EXPORT int xmlSecXkmsServerRequestIdsInit (void);
+XMLSEC_EXPORT void xmlSecXkmsServerRequestIdsShutdown
+ (void);
+XMLSEC_EXPORT int xmlSecXkmsServerRequestIdsRegisterDefault
+ (void);
+XMLSEC_EXPORT int xmlSecXkmsServerRequestIdsRegister
+ (xmlSecXkmsServerRequestId id);
+XMLSEC_EXPORT int xmlSecXkmsServerRequestNodeRead (xmlSecXkmsServerRequestId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecXkmsServerRequestExecute (xmlSecXkmsServerRequestId id,
+ xmlSecXkmsServerCtxPtr ctx);
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerRequestNodeWrite(xmlSecXkmsServerRequestId id,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlDocPtr doc,
+ xmlNodePtr node);
+XMLSEC_EXPORT void xmlSecXkmsServerRequestDebugDump(xmlSecXkmsServerRequestId id,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecXkmsServerRequestDebugXmlDump
+ (xmlSecXkmsServerRequestId id,
+ FILE* output);
+
+/************************************************************************
+ *
+ * XKMS ServerRequest Klass List
+ *
+ ************************************************************************/
+/**
+ * xmlSecXkmsServerRequestIdListId:
+ *
+ * XKMS ServerRequest klasses list klass.
+ */
+#define xmlSecXkmsServerRequestIdListId xmlSecXkmsServerRequestIdListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsServerRequestIdListGetKlass
+ (void);
+XMLSEC_EXPORT int xmlSecXkmsServerRequestIdListFind
+ (xmlSecPtrListPtr list,
+ xmlSecXkmsServerRequestId id);
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestIdListFindByName
+ (xmlSecPtrListPtr list,
+ const xmlChar* name);
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestIdListFindByNode
+ (xmlSecPtrListPtr list,
+ xmlNodePtr node);
+
+/**
+ * xmlSecXkmsServerRequestIdUnknown:
+ *
+ * The "unknown" ServerRequest id (NULL).
+ */
+#define xmlSecXkmsServerRequestIdUnknown NULL
+
+/**
+ * xmlSecXkmsServerRequestResultId:
+ *
+ * The Result response klass.
+ */
+#define xmlSecXkmsServerRequestResultId \
+ xmlSecXkmsServerRequestResultGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestResultGetKlass(void);
+
+/**
+ * xmlSecXkmsServerRequestStatusId:
+ *
+ * The StatusRequest klass.
+ */
+#define xmlSecXkmsServerRequestStatusId \
+ xmlSecXkmsServerRequestStatusGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestStatusGetKlass(void);
+
+/**
+ * xmlSecXkmsServerRequestCompoundId:
+ *
+ * The CompoundRequest klass.
+ */
+#define xmlSecXkmsServerRequestCompoundId \
+ xmlSecXkmsServerRequestCompoundGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestCompoundGetKlass(void);
+
+/**
+ * xmlSecXkmsServerRequestLocateId:
+ *
+ * The LocateRequest klass.
+ */
+#define xmlSecXkmsServerRequestLocateId \
+ xmlSecXkmsServerRequestLocateGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestLocateGetKlass(void);
+
+/**
+ * xmlSecXkmsServerRequestValidateId:
+ *
+ * The ValidateRequest klass.
+ */
+#define xmlSecXkmsServerRequestValidateId \
+ xmlSecXkmsServerRequestValidateGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestValidateGetKlass(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_XKMS */
+
+#endif /* __XMLSEC_XKMS_H__ */
+
diff --git a/include/xmlsec/xmldsig.h b/include/xmlsec/xmldsig.h
new file mode 100644
index 00000000..689980b4
--- /dev/null
+++ b/include/xmlsec/xmldsig.h
@@ -0,0 +1,281 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * "XML Digital Signature" implementation
+ * http://www.w3.org/TR/xmldsig-core/
+ * http://www.w3.org/Signature/Overview.html
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_XMLDSIG_H__
+#define __XMLSEC_XMLDSIG_H__
+
+#ifndef XMLSEC_NO_XMLDSIG
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/list.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/keyinfo.h>
+#include <xmlsec/transforms.h>
+
+typedef struct _xmlSecDSigReferenceCtx xmlSecDSigReferenceCtx,
+ *xmlSecDSigReferenceCtxPtr;
+
+/**
+ * xmlSecDSigStatus:
+ * @xmlSecDSigStatusUnknown: the status is unknow.
+ * @xmlSecDSigStatusSucceeded: the processing succeeded.
+ * @xmlSecDSigStatusInvalid: the processing failed.
+ *
+ * XML Digital signature processing status.
+ */
+typedef enum {
+ xmlSecDSigStatusUnknown = 0,
+ xmlSecDSigStatusSucceeded,
+ xmlSecDSigStatusInvalid
+} xmlSecDSigStatus;
+
+/**************************************************************************
+ *
+ * xmlSecDSigCtx
+ *
+ *************************************************************************/
+
+/**
+ * XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS:
+ *
+ * If this flag is set then <dsig:Manifests/> nodes will not be processed.
+ */
+#define XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS 0x00000001
+
+/**
+ * XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES:
+ *
+ * If this flag is set then pre-digest buffer for <dsig:Reference/> child
+ * of <dsig:KeyInfo/> element will be stored in #xmlSecDSigCtx.
+ */
+#define XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES 0x00000002
+
+/**
+ * XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES:
+ *
+ * If this flag is set then pre-digest buffer for <dsig:Reference/> child
+ * of <dsig:Manifest/> element will be stored in #xmlSecDSigCtx.
+ */
+#define XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES 0x00000004
+
+/**
+ * XMLSEC_DSIG_FLAGS_STORE_SIGNATURE:
+ *
+ * If this flag is set then pre-signature buffer for <dsig:SignedInfo/>
+ * element processing will be stored in #xmlSecDSigCtx.
+ */
+#define XMLSEC_DSIG_FLAGS_STORE_SIGNATURE 0x00000008
+
+/**
+ * XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK:
+ *
+ * If this flag is set then URI ID references are resolved directly
+ * without using XPointers. This allows one to sign/verify Visa3D
+ * documents that don't follow XML, XPointer and XML DSig specifications.
+ */
+#define XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK 0x00000010
+
+/**
+ * xmlSecDSigCtx:
+ * @userData: the pointer to user data (xmlsec and xmlsec-crypto libraries
+ * never touches this).
+ * @flags: the XML Digital Signature processing flags.
+ * @flags2: the XML Digital Signature processing flags.
+ * @keyInfoReadCtx: the reading key context.
+ * @keyInfoWriteCtx: the writing key context (not used for signature verification).
+ * @transformCtx: the <dsig:SignedInfo/> node processing context.
+ * @enabledReferenceUris: the URI types allowed for <dsig:Reference/> node.
+ * @enabledReferenceTransforms: the list of transforms allowed in <dsig:Reference/> node.
+ * @referencePreExecuteCallback:the callback for <dsig:Reference/> node processing.
+ * @defSignMethodId: the default signing method klass.
+ * @defC14NMethodId: the default c14n method klass.
+ * @defDigestMethodId: the default digest method klass.
+ * @signKey: the signature key; application may set #signKey
+ * before calling #xmlSecDSigCtxSign or #xmlSecDSigCtxVerify
+ * functions.
+ * @operation: the operation: sign or verify.
+ * @result: the pointer to signature (not valid for signature verificaction).
+ * @status: the <dsig:Signatuire/> procesisng status.
+ * @signMethod: the pointer to signature transform.
+ * @c14nMethod: the pointer to c14n transform.
+ * @preSignMemBufMethod: the pointer to binary buffer right before signature
+ * (valid only if #XMLSEC_DSIG_FLAGS_STORE_SIGNATURE flag is set).
+ * @signValueNode: the pointer to <dsig:SignatureValue/> node.
+ * @id: the pointer to Id attribute of <dsig:Signature/> node.
+ * @signedInfoReferences: the list of references in <dsig:SignedInfo/> node.
+ * @manifestReferences: the list of references in <dsig:Manifest/> nodes.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * XML DSig processing context.
+ */
+struct _xmlSecDSigCtx {
+ /* these data user can set before performing the operation */
+ void* userData;
+ unsigned int flags;
+ unsigned int flags2;
+ xmlSecKeyInfoCtx keyInfoReadCtx;
+ xmlSecKeyInfoCtx keyInfoWriteCtx;
+ xmlSecTransformCtx transformCtx;
+ xmlSecTransformUriType enabledReferenceUris;
+ xmlSecPtrListPtr enabledReferenceTransforms;
+ xmlSecTransformCtxPreExecuteCallback referencePreExecuteCallback;
+ xmlSecTransformId defSignMethodId;
+ xmlSecTransformId defC14NMethodId;
+ xmlSecTransformId defDigestMethodId;
+
+ /* these data are returned */
+ xmlSecKeyPtr signKey;
+ xmlSecTransformOperation operation;
+ xmlSecBufferPtr result;
+ xmlSecDSigStatus status;
+ xmlSecTransformPtr signMethod;
+ xmlSecTransformPtr c14nMethod;
+ xmlSecTransformPtr preSignMemBufMethod;
+ xmlNodePtr signValueNode;
+ xmlChar* id;
+ xmlSecPtrList signedInfoReferences;
+ xmlSecPtrList manifestReferences;
+
+ /* reserved for future */
+ void* reserved0;
+ void* reserved1;
+};
+
+/* constructor/destructor */
+XMLSEC_EXPORT xmlSecDSigCtxPtr xmlSecDSigCtxCreate (xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecDSigCtxDestroy (xmlSecDSigCtxPtr dsigCtx);
+XMLSEC_EXPORT int xmlSecDSigCtxInitialize (xmlSecDSigCtxPtr dsigCtx,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecDSigCtxFinalize (xmlSecDSigCtxPtr dsigCtx);
+XMLSEC_EXPORT int xmlSecDSigCtxSign (xmlSecDSigCtxPtr dsigCtx,
+ xmlNodePtr tmpl);
+XMLSEC_EXPORT int xmlSecDSigCtxVerify (xmlSecDSigCtxPtr dsigCtx,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecDSigCtxEnableReferenceTransform(xmlSecDSigCtxPtr dsigCtx,
+ xmlSecTransformId transformId);
+XMLSEC_EXPORT int xmlSecDSigCtxEnableSignatureTransform(xmlSecDSigCtxPtr dsigCtx,
+ xmlSecTransformId transformId);
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecDSigCtxGetPreSignBuffer (xmlSecDSigCtxPtr dsigCtx);
+XMLSEC_EXPORT void xmlSecDSigCtxDebugDump (xmlSecDSigCtxPtr dsigCtx,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecDSigCtxDebugXmlDump (xmlSecDSigCtxPtr dsigCtx,
+ FILE* output);
+
+
+/**************************************************************************
+ *
+ * xmlSecDSigReferenceCtx
+ *
+ *************************************************************************/
+/**
+ * xmlSecDSigReferenceOrigin:
+ * @xmlSecDSigReferenceOriginSignedInfo:reference in <dsig:SignedInfo> node.
+ * @xmlSecDSigReferenceOriginManifest: reference <dsig:Manifest> node.
+ *
+ * The possible <dsig:Reference/> node locations: in the <dsig:SignedInfo/>
+ * node or in the <dsig:Manifest/> node.
+ */
+typedef enum {
+ xmlSecDSigReferenceOriginSignedInfo,
+ xmlSecDSigReferenceOriginManifest
+} xmlSecDSigReferenceOrigin;
+
+/**
+ * xmlSecDSigReferenceCtx:
+ * @userData: the pointer to user data (xmlsec and xmlsec-crypto libraries
+ * never touches this).
+ * @dsigCtx: the pointer to "parent" <dsig:Signature/> processing context.
+ * @origin: the signature origin (<dsig:SignedInfo/> or <dsig:Manifest/>).
+ * @transformCtx: the reference processing transforms context.
+ * @digestMethod: the pointer to digest transform.
+ * @result: the pointer to digest result.
+ * @status: the reference processing status.
+ * @preDigestMemBufMethod: the pointer to binary buffer right before digest
+ * (valid only if either
+ * #XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES or
+ * #XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES flags are set).
+ * @id: the <dsig:Reference/> node ID attribute.
+ * @uri: the <dsig:Reference/> node URI attribute.
+ * @type: the <dsig:Reference/> node Type attribute.
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
+ *
+ * The <dsig:Reference/> processing context.
+ */
+struct _xmlSecDSigReferenceCtx {
+ void* userData;
+ xmlSecDSigCtxPtr dsigCtx;
+ xmlSecDSigReferenceOrigin origin;
+ xmlSecTransformCtx transformCtx;
+ xmlSecTransformPtr digestMethod;
+
+ xmlSecBufferPtr result;
+ xmlSecDSigStatus status;
+ xmlSecTransformPtr preDigestMemBufMethod;
+ xmlChar* id;
+ xmlChar* uri;
+ xmlChar* type;
+
+ /* reserved for future */
+ void* reserved0;
+ void* reserved1;
+};
+
+XMLSEC_EXPORT xmlSecDSigReferenceCtxPtr xmlSecDSigReferenceCtxCreate(xmlSecDSigCtxPtr dsigCtx,
+ xmlSecDSigReferenceOrigin origin);
+XMLSEC_EXPORT void xmlSecDSigReferenceCtxDestroy (xmlSecDSigReferenceCtxPtr dsigRefCtx);
+XMLSEC_EXPORT int xmlSecDSigReferenceCtxInitialize(xmlSecDSigReferenceCtxPtr dsigRefCtx,
+ xmlSecDSigCtxPtr dsigCtx,
+ xmlSecDSigReferenceOrigin origin);
+XMLSEC_EXPORT void xmlSecDSigReferenceCtxFinalize (xmlSecDSigReferenceCtxPtr dsigRefCtx);
+XMLSEC_EXPORT int xmlSecDSigReferenceCtxProcessNode(xmlSecDSigReferenceCtxPtr dsigRefCtx,
+ xmlNodePtr node);
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecDSigReferenceCtxGetPreDigestBuffer
+ (xmlSecDSigReferenceCtxPtr dsigRefCtx);
+XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugDump (xmlSecDSigReferenceCtxPtr dsigRefCtx,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugXmlDump(xmlSecDSigReferenceCtxPtr dsigRefCtx,
+ FILE* output);
+
+/**************************************************************************
+ *
+ * xmlSecDSigReferenceCtxListKlass
+ *
+ *************************************************************************/
+/**
+ * xmlSecDSigReferenceCtxListId:
+ *
+ * The references list klass.
+ */
+#define xmlSecDSigReferenceCtxListId \
+ xmlSecDSigReferenceCtxListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecDSigReferenceCtxListGetKlass(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_XMLDSIG */
+
+#endif /* __XMLSEC_XMLDSIG_H__ */
+
diff --git a/include/xmlsec/xmlenc.h b/include/xmlsec/xmlenc.h
new file mode 100644
index 00000000..8f972779
--- /dev/null
+++ b/include/xmlsec/xmlenc.h
@@ -0,0 +1,163 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * "XML Encryption" implementation
+ * http://www.w3.org/TR/xmlenc-core
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_XMLENC_H__
+#define __XMLSEC_XMLENC_H__
+
+#ifndef XMLSEC_NO_XMLENC
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include <stdio.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+
+#include <xmlsec/xmlsec.h>
+#include <xmlsec/buffer.h>
+#include <xmlsec/keys.h>
+#include <xmlsec/keysmngr.h>
+#include <xmlsec/keyinfo.h>
+#include <xmlsec/transforms.h>
+
+/**
+ * xmlEncCtxMode:
+ * @xmlEncCtxModeEncryptedData: the <enc:EncryptedData/> element procesing.
+ * @xmlEncCtxModeEncryptedKey: the <enc:EncryptedKey/> element processing.
+ *
+ * The #xmlSecEncCtx mode.
+ */
+typedef enum {
+ xmlEncCtxModeEncryptedData = 0,
+ xmlEncCtxModeEncryptedKey
+} xmlEncCtxMode;
+
+
+/**
+ * XMLSEC_ENC_RETURN_REPLACED_NODE:
+ *
+ * If this flag is set, then the replaced node will be returned in the replacedNodeList
+ */
+#define XMLSEC_ENC_RETURN_REPLACED_NODE 0x00000001
+
+/**
+ * xmlSecEncCtx:
+ * @userData: the pointer to user data (xmlsec and xmlsec-crypto libraries
+ * never touches this).
+ * @flags: the XML Encryption processing flags.
+ * @flags2: the XML Encryption processing flags.
+ * @mode: the mode.
+ * @keyInfoReadCtx: the reading key context.
+ * @keyInfoWriteCtx: the writing key context (not used for signature verification).
+ * @transformCtx: the transforms processing context.
+ * @defEncMethodId: the default encryption method (used if
+ * <enc:EncryptionMethod/> node is not present).
+ * @encKey: the signature key; application may set #encKey
+ * before calling encryption/decryption functions.
+ * @operation: the operation: encrypt or decrypt.
+ * @result: the pointer to signature (not valid for signature verificaction).
+ * @resultBase64Encoded: the flag: if set then result in #result is base64 encoded.
+ * @resultReplaced: the flag: if set then resulted <enc:EncryptedData/>
+ * or <enc:EncryptedKey/> node is added to the document.
+ * @encMethod: the pointer to encryption transform.
+ * @replacedNodeList: the first node of the list of replaced nodes depending on the nodeReplacementMode
+ * @id: the ID attribute of <enc:EncryptedData/>
+ * or <enc:EncryptedKey/> node.
+ * @type: the Type attribute of <enc:EncryptedData/>
+ * or <enc:EncryptedKey/> node.
+ * @mimeType: the MimeType attribute of <enc:EncryptedData/>
+ * or <enc:EncryptedKey/> node.
+ * @encoding: the Encoding attributeof <enc:EncryptedData/>
+ * or <enc:EncryptedKey/> node.
+ * @recipient: the Recipient attribute of <enc:EncryptedKey/> node..
+ * @carriedKeyName: the CarriedKeyName attribute of <enc:EncryptedKey/> node.
+ * @encDataNode: the pointer to <enc:EncryptedData/>
+ * or <enc:EncryptedKey/> node.
+ * @encMethodNode: the pointer to <enc:EncryptionMethod/> node.
+ * @keyInfoNode: the pointer to <enc:KeyInfo/> node.
+ * @cipherValueNode: the pointer to <enc:CipherValue/> node.
+ * @reserved1: reserved for the future.
+ *
+ * XML Encrypiton context.
+ */
+struct _xmlSecEncCtx {
+ /* these data user can set before performing the operation */
+ void* userData;
+ unsigned int flags;
+ unsigned int flags2;
+ xmlEncCtxMode mode;
+ xmlSecKeyInfoCtx keyInfoReadCtx;
+ xmlSecKeyInfoCtx keyInfoWriteCtx;
+ xmlSecTransformCtx transformCtx;
+ xmlSecTransformId defEncMethodId;
+
+ /* these data are returned */
+ xmlSecKeyPtr encKey;
+ xmlSecTransformOperation operation;
+ xmlSecBufferPtr result;
+ int resultBase64Encoded;
+ int resultReplaced;
+ xmlSecTransformPtr encMethod;
+
+ /* attributes from EncryptedData or EncryptedKey */
+ xmlChar* id;
+ xmlChar* type;
+ xmlChar* mimeType;
+ xmlChar* encoding;
+ xmlChar* recipient;
+ xmlChar* carriedKeyName;
+
+ /* these are internal data, nobody should change that except us */
+ xmlNodePtr encDataNode;
+ xmlNodePtr encMethodNode;
+ xmlNodePtr keyInfoNode;
+ xmlNodePtr cipherValueNode;
+
+ xmlNodePtr replacedNodeList; /* the pointer to the replaced node */
+ void* reserved1; /* reserved for future */
+};
+
+XMLSEC_EXPORT xmlSecEncCtxPtr xmlSecEncCtxCreate (xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecEncCtxDestroy (xmlSecEncCtxPtr encCtx);
+XMLSEC_EXPORT int xmlSecEncCtxInitialize (xmlSecEncCtxPtr encCtx,
+ xmlSecKeysMngrPtr keysMngr);
+XMLSEC_EXPORT void xmlSecEncCtxFinalize (xmlSecEncCtxPtr encCtx);
+XMLSEC_EXPORT int xmlSecEncCtxCopyUserPref (xmlSecEncCtxPtr dst,
+ xmlSecEncCtxPtr src);
+XMLSEC_EXPORT void xmlSecEncCtxReset (xmlSecEncCtxPtr encCtx);
+XMLSEC_EXPORT int xmlSecEncCtxBinaryEncrypt (xmlSecEncCtxPtr encCtx,
+ xmlNodePtr tmpl,
+ const xmlSecByte* data,
+ xmlSecSize dataSize);
+XMLSEC_EXPORT int xmlSecEncCtxXmlEncrypt (xmlSecEncCtxPtr encCtx,
+ xmlNodePtr tmpl,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecEncCtxUriEncrypt (xmlSecEncCtxPtr encCtx,
+ xmlNodePtr tmpl,
+ const xmlChar *uri);
+XMLSEC_EXPORT int xmlSecEncCtxDecrypt (xmlSecEncCtxPtr encCtx,
+ xmlNodePtr node);
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecEncCtxDecryptToBuffer (xmlSecEncCtxPtr encCtx,
+ xmlNodePtr node );
+XMLSEC_EXPORT void xmlSecEncCtxDebugDump (xmlSecEncCtxPtr encCtx,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecEncCtxDebugXmlDump (xmlSecEncCtxPtr encCtx,
+ FILE* output);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XMLSEC_NO_XMLENC */
+
+#endif /* __XMLSEC_XMLENC_H__ */
+
diff --git a/include/xmlsec/xmlsec.h b/include/xmlsec/xmlsec.h
new file mode 100644
index 00000000..ad44918b
--- /dev/null
+++ b/include/xmlsec/xmlsec.h
@@ -0,0 +1,216 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * General functions and forward declarations.
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_H__
+#define __XMLSEC_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/tree.h>
+
+#include <xmlsec/version.h>
+#include <xmlsec/exports.h>
+#include <xmlsec/strings.h>
+
+/***********************************************************************
+ *
+ * Basic types to make ports to exotic platforms easier
+ *
+ ***********************************************************************/
+/**
+ * xmlSecPtr:
+ *
+ * Void pointer.
+ */
+typedef void* xmlSecPtr;
+
+/**
+ * xmlSecSize:
+ *
+ * Size of something. Should be typedef instead of define
+ * but it will break ABI (todo).
+ */
+#ifdef XMLSEC_NO_SIZE_T
+#define xmlSecSize unsigned int
+#else /* XMLSEC_NO_SIZE_T */
+#define xmlSecSize size_t
+#endif /* XMLSEC_NO_SIZE_T */
+
+/**
+ * XMLSEC_SIZE_BAD_CAST:
+ * @val: the value to cast
+ *
+ * Bad cast to xmlSecSize
+ */
+#define XMLSEC_SIZE_BAD_CAST(val) ((xmlSecSize)(val))
+
+/**
+ * xmlSecByte:
+ *
+ * One byte. Should be typedef instead of define
+ * but it will break ABI (todo).
+ */
+#define xmlSecByte unsigned char
+
+/***********************************************************************
+ *
+ * Forward declarations
+ *
+ ***********************************************************************/
+typedef struct _xmlSecKeyData xmlSecKeyData, *xmlSecKeyDataPtr;
+typedef struct _xmlSecKeyDataStore xmlSecKeyDataStore, *xmlSecKeyDataStorePtr;
+typedef struct _xmlSecKeyInfoCtx xmlSecKeyInfoCtx, *xmlSecKeyInfoCtxPtr;
+typedef struct _xmlSecKey xmlSecKey, *xmlSecKeyPtr;
+typedef struct _xmlSecKeyStore xmlSecKeyStore, *xmlSecKeyStorePtr;
+typedef struct _xmlSecKeysMngr xmlSecKeysMngr, *xmlSecKeysMngrPtr;
+typedef struct _xmlSecTransform xmlSecTransform, *xmlSecTransformPtr;
+typedef struct _xmlSecTransformCtx xmlSecTransformCtx, *xmlSecTransformCtxPtr;
+
+#ifndef XMLSEC_NO_XMLDSIG
+typedef struct _xmlSecDSigCtx xmlSecDSigCtx, *xmlSecDSigCtxPtr;
+#endif /* XMLSEC_NO_XMLDSIG */
+
+#ifndef XMLSEC_NO_XMLENC
+typedef struct _xmlSecEncCtx xmlSecEncCtx, *xmlSecEncCtxPtr;
+#endif /* XMLSEC_NO_XMLENC */
+
+#ifndef XMLSEC_NO_XKMS
+typedef struct _xmlSecXkmsServerCtx xmlSecXkmsServerCtx, *xmlSecXkmsServerCtxPtr;
+#endif /* XMLSEC_NO_XKMS */
+
+XMLSEC_EXPORT int xmlSecInit (void);
+XMLSEC_EXPORT int xmlSecShutdown (void);
+
+
+
+/***********************************************************************
+ *
+ * Version checking
+ *
+ ***********************************************************************/
+/**
+ * xmlSecCheckVersionExact:
+ *
+ * Macro. Returns 1 if the loaded xmlsec library version exactly matches
+ * the one used to compile the caller, 0 if it does not or a negative
+ * value if an error occurs.
+ */
+#define xmlSecCheckVersionExact() \
+ xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR, XMLSEC_VERSION_SUBMINOR, xmlSecCheckVersionExactMatch)
+
+/**
+ * xmlSecCheckVersion:
+ *
+ * Macro. Returns 1 if the loaded xmlsec library version ABI compatible with
+ * the one used to compile the caller, 0 if it does not or a negative
+ * value if an error occurs.
+ */
+#define xmlSecCheckVersion() \
+ xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR, XMLSEC_VERSION_SUBMINOR, xmlSecCheckVersionABICompatible)
+
+/**
+ * xmlSecCheckVersionMode:
+ * @xmlSecCheckVersionExactMatch: the version should match exactly.
+ * @xmlSecCheckVersionABICompatible: the version should be ABI compatible.
+ *
+ * The xmlsec library version mode.
+ */
+typedef enum {
+ xmlSecCheckVersionExactMatch = 0,
+ xmlSecCheckVersionABICompatible
+} xmlSecCheckVersionMode;
+
+XMLSEC_EXPORT int xmlSecCheckVersionExt (int major,
+ int minor,
+ int subminor,
+ xmlSecCheckVersionMode mode);
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+/***********************************************************************
+ *
+ * Helpers to convert from void* to function pointer, this silence
+ * gcc warning
+ *
+ * warning: ISO C forbids conversion of object pointer to function
+ * pointer type
+ *
+ * The workaround is to declare a union that does the conversion. This is
+ * guaranteed (ISO/IEC 9899:1990 "C89"/"C90") to match exactly.
+ *
+ ***********************************************************************/
+
+/**
+ * XMLSEC_PTR_TO_FUNC_IMPL:
+ * @func_type: the function type.
+ *
+ * Macro declares helper functions to convert between "void *" pointer and
+ * function pointer.
+ */
+#define XMLSEC_PTR_TO_FUNC_IMPL(func_type) \
+ union xmlSecPtrToFuncUnion_ ##func_type { \
+ void *ptr; \
+ func_type * func; \
+ } ; \
+ static func_type * xmlSecPtrToFunc_ ##func_type(void * ptr) { \
+ union xmlSecPtrToFuncUnion_ ##func_type x; \
+ x.ptr = ptr; \
+ return (x.func); \
+ } \
+ static void * xmlSecFuncToPtr_ ##func_type(func_type * func) { \
+ union xmlSecPtrToFuncUnion_ ##func_type x; \
+ x.func = func; \
+ return (x.ptr); \
+ }
+
+/**
+ * XMLSEC_PTR_TO_FUNC:
+ * @func_type: the function type.
+ * @ptr: the "void*" pointer to be converted.
+ *
+ * Macro converts from "void*" pointer to "func_type" function pointer.
+ */
+#define XMLSEC_PTR_TO_FUNC(func_type, ptr) \
+ xmlSecPtrToFunc_ ##func_type((ptr))
+
+/**
+ * XMLSEC_FUNC_TO_PTR:
+ * @func_type: the function type.
+ * @func: the "func_type" function pointer to be converted.
+ *
+ * Macro converts from "func_type" function pointer to "void*" pointer.
+ */
+#define XMLSEC_FUNC_TO_PTR(func_type, func) \
+ xmlSecFuncToPtr_ ##func_type((func))
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_H__ */
+
+
diff --git a/include/xmlsec/xmltree.h b/include/xmlsec/xmltree.h
new file mode 100644
index 00000000..c75e51eb
--- /dev/null
+++ b/include/xmlsec/xmltree.h
@@ -0,0 +1,275 @@
+/**
+ * XML Security Library (http://www.aleksey.com/xmlsec).
+ *
+ * Common XML utility functions
+ *
+ * This is free software; see Copyright file in the source
+ * distribution for preciese wording.
+ *
+ * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XMLSEC_TREE_H__
+#define __XMLSEC_TREE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <stdio.h>
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <xmlsec/xmlsec.h>
+
+/**
+ * xmlSecNodeGetName:
+ * @node: the pointer to node.
+ *
+ * Macro. Returns node's name.
+ */
+#define xmlSecNodeGetName(node) \
+ (((node)) ? ((const char*)((node)->name)) : NULL)
+
+XMLSEC_EXPORT const xmlChar* xmlSecGetNodeNsHref (const xmlNodePtr cur);
+XMLSEC_EXPORT int xmlSecCheckNodeName (const xmlNodePtr cur,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLSEC_EXPORT xmlNodePtr xmlSecGetNextElementNode(xmlNodePtr cur);
+XMLSEC_EXPORT xmlNodePtr xmlSecFindChild (const xmlNodePtr parent,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLSEC_EXPORT xmlNodePtr xmlSecFindParent (const xmlNodePtr cur,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLSEC_EXPORT xmlNodePtr xmlSecFindNode (const xmlNodePtr parent,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLSEC_EXPORT xmlNodePtr xmlSecAddChild (xmlNodePtr parent,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLSEC_EXPORT xmlNodePtr xmlSecAddChildNode (xmlNodePtr parent,
+ xmlNodePtr child);
+XMLSEC_EXPORT xmlNodePtr xmlSecAddNextSibling (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLSEC_EXPORT xmlNodePtr xmlSecAddPrevSibling (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *ns);
+
+XMLSEC_EXPORT int xmlSecReplaceNode (xmlNodePtr node,
+ xmlNodePtr newNode);
+XMLSEC_EXPORT int xmlSecReplaceNodeAndReturn
+ (xmlNodePtr node,
+ xmlNodePtr newNode,
+ xmlNodePtr* replaced);
+XMLSEC_EXPORT int xmlSecReplaceContent (xmlNodePtr node,
+ xmlNodePtr newNode);
+XMLSEC_EXPORT int xmlSecReplaceContentAndReturn
+ (xmlNodePtr node,
+ xmlNodePtr newNode,
+ xmlNodePtr* replaced);
+XMLSEC_EXPORT int xmlSecReplaceNodeBuffer (xmlNodePtr node,
+ const xmlSecByte *buffer,
+ xmlSecSize size);
+XMLSEC_EXPORT int xmlSecReplaceNodeBufferAndReturn
+ (xmlNodePtr node,
+ const xmlSecByte *buffer,
+ xmlSecSize size,
+ xmlNodePtr* replaced);
+XMLSEC_EXPORT int xmlSecNodeEncodeAndSetContent
+ (xmlNodePtr node,
+ const xmlChar *buffer);
+XMLSEC_EXPORT void xmlSecAddIDs (xmlDocPtr doc,
+ xmlNodePtr cur,
+ const xmlChar** ids);
+XMLSEC_EXPORT int xmlSecGenerateAndAddID (xmlNodePtr node,
+ const xmlChar* attrName,
+ const xmlChar* prefix,
+ xmlSecSize len);
+XMLSEC_EXPORT xmlChar* xmlSecGenerateID (const xmlChar* prefix,
+ xmlSecSize len);
+
+XMLSEC_EXPORT xmlDocPtr xmlSecCreateTree (const xmlChar* rootNodeName,
+ const xmlChar* rootNodeNs);
+XMLSEC_EXPORT int xmlSecIsEmptyNode (xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecIsEmptyString (const xmlChar* str);
+XMLSEC_EXPORT xmlChar* xmlSecGetQName (xmlNodePtr node,
+ const xmlChar* href,
+ const xmlChar* local);
+
+
+XMLSEC_EXPORT int xmlSecPrintXmlString (FILE * fd,
+ const xmlChar * str);
+
+/**
+ * xmlSecIsHex:
+ * @c: the character.
+ *
+ * Macro. Returns 1 if @c is a hex digit or 0 other wise.
+ */
+#define xmlSecIsHex(c) \
+ (( (('0' <= (c)) && ((c) <= '9')) || \
+ (('a' <= (c)) && ((c) <= 'f')) || \
+ (('A' <= (c)) && ((c) <= 'F')) ) ? 1 : 0)
+
+/**
+ * xmlSecGetHex:
+ * @c: the character,
+ *
+ * Macro. Returns the hex value of the @c.
+ */
+#define xmlSecGetHex(c) \
+ ( (('0' <= (c)) && ((c) <= '9')) ? (c) - '0' : \
+ ( (('a' <= (c)) && ((c) <= 'f')) ? (c) - 'a' + 10 : \
+ ( (('A' <= (c)) && ((c) <= 'F')) ? (c) - 'A' + 10 : 0 )))
+
+/*************************************************************************
+ *
+ * QName <-> Integer mapping
+ *
+ ************************************************************************/
+
+/**
+ * xmlSecQName2IntegerInfo:
+ * @qnameHref: the QName href
+ * @qnameLocalPart: the QName local
+ * @intValue: the integer value
+ *
+ * QName <-> Integer conversion definition.
+ */
+typedef struct _xmlSecQName2IntegerInfo xmlSecQName2IntegerInfo, *xmlSecQName2IntegerInfoPtr;
+struct _xmlSecQName2IntegerInfo {
+ const xmlChar* qnameHref;
+ const xmlChar* qnameLocalPart;
+ int intValue;
+};
+
+/**
+ * xmlSecQName2IntegerInfoConstPtr:
+ *
+ * Pointer to constant QName <-> Integer conversion definition.
+ */
+typedef const xmlSecQName2IntegerInfo * xmlSecQName2IntegerInfoConstPtr;
+
+XMLSEC_EXPORT xmlSecQName2IntegerInfoConstPtr xmlSecQName2IntegerGetInfo
+ (xmlSecQName2IntegerInfoConstPtr info,
+ int intValue);
+XMLSEC_EXPORT int xmlSecQName2IntegerGetInteger (xmlSecQName2IntegerInfoConstPtr info,
+ const xmlChar* qnameHref,
+ const xmlChar* qnameLocalPart,
+ int* intValue);
+XMLSEC_EXPORT int xmlSecQName2IntegerGetIntegerFromString
+ (xmlSecQName2IntegerInfoConstPtr info,
+ xmlNodePtr node,
+ const xmlChar* qname,
+ int* intValue);
+XMLSEC_EXPORT xmlChar* xmlSecQName2IntegerGetStringFromInteger
+ (xmlSecQName2IntegerInfoConstPtr info,
+ xmlNodePtr node,
+ int intValue);
+XMLSEC_EXPORT int xmlSecQName2IntegerNodeRead (xmlSecQName2IntegerInfoConstPtr info,
+ xmlNodePtr node,
+ int* intValue);
+XMLSEC_EXPORT int xmlSecQName2IntegerNodeWrite (xmlSecQName2IntegerInfoConstPtr info,
+ xmlNodePtr node,
+ const xmlChar* nodeName,
+ const xmlChar* nodeNs,
+ int intValue);
+XMLSEC_EXPORT int xmlSecQName2IntegerAttributeRead(xmlSecQName2IntegerInfoConstPtr info,
+ xmlNodePtr node,
+ const xmlChar* attrName,
+ int* intValue);
+XMLSEC_EXPORT int xmlSecQName2IntegerAttributeWrite(xmlSecQName2IntegerInfoConstPtr info,
+ xmlNodePtr node,
+ const xmlChar* attrName,
+ int intValue);
+XMLSEC_EXPORT void xmlSecQName2IntegerDebugDump (xmlSecQName2IntegerInfoConstPtr info,
+ int intValue,
+ const xmlChar* name,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecQName2IntegerDebugXmlDump(xmlSecQName2IntegerInfoConstPtr info,
+ int intValue,
+ const xmlChar* name,
+ FILE* output);
+
+/*************************************************************************
+ *
+ * QName <-> Bitmask mapping
+ *
+ ************************************************************************/
+
+/**
+ * xmlSecBitMask:
+ *
+ * Bitmask datatype.
+ */
+typedef unsigned int xmlSecBitMask;
+
+/**
+ * xmlSecQName2BitMaskInfo:
+ * @qnameHref: the QName href
+ * @qnameLocalPart: the QName local
+ * @mask: the bitmask value
+ *
+ * QName <-> Bitmask conversion definition.
+ */
+typedef struct _xmlSecQName2BitMaskInfo xmlSecQName2BitMaskInfo, *xmlSecQName2BitMaskInfoPtr;
+
+struct _xmlSecQName2BitMaskInfo {
+ const xmlChar* qnameHref;
+ const xmlChar* qnameLocalPart;
+ xmlSecBitMask mask;
+};
+
+/**
+ * xmlSecQName2BitMaskInfoConstPtr:
+ *
+ * Pointer to constant QName <-> Bitmask conversion definition.
+ */
+typedef const xmlSecQName2BitMaskInfo* xmlSecQName2BitMaskInfoConstPtr;
+
+XMLSEC_EXPORT xmlSecQName2BitMaskInfoConstPtr xmlSecQName2BitMaskGetInfo
+ (xmlSecQName2BitMaskInfoConstPtr info,
+ xmlSecBitMask mask);
+XMLSEC_EXPORT int xmlSecQName2BitMaskGetBitMask (xmlSecQName2BitMaskInfoConstPtr info,
+ const xmlChar* qnameLocalPart,
+ const xmlChar* qnameHref,
+ xmlSecBitMask* mask);
+XMLSEC_EXPORT int xmlSecQName2BitMaskNodesRead (xmlSecQName2BitMaskInfoConstPtr info,
+ xmlNodePtr* node,
+ const xmlChar* nodeName,
+ const xmlChar* nodeNs,
+ int stopOnUnknown,
+ xmlSecBitMask* mask);
+XMLSEC_EXPORT int xmlSecQName2BitMaskGetBitMaskFromString
+ (xmlSecQName2BitMaskInfoConstPtr info,
+ xmlNodePtr node,
+ const xmlChar* qname,
+ xmlSecBitMask* mask);
+XMLSEC_EXPORT xmlChar* xmlSecQName2BitMaskGetStringFromBitMask
+ (xmlSecQName2BitMaskInfoConstPtr info,
+ xmlNodePtr node,
+ xmlSecBitMask mask);
+XMLSEC_EXPORT int xmlSecQName2BitMaskNodesWrite (xmlSecQName2BitMaskInfoConstPtr info,
+ xmlNodePtr node,
+ const xmlChar* nodeName,
+ const xmlChar* nodeNs,
+ xmlSecBitMask mask);
+XMLSEC_EXPORT void xmlSecQName2BitMaskDebugDump (xmlSecQName2BitMaskInfoConstPtr info,
+ xmlSecBitMask mask,
+ const xmlChar* name,
+ FILE* output);
+XMLSEC_EXPORT void xmlSecQName2BitMaskDebugXmlDump(xmlSecQName2BitMaskInfoConstPtr info,
+ xmlSecBitMask mask,
+ const xmlChar* name,
+ FILE* output);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XMLSEC_TREE_H__ */
+