summaryrefslogtreecommitdiff
path: root/include/xmlsec
diff options
context:
space:
mode:
Diffstat (limited to 'include/xmlsec')
-rw-r--r--include/xmlsec/Makefile.in63
-rw-r--r--include/xmlsec/app.h421
-rw-r--r--include/xmlsec/base64.h60
-rw-r--r--include/xmlsec/bn.h120
-rw-r--r--include/xmlsec/buffer.h112
-rw-r--r--include/xmlsec/crypto.h26
-rw-r--r--include/xmlsec/dl.h40
-rw-r--r--include/xmlsec/errors.h264
-rw-r--r--include/xmlsec/exports.h22
-rw-r--r--include/xmlsec/gcrypt/Makefile.am13
-rw-r--r--include/xmlsec/gcrypt/Makefile.in581
-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.am1
-rw-r--r--include/xmlsec/gnutls/Makefile.in60
-rw-r--r--include/xmlsec/gnutls/app.h120
-rw-r--r--include/xmlsec/gnutls/crypto.h387
-rw-r--r--include/xmlsec/gnutls/symbols.h129
-rw-r--r--include/xmlsec/gnutls/x509.h110
-rw-r--r--include/xmlsec/io.h36
-rw-r--r--include/xmlsec/keyinfo.h240
-rw-r--r--include/xmlsec/keys.h258
-rw-r--r--include/xmlsec/keysdata.h690
-rw-r--r--include/xmlsec/keysmngr.h210
-rw-r--r--include/xmlsec/list.h170
-rw-r--r--include/xmlsec/membuf.h18
-rw-r--r--include/xmlsec/mscrypto/Makefile.in59
-rw-r--r--include/xmlsec/mscrypto/app.h166
-rw-r--r--include/xmlsec/mscrypto/certkeys.h28
-rw-r--r--include/xmlsec/mscrypto/crypto.h392
-rw-r--r--include/xmlsec/mscrypto/keysstore.h36
-rw-r--r--include/xmlsec/mscrypto/symbols.h144
-rw-r--r--include/xmlsec/mscrypto/x509.h103
-rw-r--r--include/xmlsec/nodeset.h150
-rw-r--r--include/xmlsec/nss/Makefile.in59
-rw-r--r--include/xmlsec/nss/app.h156
-rw-r--r--include/xmlsec/nss/bignum.h26
-rw-r--r--include/xmlsec/nss/crypto.h350
-rw-r--r--include/xmlsec/nss/keysstore.h32
-rw-r--r--include/xmlsec/nss/pkikeys.h22
-rw-r--r--include/xmlsec/nss/symbols.h129
-rw-r--r--include/xmlsec/nss/x509.h76
-rw-r--r--include/xmlsec/openssl/Makefile.in59
-rw-r--r--include/xmlsec/openssl/app.h164
-rw-r--r--include/xmlsec/openssl/bn.h24
-rw-r--r--include/xmlsec/openssl/crypto.h428
-rw-r--r--include/xmlsec/openssl/evp.h18
-rw-r--r--include/xmlsec/openssl/symbols.h171
-rw-r--r--include/xmlsec/openssl/x509.h90
-rw-r--r--include/xmlsec/parser.h34
-rw-r--r--include/xmlsec/private.h540
-rw-r--r--include/xmlsec/private/Makefile.am1
-rw-r--r--include/xmlsec/private/Makefile.in60
-rw-r--r--include/xmlsec/private/xkms.h108
-rw-r--r--include/xmlsec/private/xslt.h34
-rw-r--r--include/xmlsec/skeleton/app.h120
-rw-r--r--include/xmlsec/skeleton/crypto.h24
-rw-r--r--include/xmlsec/skeleton/symbols.h162
-rw-r--r--include/xmlsec/soap.h158
-rw-r--r--include/xmlsec/strings.h45
-rw-r--r--include/xmlsec/templates.h192
-rw-r--r--include/xmlsec/transforms.h933
-rw-r--r--include/xmlsec/version.h14
-rw-r--r--include/xmlsec/version.h.in8
-rw-r--r--include/xmlsec/x509.h36
-rw-r--r--include/xmlsec/xkms.h518
-rw-r--r--include/xmlsec/xmldsig.h282
-rw-r--r--include/xmlsec/xmlenc.h208
-rw-r--r--include/xmlsec/xmlsec.h129
-rw-r--r--include/xmlsec/xmltree.h336
71 files changed, 7118 insertions, 4517 deletions
diff --git a/include/xmlsec/Makefile.in b/include/xmlsec/Makefile.in
index 3e9f0d9e..f6783245 100644
--- a/include/xmlsec/Makefile.in
+++ b/include/xmlsec/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -38,13 +38,22 @@ 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)/configure.in
+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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = version.h
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -75,6 +84,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(xmlsecincdir)"
HEADERS = $(xmlsecinc_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@@ -113,6 +128,7 @@ am__relativize = \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -127,6 +143,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -135,6 +152,10 @@ 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@
@@ -165,6 +186,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
@@ -196,8 +218,10 @@ 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_ENABLED = @PKG_CONFIG_ENABLED@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
@@ -205,7 +229,6 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
-U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
@@ -224,6 +247,8 @@ 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@
@@ -233,6 +258,7 @@ 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@
@@ -268,6 +294,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -300,7 +327,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -410,9 +436,7 @@ 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
+ dir='$(DESTDIR)$(xmlsecincdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -421,7 +445,7 @@ uninstall-xmlsecincHEADERS:
# (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):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -446,7 +470,7 @@ $(RECURSIVE_TARGETS):
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -625,10 +649,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/include/xmlsec/app.h b/include/xmlsec/app.h
index d9583923..5fe572a0 100644
--- a/include/xmlsec/app.h
+++ b/include/xmlsec/app.h
@@ -1,14 +1,14 @@
-/**
+/**
* 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__
+#define __XMLSEC_APP_H__
#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
@@ -18,7 +18,7 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <libxml/xmlIO.h>
@@ -35,9 +35,9 @@ extern "C" {
* Crypto Init/shutdown
*
*********************************************************************/
-XMLSEC_EXPORT int xmlSecCryptoInit (void);
-XMLSEC_EXPORT int xmlSecCryptoShutdown (void);
-XMLSEC_EXPORT int xmlSecCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_EXPORT int xmlSecCryptoInit (void);
+XMLSEC_EXPORT int xmlSecCryptoShutdown (void);
+XMLSEC_EXPORT int xmlSecCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr);
/*********************************************************************
*
@@ -46,60 +46,67 @@ XMLSEC_EXPORT int xmlSecCryptoKeysMngrInit (xmlSecKeysMngrPtr mngr);
********************************************************************/
/**
* xmlSecKeyDataAesId:
- *
+ *
* The AES key klass.
*/
-#define xmlSecKeyDataAesId xmlSecKeyDataAesGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataAesGetKlass (void);
+#define xmlSecKeyDataAesId xmlSecKeyDataAesGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataAesGetKlass (void);
/**
* xmlSecKeyDataDesId:
- *
+ *
* The DES key klass.
*/
-#define xmlSecKeyDataDesId xmlSecKeyDataDesGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDesGetKlass (void);
+#define xmlSecKeyDataDesId xmlSecKeyDataDesGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDesGetKlass (void);
/**
* xmlSecKeyDataDsaId:
- *
+ *
* The DSA key klass.
*/
-#define xmlSecKeyDataDsaId xmlSecKeyDataDsaGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDsaGetKlass (void);
-/**
+#define xmlSecKeyDataDsaId xmlSecKeyDataDsaGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataDsaGetKlass (void);
+/**
+ * xmlSecKeyDataEcdsaId:
+ *
+ * The ECDSA key klass.
+ */
+#define xmlSecKeyDataEcdsaId xmlSecKeyDataEcdsaGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataEcdsaGetKlass (void);
+/**
* xmlSecKeyDataGost2001Id:
- *
+ *
* The GOST2001 key klass.
*/
-#define xmlSecKeyDataGost2001Id xmlSecKeyDataGost2001GetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataGost2001GetKlass (void);
-/**
+#define xmlSecKeyDataGost2001Id xmlSecKeyDataGost2001GetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataGost2001GetKlass (void);
+/**
* xmlSecKeyDataHmacId:
- *
+ *
* The DHMAC key klass.
*/
-#define xmlSecKeyDataHmacId xmlSecKeyDataHmacGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataHmacGetKlass (void);
+#define xmlSecKeyDataHmacId xmlSecKeyDataHmacGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataHmacGetKlass (void);
/**
* xmlSecKeyDataRsaId:
- *
+ *
* The RSA key klass.
*/
-#define xmlSecKeyDataRsaId xmlSecKeyDataRsaGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRsaGetKlass (void);
+#define xmlSecKeyDataRsaId xmlSecKeyDataRsaGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRsaGetKlass (void);
/**
* xmlSecKeyDataX509Id:
- *
+ *
* The X509 data klass.
*/
-#define xmlSecKeyDataX509Id xmlSecKeyDataX509GetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataX509GetKlass (void);
+#define xmlSecKeyDataX509Id xmlSecKeyDataX509GetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataX509GetKlass (void);
/**
* xmlSecKeyDataRawX509CertId:
- *
+ *
* The raw X509 certificate klass.
*/
-#define xmlSecKeyDataRawX509CertId xmlSecKeyDataRawX509CertGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRawX509CertGetKlass(void);
+#define xmlSecKeyDataRawX509CertId xmlSecKeyDataRawX509CertGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRawX509CertGetKlass(void);
/*********************************************************************
*
@@ -108,11 +115,11 @@ XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRawX509CertGetKlass(void);
********************************************************************/
/**
* xmlSecX509StoreId:
- *
+ *
* The X509 store klass.
*/
-#define xmlSecX509StoreId xmlSecX509StoreGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataStoreId xmlSecX509StoreGetKlass (void);
+#define xmlSecX509StoreId xmlSecX509StoreGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataStoreId xmlSecX509StoreGetKlass (void);
/*********************************************************************
*
@@ -121,298 +128,340 @@ XMLSEC_EXPORT xmlSecKeyDataStoreId xmlSecX509StoreGetKlass (void);
********************************************************************/
/**
* xmlSecTransformAes128CbcId:
- *
+ *
* The AES128 CBC cipher transform klass.
*/
-#define xmlSecTransformAes128CbcId xmlSecTransformAes128CbcGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes128CbcGetKlass(void);
+#define xmlSecTransformAes128CbcId xmlSecTransformAes128CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes128CbcGetKlass(void);
/**
* xmlSecTransformAes192CbcId:
- *
+ *
* The AES192 CBC cipher transform klass.
*/
-#define xmlSecTransformAes192CbcId xmlSecTransformAes192CbcGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes192CbcGetKlass(void);
+#define xmlSecTransformAes192CbcId xmlSecTransformAes192CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes192CbcGetKlass(void);
/**
* xmlSecTransformAes256CbcId:
- *
+ *
* The AES256 CBC cipher transform klass.
*/
-#define xmlSecTransformAes256CbcId xmlSecTransformAes256CbcGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes256CbcGetKlass(void);
+#define xmlSecTransformAes256CbcId xmlSecTransformAes256CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformAes256CbcGetKlass(void);
/**
* xmlSecTransformKWAes128Id:
- *
+ *
* The AES 128 key wrap transform klass.
*/
-#define xmlSecTransformKWAes128Id xmlSecTransformKWAes128GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes128GetKlass (void);
+#define xmlSecTransformKWAes128Id xmlSecTransformKWAes128GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes128GetKlass (void);
/**
* xmlSecTransformKWAes192Id:
- *
+ *
* The AES 192 key wrap transform klass.
*/
-#define xmlSecTransformKWAes192Id xmlSecTransformKWAes192GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes192GetKlass (void);
+#define xmlSecTransformKWAes192Id xmlSecTransformKWAes192GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes192GetKlass (void);
/**
* xmlSecTransformKWAes256Id:
- *
+ *
* The AES 256 key wrap transform klass.
*/
-#define xmlSecTransformKWAes256Id xmlSecTransformKWAes256GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes256GetKlass (void);
+#define xmlSecTransformKWAes256Id xmlSecTransformKWAes256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWAes256GetKlass (void);
/**
* xmlSecTransformDes3CbcId:
- *
+ *
* The Triple DES encryption transform klass.
*/
-#define xmlSecTransformDes3CbcId xmlSecTransformDes3CbcGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDes3CbcGetKlass (void);
+#define xmlSecTransformDes3CbcId xmlSecTransformDes3CbcGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDes3CbcGetKlass (void);
/**
* xmlSecTransformKWDes3Id:
- *
+ *
* The DES3 CBC cipher transform klass.
*/
-#define xmlSecTransformKWDes3Id xmlSecTransformKWDes3GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWDes3GetKlass (void);
+#define xmlSecTransformKWDes3Id xmlSecTransformKWDes3GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformKWDes3GetKlass (void);
/**
* xmlSecTransformDsaSha1Id:
- *
+ *
* The DSA-SHA1 signature transform klass.
*/
-#define xmlSecTransformDsaSha1Id xmlSecTransformDsaSha1GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDsaSha1GetKlass (void);
+#define xmlSecTransformDsaSha1Id xmlSecTransformDsaSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDsaSha1GetKlass (void);
+/**
+ * xmlSecTransformDsaSha256Id:
+ *
+ * The DSA-SHA256 signature transform klass.
+ */
+#define xmlSecTransformDsaSha256Id xmlSecTransformDsaSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformDsaSha256GetKlass (void);
+/**
+ * xmlSecTransformEcdsaSha1Id:
+ *
+ * The ECDSA-SHA1 signature transform klass.
+ */
+#define xmlSecTransformEcdsaSha1Id xmlSecTransformEcdsaSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEcdsaSha1GetKlass (void);
+/**
+ * xmlSecTransformEcdsaSha224Id:
+ *
+ * The ECDSA-SHA224 signature transform klass.
+ */
+#define xmlSecTransformEcdsaSha224Id xmlSecTransformEcdsaSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEcdsaSha224GetKlass (void);
+/**
+ * xmlSecTransformEcdsaSha256Id:
+ *
+ * The ECDSA-SHA256 signature transform klass.
+ */
+#define xmlSecTransformEcdsaSha256Id xmlSecTransformEcdsaSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEcdsaSha256GetKlass (void);
+/**
+ * xmlSecTransformEcdsaSha384Id:
+ *
+ * The ECDS-SHA384 signature transform klass.
+ */
+#define xmlSecTransformEcdsaSha384Id xmlSecTransformEcdsaSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEcdsaSha384GetKlass (void);
+/**
+ * xmlSecTransformEcdsaSha512Id:
+ *
+ * The ECDSA-SHA512 signature transform klass.
+ */
+#define xmlSecTransformEcdsaSha512Id xmlSecTransformEcdsaSha512GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEcdsaSha512GetKlass (void);
/**
* xmlSecTransformGost2001GostR3411_94Id:
- *
+ *
* The GOST2001-GOSTR3411_94 signature transform klass.
*/
-#define xmlSecTransformGost2001GostR3411_94Id xmlSecTransformGost2001GostR3411_94GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformGost2001GostR3411_94GetKlass (void);
+#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);
+#define xmlSecTransformHmacMd5Id xmlSecTransformHmacMd5GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacMd5GetKlass (void);
/**
* xmlSecTransformHmacRipemd160Id:
- *
+ *
* The HMAC with RipeMD160 signature transform klass.
*/
-#define xmlSecTransformHmacRipemd160Id xmlSecTransformHmacRipemd160GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacRipemd160GetKlass(void);
+#define xmlSecTransformHmacRipemd160Id xmlSecTransformHmacRipemd160GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacRipemd160GetKlass(void);
/**
* xmlSecTransformHmacSha1Id:
- *
+ *
* The HMAC with SHA1 signature transform klass.
*/
-#define xmlSecTransformHmacSha1Id xmlSecTransformHmacSha1GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha1GetKlass (void);
+#define xmlSecTransformHmacSha1Id xmlSecTransformHmacSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha1GetKlass (void);
/**
* xmlSecTransformHmacSha224Id:
- *
+ *
* The HMAC with SHA224 signature transform klass.
*/
-#define xmlSecTransformHmacSha224Id xmlSecTransformHmacSha224GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha224GetKlass (void);
+#define xmlSecTransformHmacSha224Id xmlSecTransformHmacSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha224GetKlass (void);
/**
* xmlSecTransformHmacSha256Id:
- *
+ *
* The HMAC with SHA256 signature transform klass.
*/
-#define xmlSecTransformHmacSha256Id xmlSecTransformHmacSha256GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha256GetKlass (void);
+#define xmlSecTransformHmacSha256Id xmlSecTransformHmacSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha256GetKlass (void);
/**
* xmlSecTransformHmacSha384Id:
- *
+ *
* The HMAC with SHA384 signature transform klass.
*/
-#define xmlSecTransformHmacSha384Id xmlSecTransformHmacSha384GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha384GetKlass (void);
+#define xmlSecTransformHmacSha384Id xmlSecTransformHmacSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha384GetKlass (void);
/**
* xmlSecTransformHmacSha512Id:
- *
+ *
* The HMAC with SHA512 signature transform klass.
*/
-#define xmlSecTransformHmacSha512Id xmlSecTransformHmacSha512GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha512GetKlass (void);
+#define xmlSecTransformHmacSha512Id xmlSecTransformHmacSha512GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformHmacSha512GetKlass (void);
/**
* xmlSecTransformMd5Id:
- *
+ *
* The MD5 digest transform klass.
*/
-#define xmlSecTransformMd5Id xmlSecTransformMd5GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMd5GetKlass(void);
+#define xmlSecTransformMd5Id xmlSecTransformMd5GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMd5GetKlass(void);
/**
* xmlSecTransformRipemd160Id:
- *
+ *
* The RIPEMD160 digest transform klass.
*/
-#define xmlSecTransformRipemd160Id xmlSecTransformRipemd160GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRipemd160GetKlass(void);
+#define xmlSecTransformRipemd160Id xmlSecTransformRipemd160GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRipemd160GetKlass(void);
/**
* xmlSecTransformRsaMd5Id:
- *
+ *
* The RSA-MD5 signature transform klass.
*/
-#define xmlSecTransformRsaMd5Id xmlSecTransformRsaMd5GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaMd5GetKlass (void);
+#define xmlSecTransformRsaMd5Id xmlSecTransformRsaMd5GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaMd5GetKlass (void);
/**
* xmlSecTransformRsaRipemd160Id:
- *
+ *
* The RSA-RIPEMD160 signature transform klass.
*/
-#define xmlSecTransformRsaRipemd160Id xmlSecTransformRsaRipemd160GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaRipemd160GetKlass (void);
+#define xmlSecTransformRsaRipemd160Id xmlSecTransformRsaRipemd160GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaRipemd160GetKlass (void);
/**
* xmlSecTransformRsaSha1Id:
- *
+ *
* The RSA-SHA1 signature transform klass.
*/
-#define xmlSecTransformRsaSha1Id xmlSecTransformRsaSha1GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha1GetKlass (void);
+#define xmlSecTransformRsaSha1Id xmlSecTransformRsaSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha1GetKlass (void);
/**
* xmlSecTransformRsaSha224Id:
- *
+ *
* The RSA-SHA224 signature transform klass.
*/
-#define xmlSecTransformRsaSha224Id xmlSecTransformRsaSha224GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha224GetKlass (void);
+#define xmlSecTransformRsaSha224Id xmlSecTransformRsaSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha224GetKlass (void);
/**
* xmlSecTransformRsaSha256Id:
- *
+ *
* The RSA-SHA256 signature transform klass.
*/
-#define xmlSecTransformRsaSha256Id xmlSecTransformRsaSha256GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha256GetKlass (void);
+#define xmlSecTransformRsaSha256Id xmlSecTransformRsaSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha256GetKlass (void);
/**
* xmlSecTransformRsaSha384Id:
- *
+ *
* The RSA-SHA384 signature transform klass.
*/
-#define xmlSecTransformRsaSha384Id xmlSecTransformRsaSha384GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha384GetKlass (void);
+#define xmlSecTransformRsaSha384Id xmlSecTransformRsaSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha384GetKlass (void);
/**
* xmlSecTransformRsaSha512Id:
- *
+ *
* The RSA-SHA512 signature transform klass.
*/
-#define xmlSecTransformRsaSha512Id xmlSecTransformRsaSha512GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha512GetKlass (void);
+#define xmlSecTransformRsaSha512Id xmlSecTransformRsaSha512GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaSha512GetKlass (void);
/**
* xmlSecTransformRsaPkcs1Id:
- *
+ *
* The RSA PKCS1 key transport transform klass.
*/
-#define xmlSecTransformRsaPkcs1Id xmlSecTransformRsaPkcs1GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaPkcs1GetKlass (void);
+#define xmlSecTransformRsaPkcs1Id xmlSecTransformRsaPkcs1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaPkcs1GetKlass (void);
/**
* xmlSecTransformRsaOaepId:
- *
+ *
* The RSA PKCS1 key transport transform klass.
*/
-#define xmlSecTransformRsaOaepId xmlSecTransformRsaOaepGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRsaOaepGetKlass (void);
+#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);
+#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);
+#define xmlSecTransformSha1Id xmlSecTransformSha1GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha1GetKlass (void);
/**
* xmlSecTransformSha224Id:
- *
+ *
* The SHA224 digest transform klass.
*/
-#define xmlSecTransformSha224Id xmlSecTransformSha224GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha224GetKlass (void);
+#define xmlSecTransformSha224Id xmlSecTransformSha224GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha224GetKlass (void);
/**
* xmlSecTransformSha256Id:
- *
+ *
* The SHA256 digest transform klass.
*/
-#define xmlSecTransformSha256Id xmlSecTransformSha256GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha256GetKlass (void);
+#define xmlSecTransformSha256Id xmlSecTransformSha256GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha256GetKlass (void);
/**
* xmlSecTransformSha384Id:
- *
+ *
* The SHA384 digest transform klass.
*/
-#define xmlSecTransformSha384Id xmlSecTransformSha384GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha384GetKlass (void);
+#define xmlSecTransformSha384Id xmlSecTransformSha384GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha384GetKlass (void);
/**
* xmlSecTransformSha512Id:
- *
+ *
* The SHA512 digest transform klass.
*/
-#define xmlSecTransformSha512Id xmlSecTransformSha512GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformSha512GetKlass (void);
+#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);
+ ********************************************************************/
+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
}
diff --git a/include/xmlsec/base64.h b/include/xmlsec/base64.h
index 93c472a8..28d8fbc4 100644
--- a/include/xmlsec/base64.h
+++ b/include/xmlsec/base64.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_BASE64_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -25,39 +25,39 @@ extern "C" {
*
* The default maximum base64 encoded line size.
*/
-#define XMLSEC_BASE64_LINESIZE 64
+#define XMLSEC_BASE64_LINESIZE 64
-XMLSEC_EXPORT int xmlSecBase64GetDefaultLineSize (void);
-XMLSEC_EXPORT void xmlSecBase64SetDefaultLineSize (int columns);
+XMLSEC_EXPORT int xmlSecBase64GetDefaultLineSize (void);
+XMLSEC_EXPORT void xmlSecBase64SetDefaultLineSize (int columns);
/* Base64 Context */
-typedef struct _xmlSecBase64Ctx xmlSecBase64Ctx,
- *xmlSecBase64CtxPtr;
+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);
+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);
+XMLSEC_EXPORT xmlChar* xmlSecBase64Encode (const xmlSecByte *buf,
+ xmlSecSize len,
+ int columns);
+XMLSEC_EXPORT int xmlSecBase64Decode (const xmlChar* str,
+ xmlSecByte *buf,
+ xmlSecSize len);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/bn.h b/include/xmlsec/bn.h
index 418dc1fe..65138ed4 100644
--- a/include/xmlsec/bn.h
+++ b/include/xmlsec/bn.h
@@ -1,32 +1,32 @@
-/**
+/**
* 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__
+#define __XMLSEC_BN_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h>
-typedef xmlSecBuffer xmlSecBn,
- *xmlSecBnPtr;
+typedef xmlSecBuffer xmlSecBn,
+ *xmlSecBnPtr;
/**
* xmlSecBnFormat:
- * @xmlSecBnBase64: the base64 decoded binary blob.
- * @xmlSecBnHex: the hex number.
- * @xmlSecBnDec: the decimal number.
+ * @xmlSecBnBase64: the base64 decoded binary blob.
+ * @xmlSecBnHex: the hex number.
+ * @xmlSecBnDec: the decimal number.
*
* The big numbers formats.
*/
@@ -36,60 +36,60 @@ typedef enum {
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 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 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 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);
+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
}
diff --git a/include/xmlsec/buffer.h b/include/xmlsec/buffer.h
index 8495903a..2791a97b 100644
--- a/include/xmlsec/buffer.h
+++ b/include/xmlsec/buffer.h
@@ -1,33 +1,33 @@
-/**
+/**
* 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__
+#define __XMLSEC_BUFFER_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <xmlsec/xmlsec.h>
-typedef struct _xmlSecBuffer xmlSecBuffer,
- *xmlSecBufferPtr;
+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.
+ * @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).
*/
@@ -42,7 +42,7 @@ typedef enum {
*
****************************************************************************/
-/**
+/**
* xmlSecBuffer:
* @data: the pointer to buffer data.
* @size: the current data size.
@@ -52,52 +52,52 @@ typedef enum {
* Binary data buffer.
*/
struct _xmlSecBuffer {
- xmlSecByte* data;
- xmlSecSize size;
- xmlSecSize maxSize;
- xmlSecAllocMode allocMode;
+ 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);
+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
diff --git a/include/xmlsec/crypto.h b/include/xmlsec/crypto.h
index 57e9067e..f388aa1e 100644
--- a/include/xmlsec/crypto.h
+++ b/include/xmlsec/crypto.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_CRYPTO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
@@ -34,11 +34,6 @@ extern "C" {
#include <xmlsec/openssl/x509.h>
#include <xmlsec/openssl/symbols.h>
#else /* XMLSEC_CRYPTO_OPENSSL */
-#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_MSCRYPTO
#include <xmlsec/mscrypto/app.h>
#include <xmlsec/mscrypto/crypto.h>
@@ -51,10 +46,21 @@ extern "C" {
#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_MSCRYPTO */
#endif /* XMLSEC_CRYPTO_NSS */
+#endif /* XMLSEC_CRYPTO_MSCRYPTO */
#endif /* XMLSEC_CRYPTO_OPENSSL */
#endif /* XMLSEC_CRYPTO_DYNAMIC_LOADING */
diff --git a/include/xmlsec/dl.h b/include/xmlsec/dl.h
index 9dce850a..86391a78 100644
--- a/include/xmlsec/dl.h
+++ b/include/xmlsec/dl.h
@@ -1,25 +1,25 @@
-/**
+/**
* 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__
+#define __XMLSEC_DL_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-typedef struct _xmlSecCryptoDLFunctions xmlSecCryptoDLFunctions,
- *xmlSecCryptoDLFunctionsPtr;
+typedef struct _xmlSecCryptoDLFunctions xmlSecCryptoDLFunctions,
+ *xmlSecCryptoDLFunctionsPtr;
+
+XMLSEC_EXPORT int xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms
+ (xmlSecCryptoDLFunctionsPtr functions);
-XMLSEC_EXPORT int xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms
- (xmlSecCryptoDLFunctionsPtr functions);
-
#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
#include <libxml/tree.h>
@@ -31,19 +31,21 @@ XMLSEC_EXPORT int xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms
#include <xmlsec/keysmngr.h>
#include <xmlsec/transforms.h>
-/**
+/****************************************************************************
+ *
* Dynamic load functions
- */
-XMLSEC_EXPORT int xmlSecCryptoDLInit (void);
-XMLSEC_EXPORT int xmlSecCryptoDLShutdown (void);
+ *
+ ****************************************************************************/
+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 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);
-XMLSEC_EXPORT int xmlSecCryptoDLSetFunctions (xmlSecCryptoDLFunctionsPtr functions);
-XMLSEC_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoDLGetFunctions (void);
-
#endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */
#ifdef __cplusplus
diff --git a/include/xmlsec/errors.h b/include/xmlsec/errors.h
index 42c6306c..6e23620c 100644
--- a/include/xmlsec/errors.h
+++ b/include/xmlsec/errors.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_ERRORS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
/***************************************************************
*
@@ -25,49 +25,49 @@ extern "C" {
*
* An XMLSec function failed (error subject is the failed function).
*/
-#define XMLSEC_ERRORS_R_XMLSEC_FAILED 1
+#define XMLSEC_ERRORS_R_XMLSEC_FAILED 1
/**
* XMLSEC_ERRORS_R_MALLOC_FAILED:
*
* Failed to allocate memory error.
*/
-#define XMLSEC_ERRORS_R_MALLOC_FAILED 2
+#define XMLSEC_ERRORS_R_MALLOC_FAILED 2
/**
* XMLSEC_ERRORS_R_STRDUP_FAILED:
*
* Failed to duplicate string error.
*/
-#define XMLSEC_ERRORS_R_STRDUP_FAILED 3
+#define XMLSEC_ERRORS_R_STRDUP_FAILED 3
/**
* XMLSEC_ERRORS_R_CRYPTO_FAILED:
*
- * Crypto (OpenSSL) function failed (error subject is the failed function).
+ * Crypto (OpenSSL) function failed (error subject is the failed function).
*/
-#define XMLSEC_ERRORS_R_CRYPTO_FAILED 4
+#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
+#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
+#define XMLSEC_ERRORS_R_XSLT_FAILED 6
/**
* XMLSEC_ERRORS_R_IO_FAILED:
*
* IO operation failed.
*/
-#define XMLSEC_ERRORS_R_IO_FAILED 7
+#define XMLSEC_ERRORS_R_IO_FAILED 7
/**
* XMLSEC_ERRORS_R_DISABLED:
@@ -76,288 +76,288 @@ extern "C" {
* Check './configure --help' for details on how to
* enable it.
*/
-#define XMLSEC_ERRORS_R_DISABLED 8
+#define XMLSEC_ERRORS_R_DISABLED 8
/**
* XMLSEC_ERRORS_R_NOT_IMPLEMENTED:
*
* Feature is not implemented.
*/
-#define XMLSEC_ERRORS_R_NOT_IMPLEMENTED 9
+#define XMLSEC_ERRORS_R_NOT_IMPLEMENTED 9
/**
* XMLSEC_ERRORS_R_INVALID_SIZE:
*
* Invalid size.
*/
-#define XMLSEC_ERRORS_R_INVALID_SIZE 11
+#define XMLSEC_ERRORS_R_INVALID_SIZE 11
/**
* XMLSEC_ERRORS_R_INVALID_DATA:
*
* Invalid data.
*/
-#define XMLSEC_ERRORS_R_INVALID_DATA 12
+#define XMLSEC_ERRORS_R_INVALID_DATA 12
/**
* XMLSEC_ERRORS_R_INVALID_RESULT:
*
* Invalid result.
*/
-#define XMLSEC_ERRORS_R_INVALID_RESULT 13
+#define XMLSEC_ERRORS_R_INVALID_RESULT 13
/**
* XMLSEC_ERRORS_R_INVALID_TYPE:
- *
+ *
* Invalid type.
*/
-#define XMLSEC_ERRORS_R_INVALID_TYPE 14
+#define XMLSEC_ERRORS_R_INVALID_TYPE 14
/**
* XMLSEC_ERRORS_R_INVALID_OPERATION:
- *
+ *
* Invalid operation.
*/
-#define XMLSEC_ERRORS_R_INVALID_OPERATION 15
+#define XMLSEC_ERRORS_R_INVALID_OPERATION 15
/**
* XMLSEC_ERRORS_R_INVALID_STATUS:
*
* Invalid status.
*/
-#define XMLSEC_ERRORS_R_INVALID_STATUS 16
+#define XMLSEC_ERRORS_R_INVALID_STATUS 16
/**
* XMLSEC_ERRORS_R_INVALID_FORMAT:
*
* Invalid format.
*/
-#define XMLSEC_ERRORS_R_INVALID_FORMAT 17
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+ * 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
+#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
+#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
+#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
+#define XMLSEC_ERRORS_R_CERT_NOT_FOUND 72
/**
* XMLSEC_ERRORS_R_CERT_REVOKED:
- *
+ *
* The certificate is revoked.
*/
-#define XMLSEC_ERRORS_R_CERT_REVOKED 73
+#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
+#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
+#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
+#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
+#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
+#define XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE 82
/**
* XMLSEC_ERRORS_R_ASSERTION:
*
* Invalid assertion.
*/
-#define XMLSEC_ERRORS_R_ASSERTION 100
+#define XMLSEC_ERRORS_R_ASSERTION 100
/**
* XMLSEC_ERRORS_MAX_NUMBER:
- *
+ *
* The maximum xmlsec errors number.
*/
-#define XMLSEC_ERRORS_MAX_NUMBER 256
+#define XMLSEC_ERRORS_MAX_NUMBER 256
@@ -365,48 +365,48 @@ extern "C" {
*
* 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.
+ * @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);
+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 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);
+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)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300)
#define __XMLSEC_FUNCTION__ __FUNCTION__
#endif /* _MSC_VER */
@@ -414,46 +414,46 @@ XMLSEC_EXPORT const char* xmlSecErrorsGetMsg (xmlSecSize pos);
#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__
+#define XMLSEC_ERRORS_HERE __FILE__,__LINE__,__XMLSEC_FUNCTION__
#ifdef __GNUC__
-#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE __attribute__ ((format (printf, 7, 8)))
+#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE __attribute__ ((format (printf, 7, 8)))
#else /* __GNUC__ */
-#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE
+#define XMLSEC_ERRORS_PRINTF_ATTRIBUTE
#endif /* __GNUC__ */
/**
* xmlSecErrorsSafeString:
- * @str: the string.
- *
+ * @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")
+ (((str) != NULL) ? ((char*)(str)) : (char*)"NULL")
-/**
+/**
* XMLSEC_ERRORS_NO_MESSAGE:
- *
+ *
* Empty error message " ".
*/
-#define XMLSEC_ERRORS_NO_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;
-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;
-
-
/**********************************************************************
*
@@ -467,14 +467,14 @@ XMLSEC_EXPORT void xmlSecError (const char* file,
* 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; \
- }
+ if(!( p ) ) { \
+ xmlSecError(XMLSEC_ERRORS_HERE, \
+ NULL, \
+ #p, \
+ XMLSEC_ERRORS_R_ASSERTION, \
+ XMLSEC_ERRORS_NO_MESSAGE); \
+ return; \
+ }
/**
* xmlSecAssert2:
@@ -484,14 +484,14 @@ XMLSEC_EXPORT void xmlSecError (const char* file,
* 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); \
- }
+ if(!( p ) ) { \
+ xmlSecError(XMLSEC_ERRORS_HERE, \
+ NULL, \
+ #p, \
+ XMLSEC_ERRORS_R_ASSERTION, \
+ XMLSEC_ERRORS_NO_MESSAGE); \
+ return(ret); \
+ }
diff --git a/include/xmlsec/exports.h b/include/xmlsec/exports.h
index 41d0a7e7..61678c2b 100644
--- a/include/xmlsec/exports.h
+++ b/include/xmlsec/exports.h
@@ -1,21 +1,21 @@
-/**
+/**
* 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__
+#define __XMLSEC_EXPORTS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-/* Now, the export orgy begins. The following we must do for the
+/* Now, the export orgy begins. The following we must do for the
Windows platform with MSVC compiler. */
#if !defined XMLSEC_EXPORT
@@ -23,7 +23,7 @@ extern "C" {
/* if we compile libxmlsec itself: */
# if defined(IN_XMLSEC)
# if !defined(XMLSEC_STATIC)
-# define XMLSEC_EXPORT __declspec(dllexport)
+# define XMLSEC_EXPORT __declspec(dllexport)
# else
# define XMLSEC_EXPORT extern
# endif
@@ -38,9 +38,9 @@ extern "C" {
# define XMLSEC_EXPORT
#else
# if !defined(XMLSEC_STATIC)
-# define XMLSEC_EXPORT __declspec(dllimport)
+# define XMLSEC_EXPORT __declspec(dllimport)
# else
-# define XMLSEC_EXPORT
+# define XMLSEC_EXPORT
# endif
#endif
# endif
@@ -56,16 +56,16 @@ extern "C" {
/* if we compile libxmlsec itself: */
# if defined(IN_XMLSEC_CRYPTO)
# if !defined(XMLSEC_STATIC)
-# define XMLSEC_CRYPTO_EXPORT __declspec(dllexport)
+# 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)
+# define XMLSEC_CRYPTO_EXPORT __declspec(dllimport)
# else
-# define XMLSEC_CRYPTO_EXPORT
+# define XMLSEC_CRYPTO_EXPORT
# endif
# endif
/* This holds on all other platforms/compilers, which are easier to
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..776941cd
--- /dev/null
+++ b/include/xmlsec/gcrypt/Makefile.in
@@ -0,0 +1,581 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(xmlsecgcryptincdir)"
+HEADERS = $(xmlsecgcryptinc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+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@
+DLLTOOL = @DLLTOOL@
+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@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+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@
+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_AR = @ac_ct_AR@
+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@
+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|^.*/||'`; \
+ dir='$(DESTDIR)$(xmlsecgcryptincdir)'; $(am__uninstall_files_from_dir)
+
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+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
index 45b03d6a..78235c4c 100644
--- a/include/xmlsec/gnutls/Makefile.am
+++ b/include/xmlsec/gnutls/Makefile.am
@@ -6,6 +6,7 @@ xmlsecgnutlsinc_HEADERS = \
app.h \
crypto.h \
symbols.h \
+x509.h \
$(NULL)
install-exec-hook:
diff --git a/include/xmlsec/gnutls/Makefile.in b/include/xmlsec/gnutls/Makefile.in
index e3cd79c9..ffdf19ab 100644
--- a/include/xmlsec/gnutls/Makefile.in
+++ b/include/xmlsec/gnutls/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -38,13 +38,22 @@ 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)/configure.in
+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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -68,6 +77,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(xmlsecgnutlsincdir)"
HEADERS = $(xmlsecgnutlsinc_HEADERS)
ETAGS = etags
@@ -75,6 +90,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -89,6 +105,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -97,6 +114,10 @@ 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@
@@ -127,6 +148,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
@@ -158,8 +180,10 @@ 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_ENABLED = @PKG_CONFIG_ENABLED@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
@@ -167,7 +191,6 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
-U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
@@ -186,6 +209,8 @@ 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@
@@ -195,6 +220,7 @@ 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@
@@ -230,6 +256,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -262,7 +289,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -284,6 +310,7 @@ xmlsecgnutlsinc_HEADERS = \
app.h \
crypto.h \
symbols.h \
+x509.h \
$(NULL)
all: all-am
@@ -342,9 +369,7 @@ 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
+ dir='$(DESTDIR)$(xmlsecgnutlsincdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -445,10 +470,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/include/xmlsec/gnutls/app.h b/include/xmlsec/gnutls/app.h
index 50ee97d8..4a2f3e1b 100644
--- a/include/xmlsec/gnutls/app.h
+++ b/include/xmlsec/gnutls/app.h
@@ -1,86 +1,92 @@
-/**
+/**
* 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__
+#define __XMLSEC_GNUTLS_APP_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#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);
+ *
+ ********************************************************************/
+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);
+ *
+ ********************************************************************/
+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);
+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);
+ *
+ ********************************************************************/
+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);
+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);
+XMLSEC_CRYPTO_EXPORT void* xmlSecGnuTLSAppGetDefaultPwdCallback (void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/gnutls/crypto.h b/include/xmlsec/gnutls/crypto.h
index 7570831c..09ac5b41 100644
--- a/include/xmlsec/gnutls/crypto.h
+++ b/include/xmlsec/gnutls/crypto.h
@@ -1,34 +1,36 @@
-/**
+/**
* 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__
+#define __XMLSEC_GNUTLS_CRYPTO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#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);
+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 xmlSecGnuTLSInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSShutdown (void);
-XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeysMngrInit (xmlSecKeysMngrPtr mngr);
-XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSGenerateRandom (xmlSecBufferPtr buffer,
- xmlSecSize size);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSGenerateRandom (xmlSecBufferPtr buffer,
+ xmlSecSize size);
/********************************************************************
@@ -39,41 +41,69 @@ XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSGenerateRandom (xmlSecBufferPtr buffer,
#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);
+ 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);
+ xmlSecGnuTLSTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes128CbcGetKlass(void);
/**
* xmlSecGnuTLSTransformAes192CbcId:
- *
+ *
* The AES192 CBC cipher transform klass.
*/
#define xmlSecGnuTLSTransformAes192CbcId \
- xmlSecGnuTLSTransformAes192CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes192CbcGetKlass(void);
+ xmlSecGnuTLSTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes192CbcGetKlass(void);
/**
* xmlSecGnuTLSTransformAes256CbcId:
- *
+ *
* The AES256 CBC cipher transform klass.
*/
#define xmlSecGnuTLSTransformAes256CbcId \
- xmlSecGnuTLSTransformAes256CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes256CbcGetKlass(void);
+ 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 */
@@ -85,27 +115,76 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes256CbcGetKlass(vo
#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);
+ 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()
+ 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 */
+
+
/********************************************************************
*
@@ -117,67 +196,267 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformDes3CbcGetKlass(void
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);
+ 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()
+ xmlSecGnuTLSTransformHmacMd5GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacMd5GetKlass(void);
-#endif /* XMLSEC_NO_HMAC */
+#endif /* XMLSEC_NO_MD5 */
+
+#ifndef XMLSEC_NO_RIPEMD160
/**
* xmlSecGnuTLSTransformHmacRipemd160Id:
- *
+ *
* The HMAC with RipeMD160 signature transform klass.
*/
#define xmlSecGnuTLSTransformHmacRipemd160Id \
- xmlSecGnuTLSTransformHmacRipemd160GetKlass()
+ 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()
+ 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 */
/********************************************************************
*
- * SHA1 transform
+ * 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 SHA1 digest transform klass.
+ *
+ * The HMAC with SHA1 signature transform klass.
*/
#define xmlSecGnuTLSTransformSha1Id \
- xmlSecGnuTLSTransformSha1GetKlass()
+ 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__
+#define __XMLSEC_GNUTLS_CRYPTO_H__
diff --git a/include/xmlsec/gnutls/symbols.h b/include/xmlsec/gnutls/symbols.h
index 0fcd861a..818035d6 100644
--- a/include/xmlsec/gnutls/symbols.h
+++ b/include/xmlsec/gnutls/symbols.h
@@ -1,13 +1,13 @@
-/**
+/**
* 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__
+#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
@@ -15,76 +15,83 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-/**
- * Defines for writing simple code
- */
#ifdef XMLSEC_CRYPTO_GNUTLS
-/**
+/********************************************************************
+ *
* Crypto Init/shutdown
- */
-#define xmlSecCryptoInit xmlSecGnuTLSInit
-#define xmlSecCryptoShutdown xmlSecGnuTLSShutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecGnuTLSInit
+#define xmlSecCryptoShutdown xmlSecGnuTLSShutdown
-#define xmlSecCryptoKeysMngrInit xmlSecGnuTLSKeysMngrInit
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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 */
@@ -94,4 +101,4 @@ extern "C" {
#endif /* __XMLSEC_GNUTLS_CRYPTO_H__ */
-#define __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
index 9267573a..d5a41c11 100644
--- a/include/xmlsec/io.h
+++ b/include/xmlsec/io.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_IO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <libxml/xmlIO.h>
@@ -21,30 +21,30 @@ extern "C" {
#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);
+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
+ * 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);
+ xmlSecTransformInputURIGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInputURIGetKlass (void);
+XMLSEC_EXPORT int xmlSecTransformInputURIOpen (xmlSecTransformPtr transform,
+ const xmlChar* uri);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/keyinfo.h b/include/xmlsec/keyinfo.h
index dbea0e56..5d7cf0e0 100644
--- a/include/xmlsec/keyinfo.h
+++ b/include/xmlsec/keyinfo.h
@@ -1,20 +1,20 @@
-/**
+/**
* XML Security Library (http://www.aleksey.com/xmlsec).
*
- * <dsig:KeyInfo> element processing
+ * <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__
+#define __XMLSEC_KEYINFO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <time.h>
@@ -26,17 +26,19 @@ extern "C" {
#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);
+
/**
- * Hi 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.
@@ -51,85 +53,85 @@ typedef enum {
/**
* XMLSEC_KEYINFO_FLAGS_DONT_STOP_ON_KEY_FOUND:
*
- * If flag is set then we will continue reading <dsig:KeyInfo />
+ * 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
+#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 />
+ * If flag is set then we abort if an unknown <dsig:KeyInfo />
* child is found.
*/
-#define XMLSEC_KEYINFO_FLAGS_STOP_ON_UNKNOWN_CHILD 0x00000002
+#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
+ * 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
+#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 />
+ * 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
+#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
+#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 />
+ * 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
+#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 />
+ * 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
+#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
+#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
+ * to certificate from <dsig:X509IssuerSerial />, <dsig:X509SKI /> or
* <dsig:X509SubjectName /> elements.
*/
-#define XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CERT 0x00000400
+#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
+#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
@@ -137,133 +139,133 @@ typedef enum {
*/
#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
+#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
+#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.
+ * @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.
+ * 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).
+ * <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".
+ * ("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).
+ * @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.
+ * 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;
-
+ void* userData;
+ unsigned int flags;
+ unsigned int flags2;
+ xmlSecKeysMngrPtr keysMngr;
+ xmlSecKeyInfoMode mode;
+ xmlSecPtrList enabledKeyData;
+ int base64LineSize;
+
/* RetrievalMethod */
- xmlSecTransformCtx retrievalMethodCtx;
- int maxRetrievalMethodLevel;
+ xmlSecTransformCtx retrievalMethodCtx;
+ int maxRetrievalMethodLevel;
#ifndef XMLSEC_NO_XMLENC
/* EncryptedKey */
- xmlSecEncCtxPtr encCtx;
- int maxEncryptedKeyLevel;
+ xmlSecEncCtxPtr encCtx;
+ int maxEncryptedKeyLevel;
#endif /* XMLSEC_NO_XMLENC */
-
+
#ifndef XMLSEC_NO_X509
/* x509 certificates */
- time_t certsVerificationTime;
- int certsVerificationDepth;
+ time_t certsVerificationTime;
+ int certsVerificationDepth;
#endif /* XMLSEC_NO_X509 */
/* PGP */
- void* pgpReserved; /* TODO */
-
+ void* pgpReserved; /* TODO */
+
/* internal data */
- int curRetrievalMethodLevel;
- int curEncryptedKeyLevel;
- xmlSecKeyReq keyReq;
+ int curRetrievalMethodLevel;
+ int curEncryptedKeyLevel;
+ xmlSecKeyReq keyReq;
/* for the future */
- void* reserved0;
- void* reserved1;
+ 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);
+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);
+#define xmlSecKeyDataNameId xmlSecKeyDataNameGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataNameGetKlass (void);
/**
* xmlSecKeyDataValueId
*
* The <dsig:KeyValue> processing class.
*/
-#define xmlSecKeyDataValueId xmlSecKeyDataValueGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataValueGetKlass (void);
+#define xmlSecKeyDataValueId xmlSecKeyDataValueGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataValueGetKlass (void);
/**
* xmlSecKeyDataRetrievalMethodId
*
* The <dsig:RetrievalMethod> processing class.
*/
-#define xmlSecKeyDataRetrievalMethodId xmlSecKeyDataRetrievalMethodGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlass(void);
+#define xmlSecKeyDataRetrievalMethodId xmlSecKeyDataRetrievalMethodGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlass(void);
#ifndef XMLSEC_NO_XMLENC
/**
@@ -271,8 +273,8 @@ XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlass(void);
*
* The <enc:EncryptedKey> processing class.
*/
-#define xmlSecKeyDataEncryptedKeyId xmlSecKeyDataEncryptedKeyGetKlass()
-XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataEncryptedKeyGetKlass(void);
+#define xmlSecKeyDataEncryptedKeyId xmlSecKeyDataEncryptedKeyGetKlass()
+XMLSEC_EXPORT xmlSecKeyDataId xmlSecKeyDataEncryptedKeyGetKlass(void);
#endif /* XMLSEC_NO_XMLENC */
#ifdef __cplusplus
diff --git a/include/xmlsec/keys.h b/include/xmlsec/keys.h
index ba7dcd87..620ad492 100644
--- a/include/xmlsec/keys.h
+++ b/include/xmlsec/keys.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_KEYS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <time.h>
@@ -27,50 +27,50 @@ extern "C" {
*
* The key usage.
*/
-typedef unsigned int xmlSecKeyUsage;
+typedef unsigned int xmlSecKeyUsage;
/**
* xmlSecKeyUsageSign:
- *
+ *
* Key can be used in any way.
*/
-#define xmlSecKeyUsageSign 0x00000001
+#define xmlSecKeyUsageSign 0x00000001
/**
* xmlSecKeyUsageVerify:
*
* Key for signing.
*/
-#define xmlSecKeyUsageVerify 0x00000002
+#define xmlSecKeyUsageVerify 0x00000002
/**
* xmlSecKeyUsageEncrypt:
*
* Key for signature verification.
*/
-#define xmlSecKeyUsageEncrypt 0x00000004
+#define xmlSecKeyUsageEncrypt 0x00000004
/**
* xmlSecKeyUsageDecrypt:
*
* An encryption key.
*/
-#define xmlSecKeyUsageDecrypt 0x00000008
+#define xmlSecKeyUsageDecrypt 0x00000008
/**
* xmlSecKeyUsageKeyExchange:
*
* The key is used for key exchange.
*/
-#define xmlSecKeyUsageKeyExchange 0x00000010
+#define xmlSecKeyUsageKeyExchange 0x00000010
/**
* xmlSecKeyUsageAny:
*
* A decryption key.
*/
-#define xmlSecKeyUsageAny 0xFFFFFFFF
+#define xmlSecKeyUsageAny 0xFFFFFFFF
/**************************************************************************
@@ -78,30 +78,30 @@ typedef unsigned int xmlSecKeyUsage;
* 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,
+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,
+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);
+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.
+ * @reserved1: reserved for future use.
+ * @reserved2: reserved for future use.
*
* Information about application and user of the key.
*/
@@ -113,138 +113,138 @@ struct _xmlSecKeyUseWith {
void* reserved2;
};
-/**
+/**
* xmlSecKeyUseWithPtrListId:
- *
+ *
* The keys list klass.
*/
-#define xmlSecKeyUseWithPtrListId xmlSecKeyUseWithPtrListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyUseWithPtrListGetKlass (void);
+#define xmlSecKeyUseWithPtrListId xmlSecKeyUseWithPtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyUseWithPtrListGetKlass (void);
/**************************************************************************
*
* xmlSecKeyReq - what key are we looking for?
*
*************************************************************************/
-typedef struct _xmlSecKeyReq xmlSecKeyReq, *xmlSecKeyReqPtr;
+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!).
+ * @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.
+ * @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;
+ 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);
+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.
+ * @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;
+ 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);
-
-
+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))
+ ((( key ) != NULL) && \
+ (( key )->value != NULL) && \
+ ((( key )->value->id) != NULL))
/**
* xmlSecKeyCheckId:
* @key: the pointer to key.
@@ -253,8 +253,8 @@ XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadMemory (xmlSecKeyDataId dataId,
* 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 )))
+ (xmlSecKeyIsValid(( key )) && \
+ ((( key )->value->id) == ( keyId )))
/***********************************************************************
@@ -262,13 +262,13 @@ XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyReadMemory (xmlSecKeyDataId dataId,
* Keys list
*
**********************************************************************/
-/**
+/**
* xmlSecKeyPtrListId:
- *
+ *
* The keys list klass.
*/
-#define xmlSecKeyPtrListId xmlSecKeyPtrListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyPtrListGetKlass (void);
+#define xmlSecKeyPtrListId xmlSecKeyPtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyPtrListGetKlass (void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/keysdata.h b/include/xmlsec/keysdata.h
index 85974c95..f7554ca4 100644
--- a/include/xmlsec/keysdata.h
+++ b/include/xmlsec/keysdata.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_KEYSDATA_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -21,15 +21,17 @@ extern "C" {
#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;
+ *
+ ****************************************************************************/
+typedef const struct _xmlSecKeyDataKlass xmlSecKeyDataKlass,
+ *xmlSecKeyDataId;
+typedef const struct _xmlSecKeyDataStoreKlass xmlSecKeyDataStoreKlass,
+ *xmlSecKeyDataStoreId;
+typedef struct _xmlSecKeyDataList xmlSecKeyDataList,
+ *xmlSecKeyDataListPtr;
/**************************************************************************
@@ -37,47 +39,47 @@ typedef struct _xmlSecKeyDataList xmlSecKeyDataList,
* xmlSecKeyDataUsage
*
*************************************************************************/
-/**
+/**
* xmlSecKeyDataUsage:
*
* The bits mask that determines possible keys data usage.
*/
-typedef unsigned int xmlSecKeyDataUsage;
+typedef unsigned int xmlSecKeyDataUsage;
/**
* xmlSecKeyDataUsageUnknown:
*
* The key data usage is unknown.
*/
-#define xmlSecKeyDataUsageUnknown 0x00000
+#define xmlSecKeyDataUsageUnknown 0x00000
/**
* xmlSecKeyDataUsageKeyInfoNodeRead:
*
* The key data could be read from a <dsig:KeyInfo/> child.
*/
-#define xmlSecKeyDataUsageKeyInfoNodeRead 0x00001
+#define xmlSecKeyDataUsageKeyInfoNodeRead 0x00001
/**
* xmlSecKeyDataUsageKeyInfoNodeWrite:
*
* The key data could be written to a <dsig:KeyInfo /> child.
*/
-#define xmlSecKeyDataUsageKeyInfoNodeWrite 0x00002
+#define xmlSecKeyDataUsageKeyInfoNodeWrite 0x00002
/**
* xmlSecKeyDataUsageKeyValueNodeRead:
*
* The key data could be read from a <dsig:KeyValue /> child.
*/
-#define xmlSecKeyDataUsageKeyValueNodeRead 0x00004
+#define xmlSecKeyDataUsageKeyValueNodeRead 0x00004
/**
* xmlSecKeyDataUsageKeyValueNodeWrite:
*
* The key data could be written to a <dsig:KeyValue /> child.
*/
-#define xmlSecKeyDataUsageKeyValueNodeWrite 0x00008
+#define xmlSecKeyDataUsageKeyValueNodeWrite 0x00008
/**
* xmlSecKeyDataUsageRetrievalMethodNodeXml:
@@ -85,7 +87,7 @@ typedef unsigned int xmlSecKeyDataUsage;
* The key data could be retrieved using <dsig:RetrievalMethod /> node
* in XML format.
*/
-#define xmlSecKeyDataUsageRetrievalMethodNodeXml 0x00010
+#define xmlSecKeyDataUsageRetrievalMethodNodeXml 0x00010
/**
* xmlSecKeyDataUsageRetrievalMethodNodeBin:
@@ -93,30 +95,30 @@ typedef unsigned int xmlSecKeyDataUsage;
* The key data could be retrieved using <dsig:RetrievalMethod /> node
* in binary format.
*/
-#define xmlSecKeyDataUsageRetrievalMethodNodeBin 0x00020
+#define xmlSecKeyDataUsageRetrievalMethodNodeBin 0x00020
/**
* xmlSecKeyDataUsageAny:
*
* Any key data usage.
*/
-#define xmlSecKeyDataUsageAny 0xFFFFF
+#define xmlSecKeyDataUsageAny 0xFFFFF
/**
* xmlSecKeyDataUsageKeyInfoNode:
*
* The key data could be read and written from/to a <dsig:KeyInfo /> child.
*/
-#define xmlSecKeyDataUsageKeyInfoNode \
- (xmlSecKeyDataUsageKeyInfoNodeRead | xmlSecKeyDataUsageKeyInfoNodeWrite)
+#define xmlSecKeyDataUsageKeyInfoNode \
+ (xmlSecKeyDataUsageKeyInfoNodeRead | xmlSecKeyDataUsageKeyInfoNodeWrite)
/**
* xmlSecKeyDataUsageKeyValueNode:
*
* The key data could be read and written from/to a <dsig:KeyValue /> child.
*/
-#define xmlSecKeyDataUsageKeyValueNode \
- (xmlSecKeyDataUsageKeyValueNodeRead | xmlSecKeyDataUsageKeyValueNodeWrite)
+#define xmlSecKeyDataUsageKeyValueNode \
+ (xmlSecKeyDataUsageKeyValueNodeRead | xmlSecKeyDataUsageKeyValueNodeWrite)
/**
* xmlSecKeyDataUsageRetrievalMethodNode:
@@ -124,8 +126,8 @@ typedef unsigned int xmlSecKeyDataUsage;
* The key data could be retrieved using <dsig:RetrievalMethod /> node
* in any format.
*/
-#define xmlSecKeyDataUsageRetrievalMethodNode \
- (xmlSecKeyDataUsageRetrievalMethodNodeXml | xmlSecKeyDataUsageRetrievalMethodNodeBin)
+#define xmlSecKeyDataUsageRetrievalMethodNode \
+ (xmlSecKeyDataUsageRetrievalMethodNodeXml | xmlSecKeyDataUsageRetrievalMethodNodeBin)
/**************************************************************************
*
@@ -137,70 +139,70 @@ typedef unsigned int xmlSecKeyDataUsage;
*
* The key data type (public/private, session/permanet, etc.).
*/
-typedef unsigned int xmlSecKeyDataType;
+typedef unsigned int xmlSecKeyDataType;
/**
* xmlSecKeyDataTypeUnknown:
*
* The key data type is unknown (same as #xmlSecKeyDataTypeNone).
*/
-#define xmlSecKeyDataTypeUnknown 0x0000
+#define xmlSecKeyDataTypeUnknown 0x0000
/**
* xmlSecKeyDataTypeNone:
*
* The key data type is unknown (same as #xmlSecKeyDataTypeUnknown).
*/
-#define xmlSecKeyDataTypeNone xmlSecKeyDataTypeUnknown
+#define xmlSecKeyDataTypeNone xmlSecKeyDataTypeUnknown
/**
* xmlSecKeyDataTypePublic:
*
* The key data contain a public key.
*/
-#define xmlSecKeyDataTypePublic 0x0001
+#define xmlSecKeyDataTypePublic 0x0001
/**
* xmlSecKeyDataTypePrivate:
*
* The key data contain a private key.
*/
-#define xmlSecKeyDataTypePrivate 0x0002
+#define xmlSecKeyDataTypePrivate 0x0002
/**
* xmlSecKeyDataTypeSymmetric:
*
* The key data contain a symmetric key.
*/
-#define xmlSecKeyDataTypeSymmetric 0x0004
+#define xmlSecKeyDataTypeSymmetric 0x0004
/**
* xmlSecKeyDataTypeSession:
*
* The key data contain session key (one time key, not stored in keys manager).
*/
-#define xmlSecKeyDataTypeSession 0x0008
+#define xmlSecKeyDataTypeSession 0x0008
/**
* xmlSecKeyDataTypePermanent:
*
* The key data contain permanent key (stored in keys manager).
*/
-#define xmlSecKeyDataTypePermanent 0x0010
+#define xmlSecKeyDataTypePermanent 0x0010
/**
* xmlSecKeyDataTypeTrusted:
*
* The key data is trusted.
*/
-#define xmlSecKeyDataTypeTrusted 0x0100
+#define xmlSecKeyDataTypeTrusted 0x0100
/**
* xmlSecKeyDataTypeAny:
*
* Any key data.
*/
-#define xmlSecKeyDataTypeAny 0xFFFF
+#define xmlSecKeyDataTypeAny 0xFFFF
/**************************************************************************
*
@@ -209,15 +211,15 @@ typedef unsigned int xmlSecKeyDataType;
*************************************************************************/
/**
* 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.
+ * @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.).
*/
@@ -238,12 +240,12 @@ typedef enum {
* 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);
-
+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
@@ -251,105 +253,105 @@ XMLSEC_EXPORT int xmlSecKeyDataIdsRegister (xmlSecKeyDataId id);
*************************************************************************/
/**
* xmlSecKeyData:
- * @id: the data id (#xmlSecKeyDataId).
- * @reserved0: reserved for the future.
- * @reserved1: reserved for the future.
+ * @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.
+ * The key data: key value (crypto material), x509 data, pgp data, etc.
*/
struct _xmlSecKeyData {
- xmlSecKeyDataId id;
- void* reserved0;
- void* reserved1;
+ 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);
+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.
+ * @data: the pointer to key data.
*
* Macro. Returns the key data name.
*/
#define xmlSecKeyDataGetName(data) \
- ((xmlSecKeyDataIsValid((data))) ? \
- xmlSecKeyDataKlassGetName((data)->id) : NULL)
+ ((xmlSecKeyDataIsValid((data))) ? \
+ xmlSecKeyDataKlassGetName((data)->id) : NULL)
/**
* xmlSecKeyDataIsValid:
- * @data: the pointer to data.
+ * @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))
+ ((( 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.
+ * @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 )))
+ (xmlSecKeyDataIsValid(( data )) && \
+ ((( data )->id) == ( dataId )))
/**
* xmlSecKeyDataCheckUsage:
- * @data: the pointer to data.
- * @usg: the data usage.
+ * @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))
+ (xmlSecKeyDataIsValid(( data )) && \
+ (((( data )->id->usage) & ( usg )) != 0))
/**
* xmlSecKeyDataCheckSize:
- * @data: the pointer to data.
- * @size: the expected size.
+ * @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))
+ (xmlSecKeyDataIsValid(( data )) && \
+ (( data )->id->objSize >= size))
/**************************************************************************
*
@@ -361,231 +363,231 @@ XMLSEC_EXPORT int xmlSecKeyDataBinWrite (xmlSecKeyDataId id,
*
* The "unknown" id.
*/
-#define xmlSecKeyDataIdUnknown ((xmlSecKeyDataId)NULL)
+#define xmlSecKeyDataIdUnknown ((xmlSecKeyDataId)NULL)
-/**
+/**
* xmlSecKeyDataInitMethod:
- * @data: the pointer to key data.
+ * @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);
+typedef int (*xmlSecKeyDataInitMethod) (xmlSecKeyDataPtr data);
-/**
+/**
* xmlSecKeyDataDuplicateMethod:
- * @dst: the pointer to destination key data.
- * @src: the poiniter to source key data.
+ * @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);
+typedef int (*xmlSecKeyDataDuplicateMethod) (xmlSecKeyDataPtr dst,
+ xmlSecKeyDataPtr src);
-/**
+/**
* xmlSecKeyDataFinalizeMethod:
- * @data: the data.
+ * @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);
+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.
+ * @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.
*
- * 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);
-/**
+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.
+ * @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);
-/**
+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.
+ * @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);
-/**
+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.
- *
+ * @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);
+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.)
+ * @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);
+typedef int (*xmlSecKeyDataGenerateMethod) (xmlSecKeyDataPtr data,
+ xmlSecSize sizeBits,
+ xmlSecKeyDataType type);
-/**
+/**
* xmlSecKeyDataGetTypeMethod:
- * @data: the data.
+ * @data: the data.
*
* Key data specific method to get the key type.
*
* Returns: the key type.
*/
-typedef xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod) (xmlSecKeyDataPtr data);
+typedef xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod) (xmlSecKeyDataPtr data);
-/**
+/**
* xmlSecKeyDataGetSizeMethod:
- * @data: the pointer to key data.
+ * @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);
+typedef xmlSecSize (*xmlSecKeyDataGetSizeMethod) (xmlSecKeyDataPtr data);
-/**
+/**
* xmlSecKeyDataGetIdentifierMethod:
- * @data: the pointer to key data.
+ * @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);
+typedef const xmlChar* (*xmlSecKeyDataGetIdentifierMethod) (xmlSecKeyDataPtr data);
-/**
+/**
* xmlSecKeyDataDebugDumpMethod:
- * @data: the data.
- * @output: the FILE to print debug info (should be open for writing).
+ * @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);
+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.
+ * @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;
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
/* data */
- const xmlChar* name;
- xmlSecKeyDataUsage usage;
- const xmlChar* href;
- const xmlChar* dataNodeName;
- const xmlChar* dataNodeNs;
-
+ const xmlChar* name;
+ xmlSecKeyDataUsage usage;
+ const xmlChar* href;
+ const xmlChar* dataNodeName;
+ const xmlChar* dataNodeNs;
+
/* constructors/destructor */
- xmlSecKeyDataInitMethod initialize;
- xmlSecKeyDataDuplicateMethod duplicate;
- xmlSecKeyDataFinalizeMethod finalize;
- xmlSecKeyDataGenerateMethod generate;
-
+ xmlSecKeyDataInitMethod initialize;
+ xmlSecKeyDataDuplicateMethod duplicate;
+ xmlSecKeyDataFinalizeMethod finalize;
+ xmlSecKeyDataGenerateMethod generate;
+
/* get info */
- xmlSecKeyDataGetTypeMethod getType;
- xmlSecKeyDataGetSizeMethod getSize;
- xmlSecKeyDataGetIdentifierMethod getIdentifier;
+ xmlSecKeyDataGetTypeMethod getType;
+ xmlSecKeyDataGetSizeMethod getSize;
+ xmlSecKeyDataGetIdentifierMethod getIdentifier;
/* read/write */
- xmlSecKeyDataXmlReadMethod xmlRead;
- xmlSecKeyDataXmlWriteMethod xmlWrite;
- xmlSecKeyDataBinReadMethod binRead;
- xmlSecKeyDataBinWriteMethod binWrite;
+ xmlSecKeyDataXmlReadMethod xmlRead;
+ xmlSecKeyDataXmlWriteMethod xmlWrite;
+ xmlSecKeyDataBinReadMethod binRead;
+ xmlSecKeyDataBinWriteMethod binWrite;
/* debug */
- xmlSecKeyDataDebugDumpMethod debugDump;
- xmlSecKeyDataDebugDumpMethod debugXmlDump;
+ xmlSecKeyDataDebugDumpMethod debugDump;
+ xmlSecKeyDataDebugDumpMethod debugXmlDump;
/* for the future */
- void* reserved0;
- void* reserved1;
+ void* reserved0;
+ void* reserved1;
};
/**
* xmlSecKeyDataKlassGetName:
- * @klass: the data klass.
+ * @klass: the data klass.
*
* Macro. Returns data klass name.
*/
#define xmlSecKeyDataKlassGetName(klass) \
- (((klass)) ? ((klass)->name) : NULL)
+ (((klass)) ? ((klass)->name) : NULL)
/***********************************************************************
*
@@ -598,8 +600,8 @@ struct _xmlSecKeyDataKlass {
*
* The key data klasses list klass id.
*/
-#define xmlSecKeyDataListId xmlSecKeyDataListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataListGetKlass (void);
+#define xmlSecKeyDataListId xmlSecKeyDataListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataListGetKlass (void);
/***********************************************************************
*
@@ -612,29 +614,29 @@ XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataListGetKlass (void);
*
* 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);
+#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
*
*************************************************************************/
@@ -643,41 +645,41 @@ XMLSEC_EXPORT void xmlSecKeyDataIdListDebugXmlDump (xmlSecPtrListPtr list,
*
* The binary key data object size.
*/
-#define xmlSecKeyDataBinarySize \
+#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);
+
+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);
/**************************************************************************
*
@@ -686,28 +688,28 @@ XMLSEC_EXPORT int xmlSecKeyDataBinaryValueSetBuffer (xmlSecKeyDataPtr data,
*************************************************************************/
/**
* xmlSecKeyDataStore:
- * @id: the store id (#xmlSecKeyDataStoreId).
- * @reserved0: reserved for the future.
- * @reserved1: reserved for the future.
+ * @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
+ * required for key data processing. For example, X509 data store may hold
* information about trusted (root) certificates.
*/
struct _xmlSecKeyDataStore {
- xmlSecKeyDataStoreId id;
+ xmlSecKeyDataStoreId id;
/* for the future */
- void* reserved0;
- void* reserved1;
+ void* reserved0;
+ void* reserved1;
};
-XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate (xmlSecKeyDataStoreId id);
-XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyDataStorePtr store);
+XMLSEC_EXPORT xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate (xmlSecKeyDataStoreId id);
+XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyDataStorePtr store);
/**
* xmlSecKeyDataStoreGetName:
- * @store: the pointer to store.
+ * @store: the pointer to store.
*
* Macro. Returns key data store name.
*/
@@ -717,34 +719,34 @@ XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyDataStorePtr store);
/**
* xmlSecKeyDataStoreIsValid:
- * @store: the pointer to store.
+ * @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))
+ ((( store ) != NULL) && ((( store )->id) != NULL))
/**
* xmlSecKeyDataStoreCheckId:
- * @store: the pointer to store.
- * @storeId: the store Id.
+ * @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 )))
+ (xmlSecKeyDataStoreIsValid(( store )) && \
+ ((( store )->id) == ( storeId )))
/**
* xmlSecKeyDataStoreCheckSize:
- * @store: the pointer to store.
- * @size: the expected size.
+ * @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))
+ (xmlSecKeyDataStoreIsValid(( store )) && \
+ (( store )->id->objSize >= size))
/**************************************************************************
@@ -757,62 +759,62 @@ XMLSEC_EXPORT void xmlSecKeyDataStoreDestroy (xmlSecKeyDataStorePtr store);
*
* The "unknown" id.
*/
-#define xmlSecKeyDataStoreIdUnknown NULL
+#define xmlSecKeyDataStoreIdUnknown NULL
-/**
+/**
* xmlSecKeyDataStoreInitializeMethod:
- * @store: the data store.
+ * @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);
+typedef int (*xmlSecKeyDataStoreInitializeMethod) (xmlSecKeyDataStorePtr store);
-/**
+/**
* xmlSecKeyDataStoreFinalizeMethod:
- * @store: the data store.
+ * @store: the data store.
*
* Key data store specific finalization (destroy) method.
*/
-typedef void (*xmlSecKeyDataStoreFinalizeMethod) (xmlSecKeyDataStorePtr store);
+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.
+ * @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;
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
/* data */
- const xmlChar* name;
-
+ const xmlChar* name;
+
/* constructors/destructor */
- xmlSecKeyDataStoreInitializeMethod initialize;
- xmlSecKeyDataStoreFinalizeMethod finalize;
+ xmlSecKeyDataStoreInitializeMethod initialize;
+ xmlSecKeyDataStoreFinalizeMethod finalize;
/* for the future */
- void* reserved0;
- void* reserved1;
+ void* reserved0;
+ void* reserved1;
};
/**
* xmlSecKeyDataStoreKlassGetName:
- * @klass: the pointer to store klass.
- *
+ * @klass: the pointer to store klass.
+ *
* Macro. Returns store klass name.
*/
#define xmlSecKeyDataStoreKlassGetName(klass) \
- (((klass)) ? ((klass)->name) : NULL)
+ (((klass)) ? ((klass)->name) : NULL)
/***********************************************************************
*
@@ -824,8 +826,8 @@ struct _xmlSecKeyDataStoreKlass {
*
* The data store list id (klass).
*/
-#define xmlSecKeyDataStorePtrListId xmlSecKeyDataStorePtrListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass (void);
+#define xmlSecKeyDataStorePtrListId xmlSecKeyDataStorePtrListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass (void);
#ifdef __cplusplus
diff --git a/include/xmlsec/keysmngr.h b/include/xmlsec/keysmngr.h
index 3a999324..289da4c1 100644
--- a/include/xmlsec/keysmngr.h
+++ b/include/xmlsec/keysmngr.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_KEYSMGMR_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
#include <xmlsec/list.h>
@@ -21,10 +21,10 @@ extern "C" {
#include <xmlsec/keysdata.h>
#include <xmlsec/keyinfo.h>
-typedef const struct _xmlSecKeyKlass xmlSecKeyKlass,
- *xmlSecKeyId;
-typedef const struct _xmlSecKeyStoreKlass xmlSecKeyStoreKlass,
- *xmlSecKeyStoreId;
+typedef const struct _xmlSecKeyKlass xmlSecKeyKlass,
+ *xmlSecKeyId;
+typedef const struct _xmlSecKeyStoreKlass xmlSecKeyStoreKlass,
+ *xmlSecKeyStoreId;
/****************************************************************************
@@ -32,52 +32,52 @@ typedef const struct _xmlSecKeyStoreKlass xmlSecKeyStoreKlass,
* Keys Manager
*
***************************************************************************/
-XMLSEC_EXPORT xmlSecKeysMngrPtr xmlSecKeysMngrCreate (void);
-XMLSEC_EXPORT void xmlSecKeysMngrDestroy (xmlSecKeysMngrPtr mngr);
+XMLSEC_EXPORT xmlSecKeysMngrPtr xmlSecKeysMngrCreate (void);
+XMLSEC_EXPORT void xmlSecKeysMngrDestroy (xmlSecKeysMngrPtr mngr);
-XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrFindKey (xmlSecKeysMngrPtr mngr,
- const xmlChar* name,
- xmlSecKeyInfoCtxPtr keyInfoCtx);
+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 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);
+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.
+ * @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
+ * Returns: the pointer to key or NULL if the key is not found or
* an error occurs.
*/
-typedef xmlSecKeyPtr (*xmlSecGetKeyCallback) (xmlNodePtr keyInfoNode,
- xmlSecKeyInfoCtxPtr keyInfoCtx);
+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.
+ * @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;
+struct _xmlSecKeysMngr {
+ xmlSecKeyStorePtr keysStore;
+ xmlSecPtrList storesList;
+ xmlSecGetKeyCallback getKey;
};
-XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrGetKey (xmlNodePtr keyInfoNode,
- xmlSecKeyInfoCtxPtr keyInfoCtx);
+XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrGetKey (xmlNodePtr keyInfoNode,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
/**************************************************************************
@@ -87,28 +87,28 @@ XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeysMngrGetKey (xmlNodePtr keyInfoNode,
*************************************************************************/
/**
* xmlSecKeyStore:
- * @id: the store id (#xmlSecKeyStoreId).
- * @reserved0: reserved for the future.
- * @reserved1: reserved for the future.
+ * @id: the store id (#xmlSecKeyStoreId).
+ * @reserved0: reserved for the future.
+ * @reserved1: reserved for the future.
*
- * The keys store.
+ * The keys store.
*/
struct _xmlSecKeyStore {
- xmlSecKeyStoreId id;
+ xmlSecKeyStoreId id;
/* for the future */
- void* reserved0;
- void* reserved1;
+ 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);
+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.
+ * @store: the pointer to store.
*
* Macro. Returns key store name.
*/
@@ -118,34 +118,34 @@ XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyStoreFindKey (xmlSecKeyStorePtr store,
/**
* xmlSecKeyStoreIsValid:
- * @store: the pointer to store.
+ * @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))
+ ((( store ) != NULL) && ((( store )->id) != NULL))
/**
* xmlSecKeyStoreCheckId:
- * @store: the pointer to store.
- * @storeId: the store Id.
+ * @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 )))
+ (xmlSecKeyStoreIsValid(( store )) && \
+ ((( store )->id) == ( storeId )))
/**
* xmlSecKeyStoreCheckSize:
- * @store: the pointer to store.
- * @size: the expected size.
+ * @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))
+ (xmlSecKeyStoreIsValid(( store )) && \
+ (( store )->id->objSize >= size))
/**************************************************************************
@@ -158,79 +158,79 @@ XMLSEC_EXPORT xmlSecKeyPtr xmlSecKeyStoreFindKey (xmlSecKeyStorePtr store,
*
* The "unknown" id.
*/
-#define xmlSecKeyStoreIdUnknown ((xmlSecKeyDataStoreId)NULL)
+#define xmlSecKeyStoreIdUnknown ((xmlSecKeyDataStoreId)NULL)
-/**
+/**
* xmlSecKeyStoreInitializeMethod:
- * @store: the store.
+ * @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);
+typedef int (*xmlSecKeyStoreInitializeMethod) (xmlSecKeyStorePtr store);
-/**
+/**
* xmlSecKeyStoreFinalizeMethod:
- * @store: the store.
+ * @store: the store.
*
* Keys store specific finalization (destroy) method.
*/
-typedef void (*xmlSecKeyStoreFinalizeMethod) (xmlSecKeyStorePtr store);
+typedef void (*xmlSecKeyStoreFinalizeMethod) (xmlSecKeyStorePtr store);
-/**
+/**
* xmlSecKeyStoreFindKeyMethod:
- * @store: the store.
- * @name: the desired key name.
- * @keyInfoCtx: the pointer to key info context.
+ * @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
+ * 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);
+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.
+ * @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;
+ xmlSecSize klassSize;
+ xmlSecSize objSize;
/* data */
- const xmlChar* name;
-
+ const xmlChar* name;
+
/* constructors/destructor */
- xmlSecKeyStoreInitializeMethod initialize;
- xmlSecKeyStoreFinalizeMethod finalize;
- xmlSecKeyStoreFindKeyMethod findKey;
+ xmlSecKeyStoreInitializeMethod initialize;
+ xmlSecKeyStoreFinalizeMethod finalize;
+ xmlSecKeyStoreFindKeyMethod findKey;
/* for the future */
- void* reserved0;
- void* reserved1;
+ void* reserved0;
+ void* reserved1;
};
/**
* xmlSecKeyStoreKlassGetName:
- * @klass: the pointer to store klass.
- *
+ * @klass: the pointer to store klass.
+ *
* Macro. Returns store klass name.
*/
#define xmlSecKeyStoreKlassGetName(klass) \
- (((klass)) ? ((klass)->name) : NULL)
+ (((klass)) ? ((klass)->name) : NULL)
/****************************************************************************
@@ -243,17 +243,17 @@ struct _xmlSecKeyStoreKlass {
*
* 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);
+#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
diff --git a/include/xmlsec/list.h b/include/xmlsec/list.h
index 47fa6d8d..fed98706 100644
--- a/include/xmlsec/list.h
+++ b/include/xmlsec/list.h
@@ -1,105 +1,107 @@
-/**
+/**
* 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__
+#define __XMLSEC_LIST_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h>
-typedef const struct _xmlSecPtrListKlass xmlSecPtrListKlass,
- *xmlSecPtrListId;
-typedef struct _xmlSecPtrList xmlSecPtrList,
- *xmlSecPtrListPtr;
+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.
- *
+ * @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;
+ xmlSecPtrListId id;
- xmlSecPtr* data;
- xmlSecSize use;
- xmlSecSize max;
- xmlSecAllocMode allocMode;
+ 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 void xmlSecPtrListDebugDump (xmlSecPtrListPtr list,
- FILE* output);
-XMLSEC_EXPORT void xmlSecPtrListDebugXmlDump (xmlSecPtrListPtr list,
- FILE* output);
+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.
- *
+ * @list: the ponter to list.
+ *
* Macro. Returns lists's name.
*/
#define xmlSecPtrListGetName(list) \
- (((list) != NULL) ? xmlSecPtrListKlassGetName((list)->id) : NULL)
+ (((list) != NULL) ? xmlSecPtrListKlassGetName((list)->id) : NULL)
/**
* xmlSecPtrListIsValid:
- * @list: the pointer to list.
+ * @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))
+ ((( list ) != NULL) && ((( list )->id) != NULL))
/**
* xmlSecPtrListCheckId:
- * @list: the pointer to list.
- * @dataId: the list Id.
+ * @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 )))
+ (xmlSecPtrListIsValid(( list )) && \
+ ((( list )->id) == ( dataId )))
/**************************************************************************
@@ -112,63 +114,63 @@ XMLSEC_EXPORT void xmlSecPtrListDebugXmlDump (xmlSecPtrListPtr list,
*
* The "unknown" id.
*/
-#define xmlSecPtrListIdUnknown NULL
+#define xmlSecPtrListIdUnknown NULL
/**
* xmlSecPtrDuplicateItemMethod:
- * @ptr: the poinetr to list item.
+ * @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);
+typedef xmlSecPtr (*xmlSecPtrDuplicateItemMethod) (xmlSecPtr ptr);
/**
* xmlSecPtrDestroyItemMethod:
- * @ptr: the poinetr to list item.
+ * @ptr: the poinetr to list item.
*
* Destroys list item @ptr.
*/
-typedef void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr ptr);
+typedef void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr ptr);
/**
* xmlSecPtrDebugDumpItemMethod:
- * @ptr: the poinetr to list item.
- * @output: the output FILE.
+ * @ptr: the poinetr to list item.
+ * @output: the output FILE.
*
* Prints debug information about @item to @output.
*/
-typedef void (*xmlSecPtrDebugDumpItemMethod) (xmlSecPtr ptr,
- FILE* 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.
+ * 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;
+ const xmlChar* name;
+ xmlSecPtrDuplicateItemMethod duplicateItem;
+ xmlSecPtrDestroyItemMethod destroyItem;
+ xmlSecPtrDebugDumpItemMethod debugDumpItem;
+ xmlSecPtrDebugDumpItemMethod debugXmlDumpItem;
};
/**
- * xmlSecPtrListKlassGetName:
- * @klass: the list klass.
+ * xmlSecPtrListKlassGetName:
+ * @klass: the list klass.
*2
-
+
* Macro. Returns the list klass name.
*/
#define xmlSecPtrListKlassGetName(klass) \
- (((klass) != NULL) ? ((klass)->name) : NULL)
+ (((klass) != NULL) ? ((klass)->name) : NULL)
/**************************************************************************
*
@@ -181,8 +183,8 @@ struct _xmlSecPtrListKlass {
* Strings list klass.
*/
#define xmlSecStringListId \
- xmlSecStringListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecStringListGetKlass (void);
+ xmlSecStringListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecStringListGetKlass (void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/membuf.h b/include/xmlsec/membuf.h
index 4242f4fd..fbe6da41 100644
--- a/include/xmlsec/membuf.h
+++ b/include/xmlsec/membuf.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_MEMBUF_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -23,18 +23,18 @@ extern "C" {
/********************************************************************
*
- * Memory Buffer transform
+ * Memory Buffer transform
*
*******************************************************************/
/**
* xmlSecTransformMemBufId:
- *
+ *
* The Memory Buffer transform klass.
*/
#define xmlSecTransformMemBufId \
- xmlSecTransformMemBufGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMemBufGetKlass (void);
-XMLSEC_EXPORT xmlSecBufferPtr xmlSecTransformMemBufGetBuffer (xmlSecTransformPtr transform);
+ xmlSecTransformMemBufGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformMemBufGetKlass (void);
+XMLSEC_EXPORT xmlSecBufferPtr xmlSecTransformMemBufGetBuffer (xmlSecTransformPtr transform);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/mscrypto/Makefile.in b/include/xmlsec/mscrypto/Makefile.in
index 1570c0f0..235bc0c8 100644
--- a/include/xmlsec/mscrypto/Makefile.in
+++ b/include/xmlsec/mscrypto/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -38,13 +38,22 @@ 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)/configure.in
+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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -68,6 +77,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(xmlsecmscryptoincdir)"
HEADERS = $(xmlsecmscryptoinc_HEADERS)
ETAGS = etags
@@ -75,6 +90,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -89,6 +105,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -97,6 +114,10 @@ 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@
@@ -127,6 +148,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
@@ -158,8 +180,10 @@ 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_ENABLED = @PKG_CONFIG_ENABLED@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
@@ -167,7 +191,6 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
-U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
@@ -186,6 +209,8 @@ 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@
@@ -195,6 +220,7 @@ 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@
@@ -230,6 +256,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -262,7 +289,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -345,9 +371,7 @@ 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
+ dir='$(DESTDIR)$(xmlsecmscryptoincdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -448,10 +472,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/include/xmlsec/mscrypto/app.h b/include/xmlsec/mscrypto/app.h
index 964cffcf..3d23d0e5 100644
--- a/include/xmlsec/mscrypto/app.h
+++ b/include/xmlsec/mscrypto/app.h
@@ -1,17 +1,17 @@
-/**
+/**
* XMLSec library
*
* This is free software; see Copyright file in the source
* distribution for preciese wording.
- *
- * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
*/
#ifndef __XMLSEC_MSCRYPTO_APP_H__
-#define __XMLSEC_MSCRYPTO_APP_H__
+#define __XMLSEC_MSCRYPTO_APP_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
#include <xmlsec/keys.h>
@@ -21,98 +21,92 @@ extern "C" {
#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 const char*xmlSecMSCryptoAppGetCertStoreName (void);
+ *
+ ********************************************************************/
+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);
+ *
+ ********************************************************************/
+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 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);
-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);
+ *
+ ********************************************************************/
+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);
+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);
+XMLSEC_CRYPTO_EXPORT void* xmlSecMSCryptoAppGetDefaultPwdCallback (void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/mscrypto/certkeys.h b/include/xmlsec/mscrypto/certkeys.h
index 4ae85240..1f285656 100644
--- a/include/xmlsec/mscrypto/certkeys.h
+++ b/include/xmlsec/mscrypto/certkeys.h
@@ -1,17 +1,17 @@
-/**
+/**
* XMLSec library
*
* This is free software; see Copyright file in the source
* distribution for preciese wording.
- *
- * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
*/
#ifndef __XMLSEC_MSCRYPTO_CERTKEYS_H__
-#define __XMLSEC_MSCRYPTO_CERTKEYS_H__
+#define __XMLSEC_MSCRYPTO_CERTKEYS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <windows.h>
#include <wincrypt.h>
@@ -20,12 +20,18 @@ extern "C" {
#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 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
}
diff --git a/include/xmlsec/mscrypto/crypto.h b/include/xmlsec/mscrypto/crypto.h
index 28d792aa..5f3142fc 100644
--- a/include/xmlsec/mscrypto/crypto.h
+++ b/include/xmlsec/mscrypto/crypto.h
@@ -1,17 +1,17 @@
-/**
+/**
* XMLSec library
*
* This is free software; see Copyright file in the source
* distribution for preciese wording.
- *
- * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
*/
#ifndef __XMLSEC_MSCRYPTO_CRYPTO_H__
-#define __XMLSEC_MSCRYPTO_CRYPTO_H__
+#define __XMLSEC_MSCRYPTO_CRYPTO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <windows.h>
#include <wincrypt.h>
@@ -21,34 +21,43 @@ extern "C" {
#include <xmlsec/transforms.h>
#include <xmlsec/dl.h>
-XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_mscrypto(void);
+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 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 void xmlSecMSCryptoErrorsDefaultCallback(const char* file,
- int line,
- const char* func,
- const char* errorObject,
- const char* errorSubject,
- int reason,
- const char* msg);
+XMLSEC_CRYPTO_EXPORT LPWSTR xmlSecMSCryptoConvertUtf8ToUnicode (const xmlChar* str);
+XMLSEC_CRYPTO_EXPORT xmlChar* xmlSecMSCryptoConvertUnicodeToUtf8 (LPCWSTR str);
-/**
- * Utils
- */
-XMLSEC_CRYPTO_EXPORT BYTE* xmlSecMSCryptoCertStrToName (DWORD dwCertEncodingType,
- LPCTSTR pszX500,
- DWORD dwStrType,
- DWORD* len);
+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);
/********************************************************************
@@ -60,20 +69,20 @@ XMLSEC_CRYPTO_EXPORT BYTE* xmlSecMSCryptoCertStrToName (DWORD dwCertEncodingTyp
/**
* xmlSecMSCryptoKeyDataDsaId:
- *
+ *
* The DSA key klass.
*/
#define xmlSecMSCryptoKeyDataDsaId \
- xmlSecMSCryptoKeyDataDsaGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDsaGetKlass (void);
+ xmlSecMSCryptoKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDsaGetKlass (void);
/**
* xmlSecMSCryptoTransformDsaSha1Id:
- *
+ *
* The DSA SHA1 signature transform klass.
*/
#define xmlSecMSCryptoTransformDsaSha1Id \
- xmlSecMSCryptoTransformDsaSha1GetKlass()
+ xmlSecMSCryptoTransformDsaSha1GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformDsaSha1GetKlass(void);
#endif /* XMLSEC_NO_DSA */
@@ -87,20 +96,20 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformDsaSha1GetKlass(vo
/**
* xmlSecMSCryptoKeyDataGost2001Id:
- *
+ *
* The GOST2001 key klass.
*/
#define xmlSecMSCryptoKeyDataGost2001Id \
- xmlSecMSCryptoKeyDataGost2001GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataGost2001GetKlass (void);
+ xmlSecMSCryptoKeyDataGost2001GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataGost2001GetKlass (void);
/**
* xmlSecMSCryptoTransformGost2001GostR3411_94Id:
- *
+ *
* The GOST2001 GOSTR3411_94 signature transform klass.
*/
#define xmlSecMSCryptoTransformGost2001GostR3411_94Id \
- xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass()
+ xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGost2001GostR3411_94GetKlass(void);
#endif /* XMLSEC_NO_GOST */
@@ -114,47 +123,117 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGost2001GostR3411_
/**
* xmlSecMSCryptoKeyDataRsaId:
- *
+ *
* The RSA key klass.
*/
#define xmlSecMSCryptoKeyDataRsaId \
- xmlSecMSCryptoKeyDataRsaGetKlass()
+ 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()
+#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()
+ 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()
+ 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
*
*******************************************************************/
@@ -162,16 +241,67 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformRsaOaepGetKlass(vo
/**
* xmlSecMSCryptoTransformSha1Id:
- *
+ *
* The SHA1 digest transform klass.
*/
#define xmlSecMSCryptoTransformSha1Id \
- xmlSecMSCryptoTransformSha1GetKlass()
+ 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
*
*******************************************************************/
@@ -179,11 +309,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformSha1GetKlass(void)
/**
* xmlSecMSCryptoTransformGostR3411_94Id:
- *
+ *
* The GOSTR3411_94 digest transform klass.
*/
#define xmlSecMSCryptoTransformGostR3411_94Id \
- xmlSecMSCryptoTransformGostR3411_94GetKlass()
+ xmlSecMSCryptoTransformGostR3411_94GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGostR3411_94GetKlass(void);
#endif /* XMLSEC_NO_GOST */
@@ -195,41 +325,68 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformGostR3411_94GetKla
#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);
+ 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);
+ xmlSecMSCryptoTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes128CbcGetKlass(void);
/**
* xmlSecMSCryptoTransformAes192CbcId:
- *
+ *
* The AES192 CBC cipher transform klass.
*/
#define xmlSecMSCryptoTransformAes192CbcId \
- xmlSecMSCryptoTransformAes192CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes192CbcGetKlass(void);
+ xmlSecMSCryptoTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes192CbcGetKlass(void);
/**
* xmlSecMSCryptoTransformAes256CbcId:
- *
+ *
* The AES256 CBC cipher transform klass.
*/
#define xmlSecMSCryptoTransformAes256CbcId \
- xmlSecMSCryptoTransformAes256CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes256CbcGetKlass(void);
+ 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 */
@@ -243,30 +400,117 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecMSCryptoTransformAes256CbcGetKlass(
/**
* xmlSecMSCryptoKeyDataDesId:
- *
+ *
* The DES key data klass.
*/
#define xmlSecMSCryptoKeyDataDesId \
- xmlSecMSCryptoKeyDataDesGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDesGetKlass(void);
+ xmlSecMSCryptoKeyDataDesGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataDesGetKlass(void);
/**
* xmlSecMSCryptoTransformDes3CbcId:
- *
+ *
* The DES3 CBC cipher transform klass.
*/
#define xmlSecMSCryptoTransformDes3CbcId \
- xmlSecMSCryptoTransformDes3CbcGetKlass()
+ 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__
+#define __XMLSEC_MSCRYPTO_CRYPTO_H__
diff --git a/include/xmlsec/mscrypto/keysstore.h b/include/xmlsec/mscrypto/keysstore.h
index ab66547f..afaf6a95 100644
--- a/include/xmlsec/mscrypto/keysstore.h
+++ b/include/xmlsec/mscrypto/keysstore.h
@@ -1,19 +1,19 @@
-/**
+/**
* XMLSec library
- *
+ *
* MSCrypto keys store
- *
+ *
* This is free software; see Copyright file in the source
* distribution for precise wording.
- *
- * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
*/
#ifndef __XMLSEC_MSCRYPTO_KEYSSTORE_H__
-#define __XMLSEC_MSCRYPTO_KEYSSTORE_H__
+#define __XMLSEC_MSCRYPTO_KEYSSTORE_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
@@ -27,16 +27,18 @@ extern "C" {
*
* 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);
+#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
}
diff --git a/include/xmlsec/mscrypto/symbols.h b/include/xmlsec/mscrypto/symbols.h
index 2f8ceb43..17000ccf 100644
--- a/include/xmlsec/mscrypto/symbols.h
+++ b/include/xmlsec/mscrypto/symbols.h
@@ -1,13 +1,13 @@
-/**
+/**
* XMLSec library
*
* This is free software; see Copyright file in the source
* distribution for preciese wording.
- *
- * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
*/
#ifndef __XMLSEC_MSCRYPTO_SYMBOLS_H__
-#define __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
@@ -15,80 +15,92 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-/**
- * Defines for writing simple code
- */
#ifdef XMLSEC_CRYPTO_MSCRYPTO
-/**
+/********************************************************************
+ *
* Crypto Init/shutdown
- */
-#define xmlSecCryptoInit xmlSecMSCryptoInit
-#define xmlSecCryptoShutdown xmlSecMSCryptoShutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecMSCryptoInit
+#define xmlSecCryptoShutdown xmlSecMSCryptoShutdown
-#define xmlSecCryptoKeysMngrInit xmlSecMSCryptoKeysMngrInit
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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 xmlSecTransformRsaPkcs1Id xmlSecMSCryptoTransformRsaPkcs1Id
-#define xmlSecTransformRsaOaepId xmlSecMSCryptoTransformRsaOaepId
-#define xmlSecTransformSha1Id xmlSecMSCryptoTransformSha1Id
-#define xmlSecTransformGostR3411_94Id xmlSecMSCryptoTransformGostR3411_94Id
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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 */
@@ -98,5 +110,5 @@ extern "C" {
#endif /* __XMLSEC_MSCRYPTO_CRYPTO_H__ */
-#define __XMLSEC_MSCRYPTO_CRYPTO_H__
+#define __XMLSEC_MSCRYPTO_CRYPTO_H__
diff --git a/include/xmlsec/mscrypto/x509.h b/include/xmlsec/mscrypto/x509.h
index 4dd72d0c..60066bda 100644
--- a/include/xmlsec/mscrypto/x509.h
+++ b/include/xmlsec/mscrypto/x509.h
@@ -1,17 +1,17 @@
-/**
+/**
* XMLSec library
*
* This is free software; see Copyright file in the source
* distribution for preciese wording.
- *
- * Copyrigth (C) 2003 Cordys R&D BV, All rights reserved.
+ *
+ * Copyright (C) 2003 Cordys R&D BV, All rights reserved.
*/
#ifndef __XMLSEC_MSCRYPTO_X509_H__
-#define __XMLSEC_MSCRYPTO_X509_H__
+#define __XMLSEC_MSCRYPTO_X509_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#ifndef XMLSEC_NO_X509
@@ -24,81 +24,64 @@ extern "C" {
/**
* xmlSecMSCryptoKeyDataX509Id:
- *
+ *
* The MSCrypto X509 data klass.
*/
#define xmlSecMSCryptoKeyDataX509Id \
- xmlSecMSCryptoKeyDataX509GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataX509GetKlass(void);
+ 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 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);
+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);
+ xmlSecMSCryptoKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecMSCryptoKeyDataRawX509CertGetKlass(void);
/**
* xmlSecMSCryptoX509StoreId:
- *
+ *
* The MSCrypto X509 store klass.
*/
#define xmlSecMSCryptoX509StoreId \
- xmlSecMSCryptoX509StoreGetKlass()
+ xmlSecMSCryptoX509StoreGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecKeyDataStoreId xmlSecMSCryptoX509StoreGetKlass(void);
-XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT xmlSecMSCryptoX509StoreFindCert (xmlSecKeyDataStorePtr store,
- xmlChar *subjectName,
- xmlChar *issuerName,
- xmlChar *issuerSerial,
- xmlChar *ski,
- xmlSecKeyInfoCtx* keyInfoCtx);
-
-
-XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT xmlSecMSCryptoX509StoreVerify (xmlSecKeyDataStorePtr store,
- HCERTSTORE certs,
- xmlSecKeyInfoCtx* keyInfoCtx);
-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
- ) ;
+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 */
diff --git a/include/xmlsec/nodeset.h b/include/xmlsec/nodeset.h
index 76304670..104e04fa 100644
--- a/include/xmlsec/nodeset.h
+++ b/include/xmlsec/nodeset.h
@@ -1,48 +1,48 @@
-/**
+/**
* 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__
+#define __XMLSEC_NODESET_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <xmlsec/xmlsec.h>
-typedef struct _xmlSecNodeSet xmlSecNodeSet, *xmlSecNodeSetPtr;
+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.
- *
+ * @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,
+ xmlSecNodeSetTreeWithoutComments,
xmlSecNodeSetTreeInvert,
xmlSecNodeSetTreeWithoutCommentsInvert,
xmlSecNodeSetList
@@ -50,10 +50,10 @@ typedef enum {
/**
* xmlSecNodeSetOp:
- * @xmlSecNodeSetIntersection: intersection.
- * @xmlSecNodeSetSubtraction: subtraction.
- * @xmlSecNodeSetUnion: union.
- *
+ * @xmlSecNodeSetIntersection: intersection.
+ * @xmlSecNodeSetSubtraction: subtraction.
+ * @xmlSecNodeSetUnion: union.
+ *
* The simple nodes sets operations.
*/
typedef enum {
@@ -64,73 +64,73 @@ typedef enum {
/**
* 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).
+ * @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;
+ 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.
+ * @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);
+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);
-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 */
diff --git a/include/xmlsec/nss/Makefile.in b/include/xmlsec/nss/Makefile.in
index cd99f9db..8f7952d3 100644
--- a/include/xmlsec/nss/Makefile.in
+++ b/include/xmlsec/nss/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -38,13 +38,22 @@ 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)/configure.in
+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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -68,6 +77,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(xmlsecnssincdir)"
HEADERS = $(xmlsecnssinc_HEADERS)
ETAGS = etags
@@ -75,6 +90,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -89,6 +105,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -97,6 +114,10 @@ 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@
@@ -127,6 +148,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
@@ -158,8 +180,10 @@ 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_ENABLED = @PKG_CONFIG_ENABLED@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
@@ -167,7 +191,6 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
-U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
@@ -186,6 +209,8 @@ 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@
@@ -195,6 +220,7 @@ 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@
@@ -230,6 +256,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -262,7 +289,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -346,9 +372,7 @@ 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
+ dir='$(DESTDIR)$(xmlsecnssincdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -449,10 +473,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/include/xmlsec/nss/app.h b/include/xmlsec/nss/app.h
index b78492ff..387d34ec 100644
--- a/include/xmlsec/nss/app.h
+++ b/include/xmlsec/nss/app.h
@@ -1,18 +1,18 @@
-/**
+/**
* 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__
+#define __XMLSEC_NSS_APP_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <nspr.h>
#include <nss.h>
@@ -22,87 +22,93 @@ extern "C" {
#include <xmlsec/keysmngr.h>
#include <xmlsec/transforms.h>
-/**
+/********************************************************************
+ *
* Init/shutdown
- */
-XMLSEC_CRYPTO_EXPORT int xmlSecNssAppInit (const char* config);
-XMLSEC_CRYPTO_EXPORT int xmlSecNssAppShutdown (void);
+ *
+ ********************************************************************/
+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);
+ *
+ ********************************************************************/
+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);
+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);
+ *
+ ********************************************************************/
+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);
+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);
+XMLSEC_CRYPTO_EXPORT void* xmlSecNssAppGetDefaultPwdCallback(void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/nss/bignum.h b/include/xmlsec/nss/bignum.h
index b5d98bc0..6147d20a 100644
--- a/include/xmlsec/nss/bignum.h
+++ b/include/xmlsec/nss/bignum.h
@@ -1,33 +1,33 @@
-/**
+/**
* 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__
+#define __XMLSEC_NSS_BIGNUM_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#include <libxml/tree.h>
+#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);
+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
}
diff --git a/include/xmlsec/nss/crypto.h b/include/xmlsec/nss/crypto.h
index 42ba6ca9..a1c11948 100644
--- a/include/xmlsec/nss/crypto.h
+++ b/include/xmlsec/nss/crypto.h
@@ -1,18 +1,18 @@
-/**
+/**
* 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__
+#define __XMLSEC_NSS_CRYPTO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <nspr.h>
#include <nss.h>
@@ -23,25 +23,27 @@ extern "C" {
#include <xmlsec/transforms.h>
#include <xmlsec/dl.h>
-XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_nss(void);
+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 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);
@@ -53,68 +55,68 @@ XMLSEC_CRYPTO_EXPORT PK11SlotInfo * xmlSecNssGetInternalKeySlot(void);
#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);
+ 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);
+ xmlSecNssTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes128CbcGetKlass(void);
/**
* xmlSecNssTransformAes192CbcId:
- *
+ *
* The AES192 CBC cipher transform klass.
*/
#define xmlSecNssTransformAes192CbcId \
- xmlSecNssTransformAes192CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes192CbcGetKlass(void);
+ xmlSecNssTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes192CbcGetKlass(void);
/**
* xmlSecNssTransformAes256CbcId:
- *
+ *
* The AES256 CBC cipher transform klass.
*/
#define xmlSecNssTransformAes256CbcId \
- xmlSecNssTransformAes256CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes256CbcGetKlass(void);
+ xmlSecNssTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformAes256CbcGetKlass(void);
/**
* xmlSecNssTransformKWAes128Id:
- *
+ *
* The AES 128 key wrap transform klass.
*/
#define xmlSecNssTransformKWAes128Id \
- xmlSecNssTransformKWAes128GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes128GetKlass(void);
+ xmlSecNssTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes128GetKlass(void);
/**
* xmlSecNssTransformKWAes192Id:
- *
+ *
* The AES 192 key wrap transform klass.
*/
#define xmlSecNssTransformKWAes192Id \
- xmlSecNssTransformKWAes192GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes192GetKlass(void);
+ xmlSecNssTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes192GetKlass(void);
/**
* xmlSecNssTransformKWAes256Id:
- *
+ *
* The AES 256 key wrap transform klass.
*/
#define xmlSecNssTransformKWAes256Id \
- xmlSecNssTransformKWAes256GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes256GetKlass(void);
+ xmlSecNssTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes256GetKlass(void);
#endif /* XMLSEC_NO_AES */
@@ -126,32 +128,32 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWAes256GetKlass(void);
#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);
+ 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()
+ xmlSecNssTransformDes3CbcGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformDes3CbcGetKlass(void);
/**
* xmlSecNssTransformKWDes3Id:
-*
-* The DES3 CBC cipher transform klass.
-*/
+*
+* The DES3 KW transform klass.
+*/
#define xmlSecNssTransformKWDes3Id \
- xmlSecNssTransformKWDes3GetKlass()
+ xmlSecNssTransformKWDes3GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWDes3GetKlass(void);
@@ -166,20 +168,20 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformKWDes3GetKlass(void);
/**
* xmlSecNssKeyDataDsaId:
- *
+ *
* The DSA key klass.
*/
#define xmlSecNssKeyDataDsaId \
- xmlSecNssKeyDataDsaGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataDsaGetKlass (void);
+ xmlSecNssKeyDataDsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataDsaGetKlass (void);
/**
* xmlSecNssTransformDsaSha1Id:
- *
+ *
* The DSA SHA1 signature transform klass.
*/
#define xmlSecNssTransformDsaSha1Id \
- xmlSecNssTransformDsaSha1GetKlass()
+ xmlSecNssTransformDsaSha1GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformDsaSha1GetKlass(void);
#endif /* XMLSEC_NO_DSA */
@@ -195,43 +197,82 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformDsaSha1GetKlass(void);
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);
+ 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()
+ 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()
+ 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()
+ 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 */
@@ -246,44 +287,92 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformHmacSha1GetKlass(void);
/**
* xmlSecNssKeyDataRsaId:
- *
+ *
* The RSA key klass.
*/
#define xmlSecNssKeyDataRsaId \
- xmlSecNssKeyDataRsaGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataRsaGetKlass (void);
+ 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()
+#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
-/* RSA OAEP is not supported by NSS yet */
-#ifdef TODO
-/**
- * xmlSecNssTransformRsaOaepId:
- *
- * The RSA OAEP key transport transform klass.
- */
-
-#define xmlSecNssTransformRsaOaepId \
- xmlSecNssTransformRsaOaepGetKlass()
+ 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 /* TODO: RSA OAEP is not supported by NSS yet */
+#endif /* XMLSEC_NSS_RSA_OAEP_TODO */
#endif /* XMLSEC_NO_RSA */
@@ -296,18 +385,85 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformRsaOaepGetKlass(void);
#ifndef XMLSEC_NO_SHA1
/**
* xmlSecNssTransformSha1Id:
- *
+ *
* The SHA1 digest transform klass.
*/
#define xmlSecNssTransformSha1Id \
- xmlSecNssTransformSha1GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecNssTransformSha1GetKlass (void);
+ 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__
+#define __XMLSEC_NSS_CRYPTO_H__
diff --git a/include/xmlsec/nss/keysstore.h b/include/xmlsec/nss/keysstore.h
index 10e6bb38..a2cc289b 100644
--- a/include/xmlsec/nss/keysstore.h
+++ b/include/xmlsec/nss/keysstore.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_NSS_KEYSSTORE_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
@@ -27,16 +27,16 @@ extern "C" {
*
* 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);
+#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
}
diff --git a/include/xmlsec/nss/pkikeys.h b/include/xmlsec/nss/pkikeys.h
index fd4a6e8a..cb498482 100644
--- a/include/xmlsec/nss/pkikeys.h
+++ b/include/xmlsec/nss/pkikeys.h
@@ -1,17 +1,17 @@
-/**
+/**
* 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__
+#define __XMLSEC_NSS_PKIKEYS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <nspr.h>
#include <nss.h>
@@ -21,17 +21,17 @@ extern "C" {
#include <xmlsec/transforms.h>
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssPKIAdoptKey (SECKEYPrivateKey *privkey,
- SECKEYPublicKey *pubkey);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecNssPKIAdoptKey (SECKEYPrivateKey *privkey,
+ SECKEYPublicKey *pubkey);
-XMLSEC_CRYPTO_EXPORT SECKEYPublicKey* xmlSecNssPKIKeyDataGetPubKey (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT SECKEYPublicKey* xmlSecNssPKIKeyDataGetPubKey (xmlSecKeyDataPtr data);
-XMLSEC_CRYPTO_EXPORT SECKEYPrivateKey* xmlSecNssPKIKeyDataGetPrivKey (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT SECKEYPrivateKey* xmlSecNssPKIKeyDataGetPrivKey (xmlSecKeyDataPtr data);
-XMLSEC_CRYPTO_EXPORT KeyType xmlSecNssPKIKeyDataGetKeyType (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT KeyType xmlSecNssPKIKeyDataGetKeyType (xmlSecKeyDataPtr data);
-XMLSEC_CRYPTO_EXPORT int xmlSecNssPKIKeyDataDuplicate (xmlSecKeyDataPtr dst,
- xmlSecKeyDataPtr src);
+XMLSEC_CRYPTO_EXPORT int xmlSecNssPKIKeyDataDuplicate (xmlSecKeyDataPtr dst,
+ xmlSecKeyDataPtr src);
diff --git a/include/xmlsec/nss/symbols.h b/include/xmlsec/nss/symbols.h
index b01a1fa1..9520cb83 100644
--- a/include/xmlsec/nss/symbols.h
+++ b/include/xmlsec/nss/symbols.h
@@ -1,14 +1,14 @@
-/**
+/**
* 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__
+#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
@@ -17,76 +17,83 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-/**
- * Defines for writing simple code
- */
#ifdef XMLSEC_CRYPTO_NSS
-/**
+/********************************************************************
+ *
* Crypto Init/shutdown
- */
-#define xmlSecCryptoInit xmlSecNssInit
-#define xmlSecCryptoShutdown xmlSecNssShutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecNssInit
+#define xmlSecCryptoShutdown xmlSecNssShutdown
-#define xmlSecCryptoKeysMngrInit xmlSecNssKeysMngrInit
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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 */
@@ -96,4 +103,4 @@ extern "C" {
#endif /* __XMLSEC_NSS_CRYPTO_H__ */
-#define __XMLSEC_NSS_CRYPTO_H__
+#define __XMLSEC_NSS_CRYPTO_H__
diff --git a/include/xmlsec/nss/x509.h b/include/xmlsec/nss/x509.h
index 1e3ba5e7..fe5ceb4a 100644
--- a/include/xmlsec/nss/x509.h
+++ b/include/xmlsec/nss/x509.h
@@ -1,17 +1,17 @@
-/**
+/**
* 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__
+#define __XMLSEC_NSS_X509_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#ifndef XMLSEC_NO_X509
@@ -25,60 +25,60 @@ extern "C" {
/**
* xmlSecNssKeyDataX509Id:
- *
+ *
* The NSS X509 data klass.
*/
#define xmlSecNssKeyDataX509Id \
- xmlSecNssKeyDataX509GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataX509GetKlass(void);
+ 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 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 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);
+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);
+ xmlSecNssKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecNssKeyDataRawX509CertGetKlass(void);
/**
* xmlSecNssX509StoreId:
- *
+ *
* The NSS X509 store klass.
*/
#define xmlSecNssX509StoreId \
- xmlSecNssX509StoreGetKlass()
+ 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,
+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);
diff --git a/include/xmlsec/openssl/Makefile.in b/include/xmlsec/openssl/Makefile.in
index 6530e925..e8bfe4cc 100644
--- a/include/xmlsec/openssl/Makefile.in
+++ b/include/xmlsec/openssl/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -38,13 +38,22 @@ 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)/configure.in
+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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -68,6 +77,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(xmlsecopensslincdir)"
HEADERS = $(xmlsecopensslinc_HEADERS)
ETAGS = etags
@@ -75,6 +90,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -89,6 +105,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -97,6 +114,10 @@ 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@
@@ -127,6 +148,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
@@ -158,8 +180,10 @@ 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_ENABLED = @PKG_CONFIG_ENABLED@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
@@ -167,7 +191,6 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
-U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
@@ -186,6 +209,8 @@ 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@
@@ -195,6 +220,7 @@ 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@
@@ -230,6 +256,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -262,7 +289,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -345,9 +371,7 @@ 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
+ dir='$(DESTDIR)$(xmlsecopensslincdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -448,10 +472,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/include/xmlsec/openssl/app.h b/include/xmlsec/openssl/app.h
index d781af2b..2fd70e8e 100644
--- a/include/xmlsec/openssl/app.h
+++ b/include/xmlsec/openssl/app.h
@@ -1,17 +1,17 @@
-/**
+/**
* 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__
+#define __XMLSEC_OPENSSL_APP_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <openssl/pem.h>
#include <openssl/bio.h>
@@ -21,96 +21,102 @@ extern "C" {
#include <xmlsec/keysmngr.h>
#include <xmlsec/transforms.h>
-/**
+/********************************************************************
+ *
* Init/shutdown
- */
-XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppInit (const char* config);
-XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLAppShutdown (void);
+ *
+ ********************************************************************/
+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);
+ *
+ *******************************************************************/
+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 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);
+ *
+ ********************************************************************/
+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);
+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);
+XMLSEC_CRYPTO_EXPORT void* xmlSecOpenSSLAppGetDefaultPwdCallback(void);
#ifdef __cplusplus
diff --git a/include/xmlsec/openssl/bn.h b/include/xmlsec/openssl/bn.h
index b6ec4615..bdb9c7cb 100644
--- a/include/xmlsec/openssl/bn.h
+++ b/include/xmlsec/openssl/bn.h
@@ -1,31 +1,31 @@
-/**
+/**
* 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__
+#define __XMLSEC_BN_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <openssl/bn.h>
-#include <libxml/tree.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);
+XMLSEC_CRYPTO_EXPORT BIGNUM* xmlSecOpenSSLNodeGetBNValue (const xmlNodePtr cur,
+ BIGNUM **a);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLNodeSetBNValue (xmlNodePtr cur,
+ const BIGNUM *a,
+ int addLineBreaks);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/openssl/crypto.h b/include/xmlsec/openssl/crypto.h
index 4fe0ca7f..aec5fb31 100644
--- a/include/xmlsec/openssl/crypto.h
+++ b/include/xmlsec/openssl/crypto.h
@@ -1,17 +1,17 @@
-/**
+/**
* 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__
+#define __XMLSEC_OPENSSL_CRYPTO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <xmlsec/xmlsec.h>
#include <xmlsec/keys.h>
@@ -20,33 +20,22 @@ extern "C" {
#include <openssl/err.h>
-/* OpenSSL 0.9.6 and 0.9.7 do not have SHA 224/256/384/512 */
-#if defined(XMLSEC_OPENSSL_096) || defined(XMLSEC_OPENSSL_097)
-#define XMLSEC_NO_SHA224 1
-#define XMLSEC_NO_SHA256 1
-#define XMLSEC_NO_SHA384 1
-#define XMLSEC_NO_SHA512 1
-#endif /* defined(XMLSEC_OPENSSL_096) || defined(XMLSEC_OPENSSL_097) */
-
-/* OpenSSL 0.9.6 does not have AES */
-#if defined(XMLSEC_OPENSSL_096)
-#define XMLSEC_NO_AES 1
-#endif /* XMLSEC_OPENSSL_096 */
+XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_openssl(void);
-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 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 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);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLSetDefaultTrustedCertsFolder(const xmlChar* path);
+XMLSEC_CRYPTO_EXPORT const xmlChar* xmlSecOpenSSLGetDefaultTrustedCertsFolder(void);
/********************************************************************
*
@@ -56,68 +45,68 @@ XMLSEC_CRYPTO_EXPORT const xmlChar* xmlSecOpenSSLGetDefaultTrustedCertsFolder(vo
#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);
+ 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);
+ xmlSecOpenSSLTransformAes128CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes128CbcGetKlass(void);
/**
* xmlSecOpenSSLTransformAes192CbcId:
- *
+ *
* The AES192 CBC cipher transform klass.
*/
#define xmlSecOpenSSLTransformAes192CbcId \
- xmlSecOpenSSLTransformAes192CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes192CbcGetKlass(void);
+ xmlSecOpenSSLTransformAes192CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes192CbcGetKlass(void);
/**
* xmlSecOpenSSLTransformAes256CbcId:
- *
+ *
* The AES256 CBC cipher transform klass.
*/
#define xmlSecOpenSSLTransformAes256CbcId \
- xmlSecOpenSSLTransformAes256CbcGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes256CbcGetKlass(void);
+ xmlSecOpenSSLTransformAes256CbcGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformAes256CbcGetKlass(void);
/**
* xmlSecOpenSSLTransformKWAes128Id:
- *
+ *
* The AES 128 key wrap transform klass.
*/
#define xmlSecOpenSSLTransformKWAes128Id \
- xmlSecOpenSSLTransformKWAes128GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes128GetKlass(void);
+ xmlSecOpenSSLTransformKWAes128GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes128GetKlass(void);
/**
* xmlSecOpenSSLTransformKWAes192Id:
- *
+ *
* The AES 192 key wrap transform klass.
*/
#define xmlSecOpenSSLTransformKWAes192Id \
- xmlSecOpenSSLTransformKWAes192GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes192GetKlass(void);
+ xmlSecOpenSSLTransformKWAes192GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes192GetKlass(void);
/**
* xmlSecOpenSSLTransformKWAes256Id:
- *
+ *
* The AES 256 key wrap transform klass.
*/
#define xmlSecOpenSSLTransformKWAes256Id \
- xmlSecOpenSSLTransformKWAes256GetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes256GetKlass(void);
+ xmlSecOpenSSLTransformKWAes256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes256GetKlass(void);
#endif /* XMLSEC_NO_AES */
@@ -129,32 +118,33 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWAes256GetKlass(vo
#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);
+ 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()
+ xmlSecOpenSSLTransformDes3CbcGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDes3CbcGetKlass(void);
/**
* xmlSecOpenSSLTransformKWDes3Id:
- *
- * The DES3 CBC cipher transform klass.
+ *
+ * The DES3 KW transform klass.
*/
#define xmlSecOpenSSLTransformKWDes3Id \
- xmlSecOpenSSLTransformKWDes3GetKlass()
+ xmlSecOpenSSLTransformKWDes3GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWDes3GetKlass(void);
+
#endif /* XMLSEC_NO_DES */
/********************************************************************
@@ -168,34 +158,163 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWDes3GetKlass(void
/**
* 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);
+ 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()
+ xmlSecOpenSSLTransformDsaSha1GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDsaSha1GetKlass(void);
#endif /* XMLSEC_NO_SHA1 */
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecOpenSSLTransformDsaSha256Id:
+ *
+ * The DSA SHA256 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformDsaSha256Id \
+ xmlSecOpenSSLTransformDsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
#endif /* XMLSEC_NO_DSA */
/********************************************************************
*
+ * ECDSA transforms
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_ECDSA
+#include <openssl/ecdsa.h>
+#include <openssl/evp.h>
+
+/**
+ * xmlSecOpenSSLKeyDataEcdsaId:
+ *
+ * The ECDSA key klass.
+ */
+#define xmlSecOpenSSLKeyDataEcdsaId \
+ xmlSecOpenSSLKeyDataEcdsaGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataEcdsaGetKlass (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataEcdsaAdoptEcdsa (xmlSecKeyDataPtr data,
+ EC_KEY* ecdsa);
+XMLSEC_CRYPTO_EXPORT EC_KEY* xmlSecOpenSSLKeyDataEcdsaGetEcdsa (xmlSecKeyDataPtr data);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataEcdsaAdoptEvp (xmlSecKeyDataPtr data,
+ EVP_PKEY* pKey);
+XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLKeyDataEcdsaGetEvp (xmlSecKeyDataPtr data);
+
+#ifndef XMLSEC_NO_SHA1
+/**
+ * xmlSecOpenSSLTransformEcdsaSha1Id:
+ *
+ * The ECDSA-SHA1 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformEcdsaSha1Id \
+ xmlSecOpenSSLTransformEcdsaSha1GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformEcdsaSha1GetKlass(void);
+#endif /* XMLSEC_NO_SHA1 */
+
+#ifndef XMLSEC_NO_SHA224
+/**
+ * xmlSecOpenSSLTransformEcdsaSha224Id:
+ *
+ * The ECDSA-SHA224 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformEcdsaSha224Id \
+ xmlSecOpenSSLTransformEcdsaSha224GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformEcdsaSha224GetKlass(void);
+#endif /* XMLSEC_NO_SHA224 */
+
+#ifndef XMLSEC_NO_SHA256
+/**
+ * xmlSecOpenSSLTransformEcdsaSha256Id:
+ *
+ * The ECDSA-SHA256 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformEcdsaSha256Id \
+ xmlSecOpenSSLTransformEcdsaSha256GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformEcdsaSha256GetKlass(void);
+#endif /* XMLSEC_NO_SHA256 */
+
+#ifndef XMLSEC_NO_SHA384
+/**
+ * xmlSecOpenSSLTransformEcdsaSha384Id:
+ *
+ * The ECDSA-SHA384 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformEcdsaSha384Id \
+ xmlSecOpenSSLTransformEcdsaSha384GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformEcdsaSha384GetKlass(void);
+#endif /* XMLSEC_NO_SHA384 */
+
+#ifndef XMLSEC_NO_SHA512
+/**
+ * xmlSecOpenSSLTransformEcdsaSha512Id:
+ *
+ * The ECDSA-SHA512 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformEcdsaSha512Id \
+ xmlSecOpenSSLTransformEcdsaSha512GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformEcdsaSha512GetKlass(void);
+#endif /* XMLSEC_NO_SHA512 */
+
+#endif /* XMLSEC_NO_ECDSA */
+
+/********************************************************************
+ *
+ * GOST2001 transform
+ *
+ *******************************************************************/
+#ifndef XMLSEC_NO_GOST
+
+/**
+ * xmlSecOpenSSLKeyDataGost2001Id:
+ *
+ * The GOST2001 key klass.
+ */
+#define xmlSecOpenSSLKeyDataGost2001Id \
+ xmlSecOpenSSLKeyDataGost2001GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataGost2001GetKlass (void);
+
+/**
+ * xmlSecOpenSSLTransformGost2001GostR3411_94Id:
+ *
+ * The GOST2001 GOSTR3411_94 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformGost2001GostR3411_94Id \
+ xmlSecOpenSSLTransformGost2001GostR3411_94GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformGost2001GostR3411_94GetKlass(void);
+
+
+/**
+ * xmlSecOpenSSLTransformGostR3411_94Id:
+ *
+ * The GOSTR3411_94 signature transform klass.
+ */
+#define xmlSecOpenSSLTransformGostR3411_94Id \
+ xmlSecOpenSSLTransformGostR3411_94GetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformGostR3411_94GetKlass(void);
+
+#endif /* XMLSEC_NO_GOST */
+
+/********************************************************************
+ *
* HMAC transforms
*
*******************************************************************/
@@ -204,92 +323,92 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDsaSha1GetKlass(voi
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);
+ xmlSecOpenSSLKeyDataHmacGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataHmacGetKlass(void);
+XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLKeyDataHmacSet (xmlSecKeyDataPtr data,
+ const xmlSecByte* buf,
+ xmlSecSize bufSize);
-#ifndef XMLSEC_NO_MD5
+#ifndef XMLSEC_NO_MD5
/**
* xmlSecOpenSSLTransformHmacMd5Id:
- *
+ *
* The HMAC with MD5 signature transform klass.
*/
#define xmlSecOpenSSLTransformHmacMd5Id \
- xmlSecOpenSSLTransformHmacMd5GetKlass()
+ 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()
+ 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()
+ 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()
+ 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()
+ 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()
+ 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()
+ xmlSecOpenSSLTransformHmacSha512GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha512GetKlass(void);
#endif /* XMLSEC_NO_SHA512 */
@@ -303,11 +422,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformHmacSha512GetKlass(
#ifndef XMLSEC_NO_MD5
/**
* xmlSecOpenSSLTransformMd5Id:
- *
+ *
* The MD5 digest transform klass.
*/
#define xmlSecOpenSSLTransformMd5Id \
- xmlSecOpenSSLTransformMd5GetKlass()
+ xmlSecOpenSSLTransformMd5GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformMd5GetKlass(void);
#endif /* XMLSEC_NO_MD5 */
@@ -320,11 +439,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformMd5GetKlass(void);
#ifndef XMLSEC_NO_RIPEMD160
/**
* xmlSecOpenSSLTransformRipemd160Id:
- *
+ *
* The RIPEMD160 digest transform klass.
*/
#define xmlSecOpenSSLTransformRipemd160Id \
- xmlSecOpenSSLTransformRipemd160GetKlass()
+ xmlSecOpenSSLTransformRipemd160GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRipemd160GetKlass(void);
#endif /* XMLSEC_NO_RIPEMD160 */
@@ -339,112 +458,112 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRipemd160GetKlass(v
/**
* 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);
+ 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()
+#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()
+#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()
+#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()
+#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()
+#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()
+#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()
+#define xmlSecOpenSSLTransformRsaSha512Id \
+ xmlSecOpenSSLTransformRsaSha512GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaSha512GetKlass(void);
#endif /* XMLSEC_NO_SHA512 */
/**
* xmlSecOpenSSLTransformRsaPkcs1Id:
- *
+ *
* The RSA PKCS1 key transport transform klass.
*/
#define xmlSecOpenSSLTransformRsaPkcs1Id \
- xmlSecOpenSSLTransformRsaPkcs1GetKlass()
+ xmlSecOpenSSLTransformRsaPkcs1GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaPkcs1GetKlass(void);
/**
* xmlSecOpenSSLTransformRsaOaepId:
- *
+ *
* The RSA PKCS1 key transport transform klass.
*/
#define xmlSecOpenSSLTransformRsaOaepId \
- xmlSecOpenSSLTransformRsaOaepGetKlass()
+ xmlSecOpenSSLTransformRsaOaepGetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaOaepGetKlass(void);
#endif /* XMLSEC_NO_RSA */
@@ -458,11 +577,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRsaOaepGetKlass(voi
#ifndef XMLSEC_NO_SHA1
/**
* xmlSecOpenSSLTransformSha1Id:
- *
+ *
* The SHA1 digest transform klass.
*/
#define xmlSecOpenSSLTransformSha1Id \
- xmlSecOpenSSLTransformSha1GetKlass()
+ xmlSecOpenSSLTransformSha1GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha1GetKlass(void);
#endif /* XMLSEC_NO_SHA1 */
@@ -475,11 +594,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha1GetKlass(void);
#ifndef XMLSEC_NO_SHA224
/**
* xmlSecOpenSSLTransformSha224Id:
- *
+ *
* The SHA224 digest transform klass.
*/
#define xmlSecOpenSSLTransformSha224Id \
- xmlSecOpenSSLTransformSha224GetKlass()
+ xmlSecOpenSSLTransformSha224GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha224GetKlass(void);
#endif /* XMLSEC_NO_SHA224 */
@@ -492,11 +611,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha224GetKlass(void
#ifndef XMLSEC_NO_SHA256
/**
* xmlSecOpenSSLTransformSha256Id:
- *
+ *
* The SHA256 digest transform klass.
*/
#define xmlSecOpenSSLTransformSha256Id \
- xmlSecOpenSSLTransformSha256GetKlass()
+ xmlSecOpenSSLTransformSha256GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha256GetKlass(void);
#endif /* XMLSEC_NO_SHA256 */
@@ -508,11 +627,11 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha256GetKlass(void
#ifndef XMLSEC_NO_SHA384
/**
* xmlSecOpenSSLTransformSha384Id:
- *
+ *
* The SHA384 digest transform klass.
*/
#define xmlSecOpenSSLTransformSha384Id \
- xmlSecOpenSSLTransformSha384GetKlass()
+ xmlSecOpenSSLTransformSha384GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha384GetKlass(void);
#endif /* XMLSEC_NO_SHA384 */
@@ -524,20 +643,19 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha384GetKlass(void
#ifndef XMLSEC_NO_SHA512
/**
* xmlSecOpenSSLTransformSha512Id:
- *
+ *
* The SHA512 digest transform klass.
*/
#define xmlSecOpenSSLTransformSha512Id \
- xmlSecOpenSSLTransformSha512GetKlass()
+ xmlSecOpenSSLTransformSha512GetKlass()
XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha512GetKlass(void);
#endif /* XMLSEC_NO_SHA512 */
-
/**************************************************************
*
- * Error constants for OpenSSL
+ * Error constants for OpenSSL
*
*************************************************************/
/**
@@ -545,22 +663,22 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformSha512GetKlass(void
*
* Macro. The XMLSec library klass for OpenSSL errors reporting functions.
*/
-#define XMLSEC_OPENSSL_ERRORS_LIB (ERR_LIB_USER + 57)
+#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
+#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);
+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
}
@@ -568,4 +686,4 @@ XMLSEC_CRYPTO_EXPORT void xmlSecOpenSSLErrorsDefaultCallback (const char* file,
#endif /* __XMLSEC_OPENSSL_CRYPTO_H__ */
-#define __XMLSEC_OPENSSL_CRYPTO_H__
+#define __XMLSEC_OPENSSL_CRYPTO_H__
diff --git a/include/xmlsec/openssl/evp.h b/include/xmlsec/openssl/evp.h
index 4270bf0f..30db8f43 100644
--- a/include/xmlsec/openssl/evp.h
+++ b/include/xmlsec/openssl/evp.h
@@ -1,17 +1,17 @@
-/**
+/**
* 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__
+#define __XMLSEC_OPENSSL_EVP_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <openssl/evp.h>
@@ -22,17 +22,17 @@ extern "C" {
#include <xmlsec/openssl/crypto.h>
-XMLSEC_CRYPTO_EXPORT int xmlSecOpenSSLEvpKeyDataAdoptEvp (xmlSecKeyDataPtr data,
- EVP_PKEY* pKey);
-XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDataGetEvp (xmlSecKeyDataPtr data);
+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);
+XMLSEC_CRYPTO_EXPORT EVP_PKEY* xmlSecOpenSSLEvpKeyDup (EVP_PKEY* pKey);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecOpenSSLEvpKeyAdopt (EVP_PKEY *pKey);
#ifdef __cplusplus
diff --git a/include/xmlsec/openssl/symbols.h b/include/xmlsec/openssl/symbols.h
index 295c2342..15ae9b96 100644
--- a/include/xmlsec/openssl/symbols.h
+++ b/include/xmlsec/openssl/symbols.h
@@ -1,13 +1,13 @@
-/**
+/**
* 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__
+#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
@@ -15,95 +15,112 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-/**
- * Defines for writing simple code
- */
#ifdef XMLSEC_CRYPTO_OPENSSL
-/**
+/********************************************************************
+ *
* Crypto Init/shutdown
- */
-#define xmlSecCryptoInit xmlSecOpenSSLInit
-#define xmlSecCryptoShutdown xmlSecOpenSSLShutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecOpenSSLInit
+#define xmlSecCryptoShutdown xmlSecOpenSSLShutdown
-#define xmlSecCryptoKeysMngrInit xmlSecOpenSSLKeysMngrInit
+#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
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecOpenSSLKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecOpenSSLKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecOpenSSLKeyDataDsaId
+#define xmlSecKeyDataEcdsaId xmlSecOpenSSLKeyDataEcdsaId
+#define xmlSecKeyDataHmacId xmlSecOpenSSLKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecOpenSSLKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecOpenSSLKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecOpenSSLKeyDataRawX509CertId
-/**
+/********************************************************************
+ *
* Key data store ids
- */
-#define xmlSecX509StoreId xmlSecOpenSSLX509StoreId
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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 xmlSecTransformDsaSha256Id xmlSecOpenSSLTransformDsaSha256Id
+#define xmlSecTransformEcdsaSha1Id xmlSecOpenSSLTransformEcdsaSha1Id
+#define xmlSecTransformEcdsaSha224Id xmlSecOpenSSLTransformEcdsaSha224Id
+#define xmlSecTransformEcdsaSha256Id xmlSecOpenSSLTransformEcdsaSha256Id
+#define xmlSecTransformEcdsaSha384Id xmlSecOpenSSLTransformEcdsaSha384Id
+#define xmlSecTransformEcdsaSha512Id xmlSecOpenSSLTransformEcdsaSha512Id
+#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
+#define xmlSecTransformGost2001GostR3411_94Id xmlSecOpenSSLTransformGost2001GostR3411_94Id
+#define xmlSecTransformGostR3411_94Id xmlSecOpenSSLTransformGostR3411_94Id
-/**
+
+/********************************************************************
+ *
* 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
+ *
+ ********************************************************************/
+#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
+#define xmlSecCryptoAppKeysMngrAddCertsPath xmlSecOpenSSLAppKeysMngrAddCertsPath
#endif /* XMLSEC_CRYPTO_OPENSSL */
@@ -113,4 +130,4 @@ extern "C" {
#endif /* __XMLSEC_OPENSSL_CRYPTO_H__ */
-#define __XMLSEC_OPENSSL_CRYPTO_H__
+#define __XMLSEC_OPENSSL_CRYPTO_H__
diff --git a/include/xmlsec/openssl/x509.h b/include/xmlsec/openssl/x509.h
index ce0b4d08..6da3281a 100644
--- a/include/xmlsec/openssl/x509.h
+++ b/include/xmlsec/openssl/x509.h
@@ -1,17 +1,17 @@
-/**
+/**
* 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__
+#define __XMLSEC_OPENSSL_X509_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#ifndef XMLSEC_NO_X509
@@ -26,77 +26,77 @@ extern "C" {
*
* Macro. To make docbook happy.
*/
-#define XMLSEC_STACK_OF_X509 STACK_OF(X509)
+#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)
+#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);
+ 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 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 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 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);
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr xmlSecOpenSSLX509CertGetKey (X509* cert);
/**
* xmlSecOpenSSLKeyDataRawX509CertId:
- *
+ *
* The OpenSSL raw X509 certificate klass.
*/
#define xmlSecOpenSSLKeyDataRawX509CertId \
- xmlSecOpenSSLKeyDataRawX509CertGetKlass()
-XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataRawX509CertGetKlass(void);
+ xmlSecOpenSSLKeyDataRawX509CertGetKlass()
+XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecOpenSSLKeyDataRawX509CertGetKlass(void);
/**
* xmlSecOpenSSLX509StoreId:
- *
+ *
* The OpenSSL X509 store klass.
*/
#define xmlSecOpenSSLX509StoreId \
- xmlSecOpenSSLX509StoreGetKlass()
+ 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 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);
diff --git a/include/xmlsec/parser.h b/include/xmlsec/parser.h
index 754c9072..182f2951 100644
--- a/include/xmlsec/parser.h
+++ b/include/xmlsec/parser.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_PARSER_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -21,26 +21,26 @@ extern "C" {
#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);
+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);
+ xmlSecTransformXmlParserGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXmlParserGetKlass (void);
#ifdef __cplusplus
diff --git a/include/xmlsec/private.h b/include/xmlsec/private.h
index 5d5fc77f..74e6de1a 100644
--- a/include/xmlsec/private.h
+++ b/include/xmlsec/private.h
@@ -1,16 +1,16 @@
-/**
+/**
* 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
+ * 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__
+#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"
@@ -18,7 +18,7 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <libxml/xmlIO.h>
@@ -38,28 +38,28 @@ extern "C" {
/**
* xmlSecCryptoInitMethod:
*
- * xmlsec-crypto libraryinitialization method.
+ * xmlsec-crypto libraryinitialization method.
*
* Returns: 0 on success or a negative value otherwise.
*/
-typedef int (*xmlSecCryptoInitMethod) (void);
+typedef int (*xmlSecCryptoInitMethod) (void);
/**
* xmlSecCryptoShutdownMethod:
- *
- * xmlsec-crypto library shutdown method.
+ *
+ * xmlsec-crypto library shutdown method.
*
* Returns: 0 on success or a negative value otherwise.
*/
-typedef int (*xmlSecCryptoShutdownMethod) (void);
+typedef int (*xmlSecCryptoShutdownMethod) (void);
/**
* xmlSecCryptoKeysMngrInitMethod:
- * @mngr: the pointer to keys manager.
+ * @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);
+ */
+typedef int (*xmlSecCryptoKeysMngrInitMethod) (xmlSecKeysMngrPtr mngr);
/*****************************************************************************
*
@@ -71,11 +71,11 @@ typedef int (*xmlSecCryptoKeysMngrInitMethod) (xmlSecKeysMngrPtr mngr);
*
* Gets the key data klass.
*
- * Returns: pointer to key data klass or NULL if an error occurs
+ * 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);
+ */
+typedef xmlSecKeyDataId (*xmlSecCryptoKeyDataGetKlassMethod) (void);
/*****************************************************************************
*
@@ -87,11 +87,11 @@ typedef xmlSecKeyDataId (*xmlSecCryptoKeyDataGetKlassMethod) (void);
*
* Gets the key data store klass.
*
- * Returns: pointer to key data store klass or NULL if an error occurs
+ * 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);
+ */
+typedef xmlSecKeyDataStoreId (*xmlSecCryptoKeyDataStoreGetKlassMethod)(void);
/*****************************************************************************
*
@@ -103,170 +103,170 @@ typedef xmlSecKeyDataStoreId (*xmlSecCryptoKeyDataStoreGetKlassMethod)(void);
*
* Gets the transform klass.
*
- * Returns: pointer to transform klass or NULL if an error occurs
+ * 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);
-
+ */
+typedef xmlSecTransformId (*xmlSecCryptoTransformGetKlassMethod) (void);
+
/*****************************************************************************
*
* High level routines form xmlsec command line utility
*
- ****************************************************************************/
+ ****************************************************************************/
/**
* xmlSecCryptoAppInitMethod:
- * @config: the path to crypto library configuration.
+ * @config: the path to crypto library configuration.
*
* General crypto engine initialization. This function is used
- * by XMLSec command line utility and called before
+ * 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);
+typedef int (*xmlSecCryptoAppInitMethod) (const char* config);
/**
* xmlSecCryptoAppShutdownMethod:
- *
+ *
* General crypto engine shutdown. This function is used
- * by XMLSec command line utility and called after
+ * by XMLSec command line utility and called after
* @xmlSecShutdown function.
*
* Returns: 0 on success or a negative value otherwise.
*/
-typedef int (*xmlSecCryptoAppShutdownMethod) (void);
+typedef int (*xmlSecCryptoAppShutdownMethod) (void);
/**
* xmlSecCryptoAppDefaultKeysMngrInitMethod:
- * @mngr: the pointer to keys manager.
+ * @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);
+ */
+typedef int (*xmlSecCryptoAppDefaultKeysMngrInitMethod)
+ (xmlSecKeysMngrPtr mngr);
/**
* xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod:
- * @mngr: the pointer to keys manager.
- * @key: the pointer to key.
+ * @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);
+ */
+typedef int (*xmlSecCryptoAppDefaultKeysMngrAdoptKeyMethod)
+ (xmlSecKeysMngrPtr mngr,
+ xmlSecKeyPtr key);
/**
* xmlSecCryptoAppDefaultKeysMngrLoadMethod:
- * @mngr: the pointer to keys manager.
- * @uri: the uri.
+ * @mngr: the pointer to keys manager.
+ * @uri: the uri.
*
- * Loads XML keys file from @uri to the keys manager @mngr created
+ * 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);
+ */
+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).
+ * @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);
+ */
+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.
- *
+ * @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);
+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.
- *
+ * @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);
+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.
+ * @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);
+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.
+ * @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);
+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.
+ * @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
@@ -274,17 +274,17 @@ typedef xmlSecKeyPtr (*xmlSecCryptoAppKeyLoadMemoryMethod) (const xmlSecByte* d
*
* Returns: pointer to the key or NULL if an error occurs.
*/
-typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMethod) (const char* filename,
- const char* pwd,
- void* pwdCallback,
- void* pwdCallbackCtx);
+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.
+ * @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
@@ -292,187 +292,191 @@ typedef xmlSecKeyPtr (*xmlSecCryptoAppPkcs12LoadMethod) (const char* filename,
*
* 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);
+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.
+ * @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);
+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.
+ * @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);
-/**
+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.
+ * @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.
+ * @keyDataEcdsaGetKlass: the method to get pointer to ECDSA 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.
+ * @transformDsaSha256GetKlass: the method to get pointer to DSA-SHA256 signature transform.
+ * @transformEcdsaSha1GetKlass: the method to get pointer to ECDSA-SHA1 signature transform.
+ * @transformEcdsaSha224GetKlass: the method to get pointer to ECDSA-SHA224 signature transform.
+ * @transformEcdsaSha256GetKlass: the method to get pointer to ECDSA-SHA256 signature transform.
+ * @transformEcdsaSha384GetKlass: the method to get pointer to ECDSA-SHA384 signature transform.
+ * @transformEcdsaSha512GetKlass: the method to get pointer to ECDSA-SHA512 signature transform.
* @transformGost2001GostR3411_94GetKlass: the method to get pointer to GOST2001 transform.
- * @transformHmacMd5GetKlass: the method to get pointer to HMAC-MD5 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.
+ * @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.
+ * @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.
+ * @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.
+ * @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;
+ /* Crypto Init/shutdown */
+ xmlSecCryptoInitMethod cryptoInit;
+ xmlSecCryptoShutdownMethod cryptoShutdown;
+ xmlSecCryptoKeysMngrInitMethod cryptoKeysMngrInit;
+
+ /* Key data ids */
+ xmlSecCryptoKeyDataGetKlassMethod keyDataAesGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataDesGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataDsaGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataEcdsaGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataGost2001GetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataHmacGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataRsaGetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataX509GetKlass;
+ xmlSecCryptoKeyDataGetKlassMethod keyDataRawX509CertGetKlass;
- /**
- * 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;
- /**
- * 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 transformDsaSha256GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformEcdsaSha1GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformEcdsaSha224GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformEcdsaSha256GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformEcdsaSha384GetKlass;
+ xmlSecCryptoTransformGetKlassMethod transformEcdsaSha512GetKlass;
+ 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;
- /**
- * 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;
+ /* 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;
+ 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>
@@ -482,14 +486,14 @@ struct _xmlSecCryptoDLFunctions {
*
* Prints a string (see @xmlStrPrintf).
*/
-#define xmlSecStrPrintf xmlStrPrintf
+#define xmlSecStrPrintf xmlStrPrintf
/**
* xmlSecStrVPrintf:
*
* Prints a string (see @xmlStrVPrintf).
*/
-#define xmlSecStrVPrintf xmlStrVPrintf
+#define xmlSecStrVPrintf xmlStrVPrintf
#ifdef __cplusplus
}
diff --git a/include/xmlsec/private/Makefile.am b/include/xmlsec/private/Makefile.am
index aab78c82..74de46a8 100644
--- a/include/xmlsec/private/Makefile.am
+++ b/include/xmlsec/private/Makefile.am
@@ -3,6 +3,7 @@ NULL =
xmlsecprivateincdir = $(includedir)/xmlsec1/xmlsec/private
xmlsecprivateinc_HEADERS = \
+xslt.h \
xkms.h \
$(NULL)
diff --git a/include/xmlsec/private/Makefile.in b/include/xmlsec/private/Makefile.in
index 7bf66598..9b8edfdc 100644
--- a/include/xmlsec/private/Makefile.in
+++ b/include/xmlsec/private/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -38,13 +38,22 @@ 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)/configure.in
+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 = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -68,6 +77,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(xmlsecprivateincdir)"
HEADERS = $(xmlsecprivateinc_HEADERS)
ETAGS = etags
@@ -75,6 +90,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -89,6 +105,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -97,6 +114,10 @@ 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@
@@ -127,6 +148,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MOZILLA_MIN_VERSION = @MOZILLA_MIN_VERSION@
MSCRYPTO_CFLAGS = @MSCRYPTO_CFLAGS@
@@ -158,8 +180,10 @@ 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_ENABLED = @PKG_CONFIG_ENABLED@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RM = @RM@
SED = @SED@
@@ -167,7 +191,6 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TAR = @TAR@
-U = @U@
VERSION = @VERSION@
XMLSEC_APP_DEFINES = @XMLSEC_APP_DEFINES@
XMLSEC_CFLAGS = @XMLSEC_CFLAGS@
@@ -186,6 +209,8 @@ 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@
@@ -195,6 +220,7 @@ 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@
@@ -230,6 +256,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -262,7 +289,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -281,6 +307,7 @@ top_srcdir = @top_srcdir@
NULL =
xmlsecprivateincdir = $(includedir)/xmlsec1/xmlsec/private
xmlsecprivateinc_HEADERS = \
+xslt.h \
xkms.h \
$(NULL)
@@ -340,9 +367,7 @@ 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
+ dir='$(DESTDIR)$(xmlsecprivateincdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -443,10 +468,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/include/xmlsec/private/xkms.h b/include/xmlsec/private/xkms.h
index 5ba3a6ee..0c606641 100644
--- a/include/xmlsec/private/xkms.h
+++ b/include/xmlsec/private/xkms.h
@@ -1,30 +1,30 @@
-/**
+/**
* 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__
+#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>
+#endif /* __cplusplus */
+#include <stdio.h>
#include <libxml/tree.h>
-#include <libxml/parser.h>
+#include <libxml/parser.h>
#include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h>
@@ -39,71 +39,71 @@ extern "C" {
*
* XKMS RespondWith Klass
*
- ************************************************************************/
-typedef int (*xmlSecXkmsRespondWithNodeReadMethod) (xmlSecXkmsRespondWithId id,
- xmlSecXkmsServerCtxPtr ctx,
- xmlNodePtr node);
-typedef int (*xmlSecXkmsRespondWithNodeWriteMethod) (xmlSecXkmsRespondWithId id,
- xmlSecXkmsServerCtxPtr ctx,
- xmlNodePtr node);
+ ************************************************************************/
+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;
+ 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)
+ ((((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);
+ ************************************************************************/
+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;
+ 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)
+ ((((id) != NULL) && ((id)->name != NULL)) ? (id)->name : NULL)
/************************************************************************
*
* XKMS ServerRequest Klass flags
*
- ************************************************************************/
+ ************************************************************************/
/**
* XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND:
*
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/app.h b/include/xmlsec/skeleton/app.h
index 33c29697..0429f7ba 100644
--- a/include/xmlsec/skeleton/app.h
+++ b/include/xmlsec/skeleton/app.h
@@ -1,87 +1,93 @@
-/**
+/**
* 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__
+#define __XMLSEC_SKELETON_APP_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#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);
+ *
+ ********************************************************************/
+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);
+ *
+ ********************************************************************/
+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);
+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);
+ *
+ ********************************************************************/
+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);
+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);
+XMLSEC_CRYPTO_EXPORT void* xmlSecSkeletonAppGetDefaultPwdCallback (void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/skeleton/crypto.h b/include/xmlsec/skeleton/crypto.h
index 3b32c237..30346669 100644
--- a/include/xmlsec/skeleton/crypto.h
+++ b/include/xmlsec/skeleton/crypto.h
@@ -1,32 +1,34 @@
-/**
+/**
* 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__
+#define __XMLSEC_SKELETON_CRYPTO_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#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);
+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 xmlSecSkeletonInit (void);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonShutdown (void);
-XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonKeysMngrInit (xmlSecKeysMngrPtr mngr);
+XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonKeysMngrInit (xmlSecKeysMngrPtr mngr);
#ifdef __cplusplus
@@ -35,4 +37,4 @@ XMLSEC_CRYPTO_EXPORT int xmlSecSkeletonKeysMngrInit (xmlSecKeysMngrPtr mngr);
#endif /* __XMLSEC_SKELETON_CRYPTO_H__ */
-#define __XMLSEC_SKELETON_CRYPTO_H__
+#define __XMLSEC_SKELETON_CRYPTO_H__
diff --git a/include/xmlsec/skeleton/symbols.h b/include/xmlsec/skeleton/symbols.h
index 1473f011..9902d3f7 100644
--- a/include/xmlsec/skeleton/symbols.h
+++ b/include/xmlsec/skeleton/symbols.h
@@ -1,13 +1,13 @@
-/**
+/**
* 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__
+#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
@@ -15,89 +15,103 @@
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-/**
- * Defines for writing simple code
- */
#ifdef XMLSEC_CRYPTO_SKELETON
-/**
+/********************************************************************
+ *
* Crypto Init/shutdown
- */
-#define xmlSecCryptoInit xmlSecSkeletonInit
-#define xmlSecCryptoShutdown xmlSecSkeletonShutdown
+ *
+ ********************************************************************/
+#define xmlSecCryptoInit xmlSecSkeletonInit
+#define xmlSecCryptoShutdown xmlSecSkeletonShutdown
-#define xmlSecCryptoKeysMngrInit xmlSecSkeletonKeysMngrInit
+#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
+ *
+ ********************************************************************/
+#define xmlSecKeyDataAesId xmlSecSkeletonKeyDataAesId
+#define xmlSecKeyDataDesId xmlSecSkeletonKeyDataDesId
+#define xmlSecKeyDataDsaId xmlSecSkeletonKeyDataDsaId
+#define xmlSecKeyDataEcdsaId xmlSecSkeletonKeyDataEcdsaId
+#define xmlSecKeyDataHmacId xmlSecSkeletonKeyDataHmacId
+#define xmlSecKeyDataRsaId xmlSecSkeletonKeyDataRsaId
+#define xmlSecKeyDataX509Id xmlSecSkeletonKeyDataX509Id
+#define xmlSecKeyDataRawX509CertId xmlSecSkeletonKeyDataRawX509CertId
-/**
+/********************************************************************
+ *
* Key data store ids
- */
-#define xmlSecX509StoreId xmlSecSkeletonX509StoreId
+ *
+ ********************************************************************/
+#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
+ *
+ ********************************************************************/
+#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 xmlSecTransformDsaSha256Id xmlSecSkeletonTransformDsaSha256Id
+#define xmlSecTransformEcdsaSha1Id xmlSecSkeletonTransformEcdsaSha1Id
+#define xmlSecTransformEcdsaSha224Id xmlSecSkeletonTransformEcdsaSha224Id
+#define xmlSecTransformEcdsaSha256Id xmlSecSkeletonTransformEcdsaSha256Id
+#define xmlSecTransformEcdsaSha384Id xmlSecSkeletonTransformEcdsaSha384Id
+#define xmlSecTransformEcdsaSha512Id xmlSecSkeletonTransformEcdsaSha512Id
+#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
+ *
+ ********************************************************************/
+#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 */
@@ -107,4 +121,4 @@ extern "C" {
#endif /* __XMLSEC_SKELETON_CRYPTO_H__ */
-#define __XMLSEC_SKELETON_CRYPTO_H__
+#define __XMLSEC_SKELETON_CRYPTO_H__
diff --git a/include/xmlsec/soap.h b/include/xmlsec/soap.h
index 4862a84b..c4efc00f 100644
--- a/include/xmlsec/soap.h
+++ b/include/xmlsec/soap.h
@@ -1,21 +1,21 @@
-/**
+/**
* 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__
+#define __XMLSEC_SOAP_H__
#ifndef XMLSEC_NO_SOAP
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <xmlsec/xmlsec.h>
@@ -23,64 +23,64 @@ extern "C" {
/***********************************************************************
*
- * SOAP 1.1
+ * 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);
+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
+ * 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
+ * @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 {
@@ -90,35 +90,35 @@ typedef enum {
xmlSecSoap12FaultCodeDataEncodingUnknown,
xmlSecSoap12FaultCodeSender,
xmlSecSoap12FaultCodeReceiver
-} xmlSecSoap12FaultCode;
+} 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);
-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 */
diff --git a/include/xmlsec/strings.h b/include/xmlsec/strings.h
index 07afb9dd..5e3f6a1c 100644
--- a/include/xmlsec/strings.h
+++ b/include/xmlsec/strings.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_STRINGS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -318,6 +318,43 @@ XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeDSAPgenCounter[];
XMLSEC_EXPORT_VAR const xmlChar xmlSecNameDsaSha1[];
XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefDsaSha1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameDsaSha256[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefDsaSha256[];
+
+/*************************************************************************
+ *
+ * ECDSA strings
+ *
+ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameECDSAKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAKeyValue[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefECDSAKeyValue[];
+
+/* XXX-MAK: More constants will be needed later. */
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAP[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAQ[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAG[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAJ[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAX[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAY[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSASeed[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeECDSAPgenCounter[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEcdsaSha1[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEcdsaSha1[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEcdsaSha224[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEcdsaSha224[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEcdsaSha256[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEcdsaSha256[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEcdsaSha384[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEcdsaSha384[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameEcdsaSha512[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefEcdsaSha512[];
+
/*************************************************************************
*
* GOST2001 strings
diff --git a/include/xmlsec/templates.h b/include/xmlsec/templates.h
index 11d1c2c4..815cddce 100644
--- a/include/xmlsec/templates.h
+++ b/include/xmlsec/templates.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_TEMPALTES_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -25,134 +25,134 @@ extern "C" {
* <dsig:Signature> node
*
**********************************************************************/
-XMLSEC_EXPORT xmlNodePtr xmlSecTmplSignatureCreate (xmlDocPtr doc,
- xmlSecTransformId c14nMethodId,
- xmlSecTransformId signMethodId,
- const xmlChar *id);
+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 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);
+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);
+ **********************************************************************/
+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,
+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);
+ **********************************************************************/
+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 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);
+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);
+ **********************************************************************/
+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
}
diff --git a/include/xmlsec/transforms.h b/include/xmlsec/transforms.h
index 4008caef..f0c70c91 100644
--- a/include/xmlsec/transforms.h
+++ b/include/xmlsec/transforms.h
@@ -1,19 +1,19 @@
-/**
+/**
* XML Security Library (http://www.aleksey.com/xmlsec).
*
- * The transforms engine
+ * 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__
+#define __XMLSEC_TRANSFORMS_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
#include <libxml/xpath.h>
@@ -24,35 +24,35 @@ extern "C" {
#include <xmlsec/nodeset.h>
#include <xmlsec/keys.h>
-typedef const struct _xmlSecTransformKlass xmlSecTransformKlass,
- *xmlSecTransformId;
+typedef const struct _xmlSecTransformKlass xmlSecTransformKlass,
+ *xmlSecTransformId;
/**
* XMLSEC_TRANSFORM_BINARY_CHUNK:
*
- * The binary data chunks size. XMLSec processes binary data one 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
+#define XMLSEC_TRANSFORM_BINARY_CHUNK 64
/**********************************************************************
*
- * Hi-level functions
+ * 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);
+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).
+ * @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.
*/
@@ -66,9 +66,9 @@ typedef enum {
/**
* xmlSecTransformMode:
- * @xmlSecTransformModeNone: the mode is unknown.
- * @xmlSecTransformModePush: pushing data thru transform.
- * @xmlSecTransformModePop: popping data from transform.
+ * @xmlSecTransformModeNone: the mode is unknown.
+ * @xmlSecTransformModePush: pushing data thru transform.
+ * @xmlSecTransformModePop: popping data from transform.
*
* The transform operation mode
*/
@@ -80,14 +80,14 @@ typedef enum {
/**
* 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.
- *
+ * @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 {
@@ -110,52 +110,52 @@ typedef enum {
*
* URI transform type bit mask.
*/
-typedef unsigned int xmlSecTransformUriType;
+typedef unsigned int xmlSecTransformUriType;
/**
* xmlSecTransformUriTypeNone:
*
* The URI type is unknown or not set.
*/
-#define xmlSecTransformUriTypeNone 0x0000
+#define xmlSecTransformUriTypeNone 0x0000
/**
* xmlSecTransformUriTypeEmpty:
*
* The empty URI ("") type.
*/
-#define xmlSecTransformUriTypeEmpty 0x0001
+#define xmlSecTransformUriTypeEmpty 0x0001
/**
* xmlSecTransformUriTypeSameDocument:
*
* The smae document ("#...") but not empty ("") URI type.
*/
-#define xmlSecTransformUriTypeSameDocument 0x0002
+#define xmlSecTransformUriTypeSameDocument 0x0002
/**
* xmlSecTransformUriTypeLocal:
*
* The local URI ("file:///....") type.
*/
-#define xmlSecTransformUriTypeLocal 0x0004
+#define xmlSecTransformUriTypeLocal 0x0004
/**
* xmlSecTransformUriTypeRemote:
*
* The remote URI type.
*/
-#define xmlSecTransformUriTypeRemote 0x0008
+#define xmlSecTransformUriTypeRemote 0x0008
/**
* xmlSecTransformUriTypeAny:
*
* Any URI type.
*/
-#define xmlSecTransformUriTypeAny 0xFFFF
+#define xmlSecTransformUriTypeAny 0xFFFF
-XMLSEC_EXPORT int xmlSecTransformUriTypeCheck (xmlSecTransformUriType type,
- const xmlChar* uri);
+XMLSEC_EXPORT int xmlSecTransformUriTypeCheck (xmlSecTransformUriType type,
+ const xmlChar* uri);
/**************************************************************************
*
* xmlSecTransformDataType
@@ -163,31 +163,31 @@ XMLSEC_EXPORT int xmlSecTransformUriTypeCheck (xmlSecTransformUriType type,
*************************************************************************/
/**
* xmlSecTransformDataType:
- *
+ *
* Transform data type bit mask.
- */
-typedef xmlSecByte xmlSecTransformDataType;
+ */
+typedef xmlSecByte xmlSecTransformDataType;
/**
* xmlSecTransformDataTypeUnknown:
*
* The transform data type is unknown or nor data expected.
*/
-#define xmlSecTransformDataTypeUnknown 0x0000
+#define xmlSecTransformDataTypeUnknown 0x0000
/**
* xmlSecTransformDataTypeBin:
*
* The binary transform data.
*/
-#define xmlSecTransformDataTypeBin 0x0001
+#define xmlSecTransformDataTypeBin 0x0001
/**
* xmlSecTransformDataTypeXml:
*
* The xml transform data.
*/
-#define xmlSecTransformDataTypeXml 0x0002
+#define xmlSecTransformDataTypeXml 0x0002
/**************************************************************************
*
@@ -199,56 +199,56 @@ typedef xmlSecByte xmlSecTransformDataType;
*
* The transform usage bit mask.
*/
-typedef unsigned int xmlSecTransformUsage;
+typedef unsigned int xmlSecTransformUsage;
/**
* xmlSecTransformUsageUnknown:
*
* Transforms usage is unknown or undefined.
*/
-#define xmlSecTransformUsageUnknown 0x0000
+#define xmlSecTransformUsageUnknown 0x0000
/**
* xmlSecTransformUsageDSigTransform:
*
* Transform could be used in <dsig:Transform>.
*/
-#define xmlSecTransformUsageDSigTransform 0x0001
+#define xmlSecTransformUsageDSigTransform 0x0001
/**
* xmlSecTransformUsageC14NMethod:
*
* Transform could be used in <dsig:CanonicalizationMethod>.
*/
-#define xmlSecTransformUsageC14NMethod 0x0002
+#define xmlSecTransformUsageC14NMethod 0x0002
/**
* xmlSecTransformUsageDigestMethod:
*
* Transform could be used in <dsig:DigestMethod>.
*/
-#define xmlSecTransformUsageDigestMethod 0x0004
+#define xmlSecTransformUsageDigestMethod 0x0004
-/**
- * xmlSecTransformUsageSignatureMethod:
+/**
+ * xmlSecTransformUsageSignatureMethod:
*
* Transform could be used in <dsig:SignatureMethod>.
*/
-#define xmlSecTransformUsageSignatureMethod 0x0008
+#define xmlSecTransformUsageSignatureMethod 0x0008
/**
* xmlSecTransformUsageEncryptionMethod:
*
* Transform could be used in <enc:EncryptionMethod>.
*/
-#define xmlSecTransformUsageEncryptionMethod 0x0010
+#define xmlSecTransformUsageEncryptionMethod 0x0010
/**
* xmlSecTransformUsageAny:
*
* Transform could be used for operation.
*/
-#define xmlSecTransformUsageAny 0xFFFF
+#define xmlSecTransformUsageAny 0xFFFF
/**************************************************************************
*
@@ -257,7 +257,7 @@ typedef unsigned int xmlSecTransformUsage;
*************************************************************************/
/**
* xmlSecTransformCtxPreExecuteCallback:
- * @transformCtx: the pointer to transform's context.
+ * @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
@@ -267,107 +267,107 @@ typedef unsigned int xmlSecTransformUsage;
* 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);
+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.
+ * documents that don't follow XML, XPointer and XML DSig specifications.
*/
-#define XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK 0x00000001
+#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.
+ * @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;
-
+ 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;
+ xmlSecBufferPtr result;
+ xmlSecTransformStatus status;
+ xmlChar* uri;
+ xmlChar* xptrExpr;
+ xmlSecTransformPtr first;
+ xmlSecTransformPtr last;
/* for the future */
- void* reserved0;
- void* reserved1;
+ 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);
-
+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
@@ -375,450 +375,438 @@ XMLSEC_EXPORT void xmlSecTransformCtxDebugXmlDump (xmlSecTransformCtxPtr ctx,
*************************************************************************/
/**
* 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.
+ * @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;
+ xmlSecTransformId id;
+ xmlSecTransformOperation operation;
+ xmlSecTransformStatus status;
+ xmlNodePtr hereNode;
/* transforms chain */
- xmlSecTransformPtr next;
- xmlSecTransformPtr prev;
+ xmlSecTransformPtr next;
+ xmlSecTransformPtr prev;
/* binary data */
- xmlSecBuffer inBuf;
- xmlSecBuffer outBuf;
-
+ xmlSecBuffer inBuf;
+ xmlSecBuffer outBuf;
+
/* xml data */
- xmlSecNodeSetPtr inNodes;
- xmlSecNodeSetPtr outNodes;
+ xmlSecNodeSetPtr inNodes;
+ xmlSecNodeSetPtr outNodes;
- /* reserved for the future */
- void* reserved0;
- void* reserved1;
+ /* 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);
+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.
+ * @transform: the pointer to transform.
*
* Macro. Returns transform name.
*/
#define xmlSecTransformGetName(transform) \
- ((xmlSecTransformIsValid((transform))) ? \
- xmlSecTransformKlassGetName((transform)->id) : NULL)
+ ((xmlSecTransformIsValid((transform))) ? \
+ xmlSecTransformKlassGetName((transform)->id) : NULL)
/**
* xmlSecTransformIsValid:
- * @transform: the pointer to transform.
+ * @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))
-
-/**
- * xmlSecTransformCheckType:
- * @transform: the pointer to transform.
- * @t: the transform type.
- *
- * Macro. Returns 1 if the @transform is valid and has specified type @t
- * or 0 otherwise.
- */
-#define xmlSecTransformCheckType(transform, t) \
- (xmlSecTransformIsValid(( transform )) && \
- ((( transform )->id->type) == ( t )))
+ ((( 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.
+ * @transform: the pointer to transform.
+ * @i: the transform id.
*
- * Macro. Returns 1 if the @transform is valid and has specified id @i
+ * 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 )))
+ (xmlSecTransformIsValid(( transform )) && \
+ ((((const xmlSecTransformId) (( transform )->id))) == ( i )))
/**
* xmlSecTransformCheckSize:
- * @transform: the pointer to transform.
- * @size: the transform object size.
+ * @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 )))
+ (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);
+ ************************************************************************/
+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);
+ ************************************************************************/
+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);
+ ************************************************************************/
+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.
+ * @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);
+typedef int (*xmlSecTransformInitializeMethod) (xmlSecTransformPtr transform);
/**
* xmlSecTransformFinalizeMethod:
- * @transform: the pointer to transform object.
+ * @transform: the pointer to transform object.
*
* The transform specific destroy method.
*/
-typedef void (*xmlSecTransformFinalizeMethod) (xmlSecTransformPtr transform);
+typedef void (*xmlSecTransformFinalizeMethod) (xmlSecTransformPtr transform);
/**
* xmlSecTransformGetDataTypeMethod:
- * @transform: the pointer to transform object.
- * @mode: the mode.
- * @transformCtx: the pointer to transform context object.
+ * @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);
+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.
+ * @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 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);
+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.
+ * @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);
+typedef int (*xmlSecTransformNodeWriteMethod) (xmlSecTransformPtr transform,
+ xmlNodePtr node,
+ xmlSecTransformCtxPtr transformCtx);
/**
* xmlSecTransformSetKeyRequirementsMethod:
- * @transform: the pointer to transform object.
- * @keyReq: the pointer to key requirements structure.
+ * @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);
+typedef int (*xmlSecTransformSetKeyRequirementsMethod)(xmlSecTransformPtr transform,
+ xmlSecKeyReqPtr keyReq);
/**
* xmlSecTransformSetKeyMethod:
- * @transform: the pointer to transform object.
- * @key: the pointer to key.
+ * @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);
+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.
+ * @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);
+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.
+ * @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);
+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.
+ * @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
+ * 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);
+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.
+ * @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
+ * 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);
+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.
+ * @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);
+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: 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);
+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.
- *
+ * @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;
+ 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;
-
+ 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;
+ xmlSecTransformExecuteMethod execute;
- /* reserved for future */
- void* reserved0;
- void* reserved1;
+ /* reserved for future */
+ void* reserved0;
+ void* reserved1;
};
/**
* xmlSecTransformKlassGetName:
- * @klass: the transofrm's klass.
+ * @klass: the transofrm's klass.
*
* Macro. Returns transform klass name.
*/
#define xmlSecTransformKlassGetName(klass) \
- (((klass)) ? ((klass)->name) : NULL)
+ (((klass)) ? ((klass)->name) : NULL)
/***********************************************************************
*
@@ -830,23 +818,23 @@ struct _xmlSecTransformKlass {
*
* 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);
+#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
*
@@ -856,144 +844,147 @@ XMLSEC_EXPORT void xmlSecTransformIdListDebugXmlDump(xmlSecPtrListPtr list,
*
* The "unknown" transform id (NULL).
*/
-#define xmlSecTransformIdUnknown ((xmlSecTransformId)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);
+ 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);
+ xmlSecTransformInclC14NGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NGetKlass (void);
/**
* xmlSecTransformInclC14NWithCommentsId:
- *
+ *
* The regular (inclusive) C14N with comments transform klass.
*/
#define xmlSecTransformInclC14NWithCommentsId \
- xmlSecTransformInclC14NWithCommentsGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass(void);
+ 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);
+ 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);
+ xmlSecTransformInclC14N11WithCommentsGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKlass(void);
/**
* xmlSecTransformExclC14NId
- *
+ *
* The exclusive C14N without comments transform klass.
*/
#define xmlSecTransformExclC14NId \
- xmlSecTransformExclC14NGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NGetKlass (void);
+ xmlSecTransformExclC14NGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NGetKlass (void);
/**
* xmlSecTransformExclC14NWithCommentsId:
- *
+ *
* The exclusive C14N with comments transform klass.
*/
#define xmlSecTransformExclC14NWithCommentsId \
- xmlSecTransformExclC14NWithCommentsGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass(void);
+ xmlSecTransformExclC14NWithCommentsGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass(void);
/**
* xmlSecTransformEnvelopedId:
- *
+ *
* The "enveloped" transform klass.
*/
#define xmlSecTransformEnvelopedId \
- xmlSecTransformEnvelopedGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEnvelopedGetKlass (void);
+ xmlSecTransformEnvelopedGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformEnvelopedGetKlass (void);
/**
* xmlSecTransformXPathId:
- *
+ *
* The XPath transform klass.
*/
#define xmlSecTransformXPathId \
- xmlSecTransformXPathGetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPathGetKlass (void);
+ xmlSecTransformXPathGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPathGetKlass (void);
/**
* xmlSecTransformXPath2Id:
- *
+ *
* The XPath2 transform klass.
*/
#define xmlSecTransformXPath2Id \
- xmlSecTransformXPath2GetKlass()
-XMLSEC_EXPORT xmlSecTransformId xmlSecTransformXPath2GetKlass (void);
+ 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);
+ 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);
+ 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);
+ 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
+ * 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);
+ xmlSecTransformVisa3DHackGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformVisa3DHackGetKlass (void);
+XMLSEC_EXPORT int xmlSecTransformVisa3DHackSetID (xmlSecTransformPtr transform,
+ const xmlChar* id);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/version.h b/include/xmlsec/version.h
index 48c9b47b..f94a6c53 100644
--- a/include/xmlsec/version.h
+++ b/include/xmlsec/version.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_VERSION_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
/**
* XMLSEC_VERSION:
@@ -21,7 +21,7 @@ extern "C" {
* The library version string in the format
* "<major-number>.<minor-number>.<sub-minor-number>".
*/
-#define XMLSEC_VERSION "1.2.14"
+#define XMLSEC_VERSION "1.2.19"
/**
* XMLSEC_VERSION_MAJOR:
@@ -42,7 +42,7 @@ extern "C" {
*
* The library sub-minor version number.
*/
-#define XMLSEC_VERSION_SUBMINOR 14
+#define XMLSEC_VERSION_SUBMINOR 19
/**
* XMLSEC_VERSION_INFO:
@@ -50,7 +50,7 @@ extern "C" {
* The library version info string in the format
* "<major-number>+<minor-number>:<sub-minor-number>:<minor-number>".
*/
-#define XMLSEC_VERSION_INFO "3:14:2"
+#define XMLSEC_VERSION_INFO "3:19:2"
#ifdef __cplusplus
diff --git a/include/xmlsec/version.h.in b/include/xmlsec/version.h.in
index 28cc3189..16bbafa0 100644
--- a/include/xmlsec/version.h.in
+++ b/include/xmlsec/version.h.in
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_VERSION_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
/**
* XMLSEC_VERSION:
diff --git a/include/xmlsec/x509.h b/include/xmlsec/x509.h
index b2114822..e58f37c0 100644
--- a/include/xmlsec/x509.h
+++ b/include/xmlsec/x509.h
@@ -1,23 +1,23 @@
-/**
+/**
* 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__
+#define __XMLSEC_X509_H__
#ifndef XMLSEC_NO_X509
-
+
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
-#include <stdio.h>
+#endif /* __cplusplus */
+#include <stdio.h>
#include <libxml/tree.h>
-#include <libxml/parser.h>
+#include <libxml/parser.h>
#include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h>
@@ -32,43 +32,43 @@ extern "C" {
*
* <dsig:X509Certificate/> node found or would be written back.
*/
-#define XMLSEC_X509DATA_CERTIFICATE_NODE 0x00000001
+#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
+#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
+#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
+#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
+#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);
+#define XMLSEC_X509DATA_DEFAULT \
+ (XMLSEC_X509DATA_CERTIFICATE_NODE | XMLSEC_X509DATA_CRL_NODE)
+
+XMLSEC_EXPORT int xmlSecX509DataGetNodeContent (xmlNodePtr node,
+ int deleteChildren,
+ xmlSecKeyInfoCtxPtr keyInfoCtx);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/xkms.h b/include/xmlsec/xkms.h
index 5b196578..8035035e 100644
--- a/include/xmlsec/xkms.h
+++ b/include/xmlsec/xkms.h
@@ -1,26 +1,26 @@
-/**
+/**
* 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__
+#define __XMLSEC_XKMS_H__
#ifndef XMLSEC_NO_XKMS
-
+
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
-#include <stdio.h>
+#endif /* __cplusplus */
+#include <stdio.h>
#include <libxml/tree.h>
-#include <libxml/parser.h>
+#include <libxml/parser.h>
#include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h>
@@ -35,33 +35,33 @@ extern "C" {
* Forward declarations. These internal xmlsec library structures are
* declared in "xmlsec/private/xkms.h" file.
*
- ************************************************************************/
-typedef struct _xmlSecXkmsRespondWithKlass xmlSecXkmsRespondWithKlass,
- *xmlSecXkmsRespondWithId;
+ ************************************************************************/
+typedef struct _xmlSecXkmsRespondWithKlass xmlSecXkmsRespondWithKlass,
+ *xmlSecXkmsRespondWithId;
-typedef struct _xmlSecXkmsServerRequestKlass xmlSecXkmsServerRequestKlass,
- *xmlSecXkmsServerRequestId;
+typedef struct _xmlSecXkmsServerRequestKlass xmlSecXkmsServerRequestKlass,
+ *xmlSecXkmsServerRequestId;
/**
* xmlSecXkmsResultMajor:
* @xmlSecXkmsResultMajorSuccess: The operation succeeded.
- * @xmlSecXkmsResultMajorVersionMismatch: The service does not support
- * the protocol version specified
+ * @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
+ * @xmlSecXkmsResultMajorRepresent: The service has not acted on the
* request. In order for the request
- * to be acted upon the request MUST
+ * 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
+ * @xmlSecXkmsResultMajorPending: The request has been accepted
+ * for processing and the service
* will return the result asynchronously.
- *
+ *
* The values for ResultMajor attribute.
*/
typedef enum {
@@ -76,34 +76,34 @@ typedef enum {
/**
* xmlSecXkmsResultMinor:
* @xmlSecXkmsResultMinorNone: No minor result code available.
- * @xmlSecXkmsResultMinorNoMatch: No match was found for the search
+ * @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
+ * @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
+ * @xmlSecXkmsResultMinorIncomplete: Only part of the information
* requested could be provided.
- * @xmlSecXkmsResultMinorFailure: The service attempted to perform
- * the request but the operation
+ * @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
+ * @xmlSecXkmsResultMinorRefused: The operation was refused. The
+ * service did not attempt to
* perform the request.
- * @xmlSecXkmsResultMinorNoAuthentication: The operation was refused
- * because the necessary authentication
+ * @xmlSecXkmsResultMinorNoAuthentication: The operation was refused
+ * because the necessary authentication
* information was incorrect or missing.
- * @xmlSecXkmsResultMinorMessageNotSupported: The receiver does not implement
+ * @xmlSecXkmsResultMinorMessageNotSupported: The receiver does not implement
* the specified operation.
- * @xmlSecXkmsResultMinorUnknownResponseId: The ResponseId for which pending
- * status was requested is unknown to
+ * @xmlSecXkmsResultMinorUnknownResponseId: The ResponseId for which pending
+ * status was requested is unknown to
* the service.
- * @xmlSecXkmsResultMinorSynchronous: The receiver does not support
- * synchronous processing of this
+ * @xmlSecXkmsResultMinorSynchronous: The receiver does not support
+ * synchronous processing of this
* type of request.
*
* The values for ResultMinor attribute.
@@ -121,7 +121,7 @@ typedef enum {
xmlSecXkmsResultMinorSynchronous
} xmlSecXkmsResultMinor;
-/**
+/**
* xmlSecXkmsKeyBindingStatus:
* @xmlSecXkmsKeyBindingStatusNone: The key status is not available.
* @xmlSecXkmsKeyBindingStatusValid: The key is valid.
@@ -129,7 +129,7 @@ typedef enum {
* @xmlSecXkmsKeyBindingStatusIndeterminate: Could not determine key status.
*
* The values for key binding StatusValue attribute.
- */
+ */
typedef enum {
xmlSecXkmsKeyBindingStatusNone,
xmlSecXkmsKeyBindingStatusValid,
@@ -161,290 +161,290 @@ XMLSEC_EXPORT const xmlChar* xmlSecXkmsServerFormatToString (xmlSecXkmsServe
*
* 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.
- *
+ * @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;
-
+ 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;
+ 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;
+ 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;
-
+ xmlNodePtr requestNode;
+ xmlNodePtr opaqueClientDataNode;
+ xmlNodePtr firtsMsgExtNode;
+ xmlNodePtr keyInfoNode;
+ xmlSecPtrList respWithList;
+
/* reserved for future */
- void* reserved0;
- void* reserved1;
+ 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,
+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,
+ 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,
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxResponseWrap (xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node,
xmlSecXkmsServerFormat format,
xmlDocPtr doc);
-XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxFatalErrorResponseCreate
- (xmlSecXkmsServerCtxPtr ctx,
+XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxFatalErrorResponseCreate
+ (xmlSecXkmsServerCtxPtr ctx,
xmlSecXkmsServerFormat format,
xmlDocPtr doc);
-XMLSEC_EXPORT void xmlSecXkmsServerCtxSetResult (xmlSecXkmsServerCtxPtr ctx,
- xmlSecXkmsResultMajor resultMajor,
+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);
+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
+#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/>
+ * 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
+#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/>
+ * 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
+#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/>
+ * 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
+#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
+ * 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
+#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
+ * 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
+#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
+ * 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
+#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
+#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
+ * 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.
+ * - 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
+#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
+ * 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.
+ * - 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
+#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 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
+ * - 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
+#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
+ * Signature on signed data provided by the client in the <Keyinfo> element was
* successfully verified.
*
* X.509 Equivalents
- * - Valid: Certificate Signature verified.
+ * - Valid: Certificate Signature verified.
* - Invalid: Certificate Signature verification failed.
*/
-#define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_SIGNATURE 0x00000008
+#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
+ ************************************************************************/
+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
+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
+ FILE* output);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeRead
(xmlSecXkmsRespondWithId id,
- xmlSecXkmsServerCtxPtr ctx,
- xmlNodePtr node);
-XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeWrite
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeWrite
(xmlSecXkmsRespondWithId id,
- xmlSecXkmsServerCtxPtr ctx,
- xmlNodePtr node);
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
/************************************************************************
*
* XKMS RespondWith Klass List
*
- ************************************************************************/
+ ************************************************************************/
/**
* xmlSecXkmsRespondWithIdListId:
*
* XKMS RespondWith klasses list klass.
*/
-#define xmlSecXkmsRespondWithIdListId xmlSecXkmsRespondWithIdListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsRespondWithIdListGetKlass
+#define xmlSecXkmsRespondWithIdListId xmlSecXkmsRespondWithIdListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsRespondWithIdListGetKlass
(void);
-XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListFind (xmlSecPtrListPtr list,
- xmlSecXkmsRespondWithId id);
+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);
+ (xmlSecPtrListPtr list,
+ xmlNodePtr node);
+XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListWrite(xmlSecPtrListPtr list,
+ xmlSecXkmsServerCtxPtr ctx,
+ xmlNodePtr node);
-/********************************************************************
+/********************************************************************
*
* XML Sec Library RespondWith Ids
*
@@ -454,193 +454,193 @@ XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListWrite(xmlSecPtrListPtr list,
*
* The "unknown" RespondWith id (NULL).
*/
-#define xmlSecXkmsRespondWithIdUnknown NULL
+#define xmlSecXkmsRespondWithIdUnknown NULL
/**
* xmlSecXkmsRespondWithKeyNameId:
*
* The respond with KeyName klass.
- */
+ */
#define xmlSecXkmsRespondWithKeyNameId \
- xmlSecXkmsRespondWithKeyNameGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyNameGetKlass(void);
+ xmlSecXkmsRespondWithKeyNameGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyNameGetKlass(void);
/**
* xmlSecXkmsRespondWithKeyValueId:
*
* The respond with KeyValue klass.
- */
+ */
#define xmlSecXkmsRespondWithKeyValueId \
- xmlSecXkmsRespondWithKeyValueGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyValueGetKlass(void);
+ xmlSecXkmsRespondWithKeyValueGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyValueGetKlass(void);
/**
* xmlSecXkmsRespondWithPrivateKeyId:
*
* The respond with PrivateKey klass.
- */
+ */
#define xmlSecXkmsRespondWithPrivateKeyId \
- xmlSecXkmsRespondWithPrivateKeyGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPrivateKeyGetKlass(void);
+ xmlSecXkmsRespondWithPrivateKeyGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPrivateKeyGetKlass(void);
/**
* xmlSecXkmsRespondWithRetrievalMethodId:
*
* The respond with RetrievalMethod klass.
- */
+ */
#define xmlSecXkmsRespondWithRetrievalMethodId \
- xmlSecXkmsRespondWithRetrievalMethodGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithRetrievalMethodGetKlass(void);
+ xmlSecXkmsRespondWithRetrievalMethodGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithRetrievalMethodGetKlass(void);
/**
* xmlSecXkmsRespondWithX509CertId:
*
* The respond with X509Cert klass.
- */
+ */
#define xmlSecXkmsRespondWithX509CertId \
- xmlSecXkmsRespondWithX509CertGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CertGetKlass(void);
+ xmlSecXkmsRespondWithX509CertGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CertGetKlass(void);
/**
* xmlSecXkmsRespondWithX509ChainId:
*
* The respond with X509Chain klass.
- */
+ */
#define xmlSecXkmsRespondWithX509ChainId \
- xmlSecXkmsRespondWithX509ChainGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509ChainGetKlass(void);
+ xmlSecXkmsRespondWithX509ChainGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509ChainGetKlass(void);
/**
* xmlSecXkmsRespondWithX509CRLId:
*
* The respond with X509CRL klass.
- */
+ */
#define xmlSecXkmsRespondWithX509CRLId \
- xmlSecXkmsRespondWithX509CRLGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CRLGetKlass(void);
+ xmlSecXkmsRespondWithX509CRLGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CRLGetKlass(void);
/**
* xmlSecXkmsRespondWithPGPId:
*
* The respond with PGP klass.
- */
+ */
#define xmlSecXkmsRespondWithPGPId \
- xmlSecXkmsRespondWithPGPGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPGPGetKlass(void);
+ xmlSecXkmsRespondWithPGPGetKlass()
+XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPGPGetKlass(void);
/**
* xmlSecXkmsRespondWithSPKIId:
*
* The respond with SPKI klass.
- */
+ */
#define xmlSecXkmsRespondWithSPKIId \
- xmlSecXkmsRespondWithSPKIGetKlass()
-XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithSPKIGetKlass(void);
+ 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);
+ ************************************************************************/
+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);
+#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
+#define xmlSecXkmsServerRequestIdUnknown NULL
/**
* xmlSecXkmsServerRequestResultId:
*
* The Result response klass.
- */
+ */
#define xmlSecXkmsServerRequestResultId \
- xmlSecXkmsServerRequestResultGetKlass()
-XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestResultGetKlass(void);
+ xmlSecXkmsServerRequestResultGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestResultGetKlass(void);
/**
* xmlSecXkmsServerRequestStatusId:
*
* The StatusRequest klass.
- */
+ */
#define xmlSecXkmsServerRequestStatusId \
- xmlSecXkmsServerRequestStatusGetKlass()
-XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestStatusGetKlass(void);
+ xmlSecXkmsServerRequestStatusGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestStatusGetKlass(void);
/**
* xmlSecXkmsServerRequestCompoundId:
*
* The CompoundRequest klass.
- */
+ */
#define xmlSecXkmsServerRequestCompoundId \
- xmlSecXkmsServerRequestCompoundGetKlass()
-XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestCompoundGetKlass(void);
+ xmlSecXkmsServerRequestCompoundGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestCompoundGetKlass(void);
/**
* xmlSecXkmsServerRequestLocateId:
*
* The LocateRequest klass.
- */
+ */
#define xmlSecXkmsServerRequestLocateId \
- xmlSecXkmsServerRequestLocateGetKlass()
-XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestLocateGetKlass(void);
+ xmlSecXkmsServerRequestLocateGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestLocateGetKlass(void);
/**
* xmlSecXkmsServerRequestValidateId:
*
* The ValidateRequest klass.
- */
+ */
#define xmlSecXkmsServerRequestValidateId \
- xmlSecXkmsServerRequestValidateGetKlass()
-XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestValidateGetKlass(void);
+ xmlSecXkmsServerRequestValidateGetKlass()
+XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestValidateGetKlass(void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/xmldsig.h b/include/xmlsec/xmldsig.h
index b2620784..3cd311e6 100644
--- a/include/xmlsec/xmldsig.h
+++ b/include/xmlsec/xmldsig.h
@@ -1,26 +1,26 @@
-/**
+/**
* 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__
+#define __XMLSEC_XMLDSIG_H__
#ifndef XMLSEC_NO_XMLDSIG
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
-#include <libxml/parser.h>
+#include <libxml/parser.h>
#include <xmlsec/xmlsec.h>
@@ -31,14 +31,14 @@ extern "C" {
#include <xmlsec/keyinfo.h>
#include <xmlsec/transforms.h>
-typedef struct _xmlSecDSigReferenceCtx xmlSecDSigReferenceCtx,
- *xmlSecDSigReferenceCtxPtr;
+typedef struct _xmlSecDSigReferenceCtx xmlSecDSigReferenceCtx,
+ *xmlSecDSigReferenceCtxPtr;
/**
* xmlSecDSigStatus:
- * @xmlSecDSigStatusUnknown: the status is unknow.
- * @xmlSecDSigStatusSucceeded: the processing succeeded.
- * @xmlSecDSigStatusInvalid: the processing failed.
+ * @xmlSecDSigStatusUnknown: the status is unknown.
+ * @xmlSecDSigStatusSucceeded: the processing succeeded.
+ * @xmlSecDSigStatusInvalid: the processing failed.
*
* XML Digital signature processing status.
*/
@@ -59,7 +59,7 @@ typedef enum {
*
* If this flag is set then <dsig:Manifests/> nodes will not be processed.
*/
-#define XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS 0x00000001
+#define XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS 0x00000001
/**
* XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES:
@@ -67,7 +67,7 @@ typedef enum {
* 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
+#define XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES 0x00000002
/**
* XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES:
@@ -75,7 +75,7 @@ typedef enum {
* 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
+#define XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES 0x00000004
/**
* XMLSEC_DSIG_FLAGS_STORE_SIGNATURE:
@@ -83,103 +83,103 @@ typedef enum {
* 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
+#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.
+ * documents that don't follow XML, XPointer and XML DSig specifications.
*/
-#define XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK 0x00000010
+#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.
+ * @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.
+ * @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 verification).
+ * @status: the <dsig:Signatuire/> processing 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.
+ * 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;
+ 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;
-
+ 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;
+ 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;
-};
+ 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);
+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);
/**************************************************************************
@@ -190,9 +190,9 @@ XMLSEC_EXPORT void xmlSecDSigCtxDebugXmlDump (xmlSecDSigCtxPtr dsigCtx,
/**
* xmlSecDSigReferenceOrigin:
* @xmlSecDSigReferenceOriginSignedInfo:reference in <dsig:SignedInfo> node.
- * @xmlSecDSigReferenceOriginManifest: reference <dsig:Manifest> node.
- *
- * The possible <dsig:Reference/> node locations: in the <dsig:SignedInfo/>
+ * @xmlSecDSigReferenceOriginManifest: reference <dsig:Manifest> node.
+ *
+ * The possible <dsig:Reference/> node locations: in the <dsig:SignedInfo/>
* node or in the <dsig:Manifest/> node.
*/
typedef enum {
@@ -202,60 +202,60 @@ typedef enum {
/**
* 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.
+ * @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;
+ void* userData;
+ xmlSecDSigCtxPtr dsigCtx;
+ xmlSecDSigReferenceOrigin origin;
+ xmlSecTransformCtx transformCtx;
+ xmlSecTransformPtr digestMethod;
+
+ xmlSecBufferPtr result;
+ xmlSecDSigStatus status;
+ xmlSecTransformPtr preDigestMemBufMethod;
+ xmlChar* id;
+ xmlChar* uri;
+ xmlChar* type;
- xmlSecBufferPtr result;
- xmlSecDSigStatus status;
- xmlSecTransformPtr preDigestMemBufMethod;
- xmlChar* id;
- xmlChar* uri;
- xmlChar* type;
-
/* reserved for future */
- void* reserved0;
- void* reserved1;
+ 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);
+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);
/**************************************************************************
*
@@ -268,8 +268,8 @@ XMLSEC_EXPORT void xmlSecDSigReferenceCtxDebugXmlDump(xmlSecDSigReferenceCtxPtr
* The references list klass.
*/
#define xmlSecDSigReferenceCtxListId \
- xmlSecDSigReferenceCtxListGetKlass()
-XMLSEC_EXPORT xmlSecPtrListId xmlSecDSigReferenceCtxListGetKlass(void);
+ xmlSecDSigReferenceCtxListGetKlass()
+XMLSEC_EXPORT xmlSecPtrListId xmlSecDSigReferenceCtxListGetKlass(void);
#ifdef __cplusplus
}
diff --git a/include/xmlsec/xmlenc.h b/include/xmlsec/xmlenc.h
index dc6805a8..6725454d 100644
--- a/include/xmlsec/xmlenc.h
+++ b/include/xmlsec/xmlenc.h
@@ -1,26 +1,26 @@
-/**
+/**
* 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__
+#define __XMLSEC_XMLENC_H__
#ifndef XMLSEC_NO_XMLENC
-
+
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
-#include <stdio.h>
+#endif /* __cplusplus */
+#include <stdio.h>
#include <libxml/tree.h>
-#include <libxml/parser.h>
+#include <libxml/parser.h>
#include <xmlsec/xmlsec.h>
#include <xmlsec/buffer.h>
@@ -29,10 +29,10 @@ extern "C" {
#include <xmlsec/keyinfo.h>
#include <xmlsec/transforms.h>
-/**
- * xmlEncCtxMode:
- * @xmlEncCtxModeEncryptedData: the <enc:EncryptedData/> element procesing.
- * @xmlEncCtxModeEncryptedKey: the <enc:EncryptedKey/> element processing.
+/**
+ * xmlEncCtxMode:
+ * @xmlEncCtxModeEncryptedData: the <enc:EncryptedData/> element procesing.
+ * @xmlEncCtxModeEncryptedKey: the <enc:EncryptedKey/> element processing.
*
* The #xmlSecEncCtx mode.
*/
@@ -47,111 +47,111 @@ typedef enum {
*
* If this flag is set, then the replaced node will be returned in the replacedNodeList
*/
-#define XMLSEC_ENC_RETURN_REPLACED_NODE 0x00000001
+#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.
+ * @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 verification).
+ * @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.
- *
+ * @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;
+ 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;
+ 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 */
+ 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);
+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
}
diff --git a/include/xmlsec/xmlsec.h b/include/xmlsec/xmlsec.h
index f7c4a20d..ad44918b 100644
--- a/include/xmlsec/xmlsec.h
+++ b/include/xmlsec/xmlsec.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/tree.h>
@@ -31,7 +31,7 @@ extern "C" {
*
* Void pointer.
*/
-typedef void* xmlSecPtr;
+typedef void* xmlSecPtr;
/**
* xmlSecSize:
@@ -40,47 +40,55 @@ typedef void* xmlSecPtr;
* but it will break ABI (todo).
*/
#ifdef XMLSEC_NO_SIZE_T
-#define xmlSecSize unsigned int
+#define xmlSecSize unsigned int
#else /* XMLSEC_NO_SIZE_T */
-#define xmlSecSize 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
+#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;
+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;
+typedef struct _xmlSecDSigCtx xmlSecDSigCtx, *xmlSecDSigCtxPtr;
#endif /* XMLSEC_NO_XMLDSIG */
#ifndef XMLSEC_NO_XMLENC
-typedef struct _xmlSecEncCtx xmlSecEncCtx, *xmlSecEncCtxPtr;
+typedef struct _xmlSecEncCtx xmlSecEncCtx, *xmlSecEncCtxPtr;
#endif /* XMLSEC_NO_XMLENC */
#ifndef XMLSEC_NO_XKMS
-typedef struct _xmlSecXkmsServerCtx xmlSecXkmsServerCtx, *xmlSecXkmsServerCtxPtr;
+typedef struct _xmlSecXkmsServerCtx xmlSecXkmsServerCtx, *xmlSecXkmsServerCtxPtr;
#endif /* XMLSEC_NO_XKMS */
-XMLSEC_EXPORT int xmlSecInit (void);
-XMLSEC_EXPORT int xmlSecShutdown (void);
+XMLSEC_EXPORT int xmlSecInit (void);
+XMLSEC_EXPORT int xmlSecShutdown (void);
@@ -89,30 +97,30 @@ XMLSEC_EXPORT int xmlSecShutdown (void);
* Version checking
*
***********************************************************************/
-/**
+/**
* xmlSecCheckVersionExact:
*
- * Macro. Returns 1 if the loaded xmlsec library version exactly matches
+ * 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() \
+#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() \
+#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.
+ * @xmlSecCheckVersionExactMatch: the version should match exactly.
+ * @xmlSecCheckVersionABICompatible: the version should be ABI compatible.
*
* The xmlsec library version mode.
*/
@@ -121,10 +129,10 @@ typedef enum {
xmlSecCheckVersionABICompatible
} xmlSecCheckVersionMode;
-XMLSEC_EXPORT int xmlSecCheckVersionExt (int major,
- int minor,
- int subminor,
- xmlSecCheckVersionMode mode);
+XMLSEC_EXPORT int xmlSecCheckVersionExt (int major,
+ int minor,
+ int subminor,
+ xmlSecCheckVersionMode mode);
/**
* ATTRIBUTE_UNUSED:
@@ -142,6 +150,63 @@ XMLSEC_EXPORT int xmlSecCheckVersionExt (int major,
#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 */
diff --git a/include/xmlsec/xmltree.h b/include/xmlsec/xmltree.h
index ffba25f8..c75e51eb 100644
--- a/include/xmlsec/xmltree.h
+++ b/include/xmlsec/xmltree.h
@@ -1,19 +1,19 @@
-/**
+/**
* 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__
+#define __XMLSEC_TREE_H__
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <stdio.h>
@@ -23,79 +23,79 @@ extern "C" {
/**
* xmlSecNodeGetName:
- * @node: the pointer to node.
+ * @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 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 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 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,
@@ -103,8 +103,8 @@ XMLSEC_EXPORT int xmlSecPrintXmlString (FILE * fd,
/**
* xmlSecIsHex:
- * @c: the character.
- *
+ * @c: the character.
+ *
* Macro. Returns 1 if @c is a hex digit or 0 other wise.
*/
#define xmlSecIsHex(c) \
@@ -114,7 +114,7 @@ XMLSEC_EXPORT int xmlSecPrintXmlString (FILE * fd,
/**
* xmlSecGetHex:
- * @c: the character,
+ * @c: the character,
*
* Macro. Returns the hex value of the @c.
*/
@@ -129,19 +129,19 @@ XMLSEC_EXPORT int xmlSecPrintXmlString (FILE * fd,
*
************************************************************************/
-/**
+/**
* xmlSecQName2IntegerInfo:
- * @qnameHref: the QName href
- * @qnameLocalPart: the QName local
- * @intValue: the integer value
- *
+ * @qnameHref: the QName href
+ * @qnameLocalPart: the QName local
+ * @intValue: the integer value
+ *
* QName <-> Integer conversion definition.
*/
-typedef struct _xmlSecQName2IntegerInfo xmlSecQName2IntegerInfo, *xmlSecQName2IntegerInfoPtr;
+typedef struct _xmlSecQName2IntegerInfo xmlSecQName2IntegerInfo, *xmlSecQName2IntegerInfoPtr;
struct _xmlSecQName2IntegerInfo {
const xmlChar* qnameHref;
const xmlChar* qnameLocalPart;
- int intValue;
+ int intValue;
};
/**
@@ -149,48 +149,48 @@ struct _xmlSecQName2IntegerInfo {
*
* Pointer to constant QName <-> Integer conversion definition.
*/
-typedef const xmlSecQName2IntegerInfo * xmlSecQName2IntegerInfoConstPtr;
+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);
+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);
/*************************************************************************
*
@@ -198,22 +198,22 @@ XMLSEC_EXPORT void xmlSecQName2IntegerDebugXmlDump(xmlSecQName2IntegerInfoConst
*
************************************************************************/
-/**
+/**
* xmlSecBitMask:
- *
+ *
* Bitmask datatype.
*/
-typedef unsigned int xmlSecBitMask;
+typedef unsigned int xmlSecBitMask;
-/**
+/**
* xmlSecQName2BitMaskInfo:
- * @qnameHref: the QName href
- * @qnameLocalPart: the QName local
- * @mask: the bitmask value
- *
+ * @qnameHref: the QName href
+ * @qnameLocalPart: the QName local
+ * @mask: the bitmask value
+ *
* QName <-> Bitmask conversion definition.
*/
-typedef struct _xmlSecQName2BitMaskInfo xmlSecQName2BitMaskInfo, *xmlSecQName2BitMaskInfoPtr;
+typedef struct _xmlSecQName2BitMaskInfo xmlSecQName2BitMaskInfo, *xmlSecQName2BitMaskInfoPtr;
struct _xmlSecQName2BitMaskInfo {
const xmlChar* qnameHref;
@@ -221,50 +221,50 @@ struct _xmlSecQName2BitMaskInfo {
xmlSecBitMask mask;
};
-/**
+/**
* xmlSecQName2BitMaskInfoConstPtr:
- *
+ *
* Pointer to constant QName <-> Bitmask conversion definition.
*/
-typedef const xmlSecQName2BitMaskInfo* xmlSecQName2BitMaskInfoConstPtr;
+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);
-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