diff options
Diffstat (limited to 'include/xmlsec/gnutls')
-rw-r--r-- | include/xmlsec/gnutls/Makefile.am | 1 | ||||
-rw-r--r-- | include/xmlsec/gnutls/Makefile.in | 21 | ||||
-rw-r--r-- | include/xmlsec/gnutls/app.h | 120 | ||||
-rw-r--r-- | include/xmlsec/gnutls/crypto.h | 387 | ||||
-rw-r--r-- | include/xmlsec/gnutls/symbols.h | 129 | ||||
-rw-r--r-- | include/xmlsec/gnutls/x509.h | 110 |
6 files changed, 176 insertions, 592 deletions
diff --git a/include/xmlsec/gnutls/Makefile.am b/include/xmlsec/gnutls/Makefile.am index 78235c4c..45b03d6a 100644 --- a/include/xmlsec/gnutls/Makefile.am +++ b/include/xmlsec/gnutls/Makefile.am @@ -6,7 +6,6 @@ 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 a650e801..e3cd79c9 100644 --- a/include/xmlsec/gnutls/Makefile.in +++ b/include/xmlsec/gnutls/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -38,13 +38,10 @@ subdir = include/xmlsec/gnutls DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(xmlsecgnutlsinc_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -100,10 +97,6 @@ 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,10 +158,8 @@ 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@ +PKG_CONFIG_ENABLED = @PKG_CONFIG_ENABLED@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ @@ -195,8 +186,6 @@ 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@ @@ -206,7 +195,6 @@ 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@ @@ -296,7 +284,6 @@ xmlsecgnutlsinc_HEADERS = \ app.h \ crypto.h \ symbols.h \ -x509.h \ $(NULL) all: all-am diff --git a/include/xmlsec/gnutls/app.h b/include/xmlsec/gnutls/app.h index 4a2f3e1b..50ee97d8 100644 --- a/include/xmlsec/gnutls/app.h +++ b/include/xmlsec/gnutls/app.h @@ -1,92 +1,86 @@ -/** +/** * 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 09ac5b41..7570831c 100644 --- a/include/xmlsec/gnutls/crypto.h +++ b/include/xmlsec/gnutls/crypto.h @@ -1,36 +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_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); /******************************************************************** @@ -41,69 +39,41 @@ XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSGenerateRandom (xmlSecB #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); - -/** - * 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); - + xmlSecGnuTLSTransformAes256CbcGetKlass() +XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformAes256CbcGetKlass(void); #endif /* XMLSEC_NO_AES */ @@ -115,76 +85,27 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformKWAes256GetKlass(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 */ - - /******************************************************************** * @@ -196,267 +117,67 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformDsaSha1GetKlass(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); - -#ifndef XMLSEC_NO_MD5 + xmlSecGnuTLSKeyDataHmacGetKlass() +XMLSEC_CRYPTO_EXPORT xmlSecKeyDataId xmlSecGnuTLSKeyDataHmacGetKlass (void); +XMLSEC_CRYPTO_EXPORT int xmlSecGnuTLSKeyDataHmacSet (xmlSecKeyDataPtr data, + const xmlSecByte* buf, + xmlSecSize bufSize); /** * 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 */ /******************************************************************** * - * 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 + * SHA1 transform * *******************************************************************/ #ifndef XMLSEC_NO_SHA1 /** * xmlSecGnuTLSTransformSha1Id: - * - * The HMAC with SHA1 signature transform klass. + * + * The SHA1 digest 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 818035d6..0fcd861a 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,83 +15,76 @@ #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 */ @@ -101,4 +94,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 deleted file mode 100644 index c5c811ad..00000000 --- a/include/xmlsec/gnutls/x509.h +++ /dev/null @@ -1,110 +0,0 @@ -/** - * 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__ */ |