[arch-commits] Commit in xmlsec/repos (3 files)

Andreas Radke andyrtr at archlinux.org
Thu Apr 4 19:57:12 UTC 2019


    Date: Thursday, April 4, 2019 @ 19:57:11
  Author: andyrtr
Revision: 349839

archrelease: copy trunk to testing-x86_64

Added:
  xmlsec/repos/testing-x86_64/
  xmlsec/repos/testing-x86_64/PKGBUILD
    (from rev 349838, xmlsec/trunk/PKGBUILD)
  xmlsec/repos/testing-x86_64/no_extern_c_scope.patch
    (from rev 349838, xmlsec/trunk/no_extern_c_scope.patch)

-------------------------+
 PKGBUILD                |   41 +
 no_extern_c_scope.patch | 1610 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 1651 insertions(+)

Copied: xmlsec/repos/testing-x86_64/PKGBUILD (from rev 349838, xmlsec/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2019-04-04 19:57:11 UTC (rev 349839)
@@ -0,0 +1,41 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+# Contributor: Hussam Al-Tayeb <ht990332 at gmail.com>
+
+pkgname=xmlsec
+pkgver=1.2.27
+pkgrel=2
+pkgdesc="XML Security Library is a C library based on LibXML2"
+license=('custom')
+arch=('x86_64')
+url="https://www.aleksey.com/xmlsec/index.html"
+depends=('libxslt' 'openssl' 'gnutls' 'nss' 'libltdl')
+source=(https://www.aleksey.com/xmlsec/download/${pkgname}1-${pkgver}.tar.gz # signature file not compatible
+        no_extern_c_scope.patch)
+sha256sums=('97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6'
+            '2c43c0c31da6b8c12944626598c9f067bb61ad87a58220897e0bf7f4dfffb95a')
+#validpgpkeys=('') #
+
+prepare() {
+  cd ${pkgname}1-${pkgver}
+  # https://github.com/lsh123/xmlsec/commit/0a14f52e9a5976c104d0fc2d1f739508042aa752 - needed to build with icu >=64.1
+  patch -Np1 -i ../no_extern_c_scope.patch
+}
+
+build() {
+  cd ${pkgname}1-${pkgver}
+  ./configure --prefix=/usr --disable-static
+  make
+}
+
+check() {
+  cd ${pkgname}1-$pkgver
+  make -k check
+}
+
+package() {
+  cd ${pkgname}1-${pkgver}
+  make DESTDIR=${pkgdir} install
+  install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
+  install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/
+}

Copied: xmlsec/repos/testing-x86_64/no_extern_c_scope.patch (from rev 349838, xmlsec/trunk/no_extern_c_scope.patch)
===================================================================
--- testing-x86_64/no_extern_c_scope.patch	                        (rev 0)
+++ testing-x86_64/no_extern_c_scope.patch	2019-04-04 19:57:11 UTC (rev 349839)
@@ -0,0 +1,1610 @@
+From 0a14f52e9a5976c104d0fc2d1f739508042aa752 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev at gmail.com>
+Date: Sat, 30 Mar 2019 17:36:58 +0300
+Subject: [PATCH] build: do not extern "C" scope for include files (#249)
+
+C++ include files such as icu do not expect the scope to be in C, as include directive is expected to be performed at global scope. Not clear why C++ include files are included from C include files though.
+---
+ apps/cmdline.h                      |  4 ++--
+ apps/crypto.h                       |  8 ++++----
+ include/xmlsec/app.h                |  8 ++++----
+ include/xmlsec/base64.h             |  8 ++++----
+ include/xmlsec/bn.h                 |  8 ++++----
+ include/xmlsec/buffer.h             |  6 +++---
+ include/xmlsec/crypto.h             |  8 --------
+ include/xmlsec/dl.h                 | 22 +++++++++++++---------
+ include/xmlsec/gcrypt/app.h         |  8 ++++----
+ include/xmlsec/gcrypt/crypto.h      |  8 ++++----
+ include/xmlsec/gnutls/app.h         |  8 ++++----
+ include/xmlsec/gnutls/crypto.h      | 22 ++++++++++++----------
+ include/xmlsec/gnutls/x509.h        | 11 +++++------
+ include/xmlsec/io.h                 |  8 ++++----
+ include/xmlsec/keyinfo.h            |  8 ++++----
+ include/xmlsec/keys.h               |  7 +++----
+ include/xmlsec/keysdata.h           |  8 ++++----
+ include/xmlsec/keysmngr.h           |  8 ++++----
+ include/xmlsec/list.h               |  6 +++---
+ include/xmlsec/membuf.h             |  8 ++++----
+ include/xmlsec/mscng/app.h          |  8 ++++----
+ include/xmlsec/mscng/certkeys.h     |  8 ++++----
+ include/xmlsec/mscng/crypto.h       |  8 ++++----
+ include/xmlsec/mscng/keysstore.h    |  4 ++--
+ include/xmlsec/mscng/x509.h         | 12 ++++++------
+ include/xmlsec/mscrypto/app.h       |  8 ++++----
+ include/xmlsec/mscrypto/certkeys.h  |  7 +++----
+ include/xmlsec/mscrypto/crypto.h    |  8 ++++----
+ include/xmlsec/mscrypto/keysstore.h |  4 ++--
+ include/xmlsec/mscrypto/x509.h      | 12 ++++++------
+ include/xmlsec/nodeset.h            |  8 ++++----
+ include/xmlsec/nss/app.h            |  8 ++++----
+ include/xmlsec/nss/bignum.h         |  8 ++++----
+ include/xmlsec/nss/crypto.h         |  8 ++++----
+ include/xmlsec/nss/keysstore.h      |  4 ++--
+ include/xmlsec/nss/pkikeys.h        |  7 +++----
+ include/xmlsec/nss/x509.h           | 12 ++++++------
+ include/xmlsec/openssl/app.h        |  8 ++++----
+ include/xmlsec/openssl/bn.h         |  8 ++++----
+ include/xmlsec/openssl/crypto.h     | 29 +++++++++++++++++++----------
+ include/xmlsec/openssl/evp.h        |  7 +++----
+ include/xmlsec/openssl/x509.h       | 12 ++++++------
+ include/xmlsec/parser.h             |  7 +++----
+ include/xmlsec/private.h            | 23 +++++++++++++----------
+ include/xmlsec/skeleton/app.h       |  8 ++++----
+ include/xmlsec/skeleton/crypto.h    |  8 ++++----
+ include/xmlsec/soap.h               |  7 +++----
+ include/xmlsec/strings.h            |  8 ++++----
+ include/xmlsec/templates.h          |  8 ++++----
+ include/xmlsec/transforms.h         | 13 ++++++++-----
+ include/xmlsec/x509.h               |  7 ++++---
+ include/xmlsec/xmldsig.h            |  8 ++++----
+ include/xmlsec/xmlenc.h             |  7 ++++---
+ include/xmlsec/xmlsec.h             |  8 ++++----
+ include/xmlsec/xmltree.h            | 13 ++++++++-----
+ 55 files changed, 258 insertions(+), 247 deletions(-)
+
+diff --git a/apps/cmdline.h b/apps/cmdline.h
+index 11efd97b..518faf06 100644
+--- a/apps/cmdline.h
++++ b/apps/cmdline.h
+@@ -10,12 +10,12 @@
+ #ifndef __XMLSEC_APPS_CMDLINE_H__
+ #define __XMLSEC_APPS_CMDLINE_H__    
+ 
++#include <time.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */ 
+ 
+-#include <time.h>
+-
+ typedef struct _xmlSecAppCmdLineParam           xmlSecAppCmdLineParam,
+                                                 *xmlSecAppCmdLineParamPtr;
+ typedef struct _xmlSecAppCmdLineValue           xmlSecAppCmdLineValue,
+diff --git a/apps/crypto.h b/apps/crypto.h
+index b41d0c0d..3b8e1fc3 100644
+--- a/apps/crypto.h
++++ b/apps/crypto.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_APPS_CRYPTO_H__
+ #define __XMLSEC_APPS_CRYPTO_H__    
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */ 
+-
+ #include <libxml/tree.h>
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+@@ -20,6 +16,10 @@ extern "C" {
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/crypto.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ int     xmlSecAppCryptoInit                                     (const char* config);
+ int     xmlSecAppCryptoShutdown                                 (void);
+ 
+diff --git a/include/xmlsec/app.h b/include/xmlsec/app.h
+index 7f6de78e..97f7d3db 100644
+--- a/include/xmlsec/app.h
++++ b/include/xmlsec/app.h
+@@ -16,10 +16,6 @@
+ #error To use dynamic crypto engines loading define XMLSEC_CRYPTO_DYNAMIC_LOADING
+ #endif /* !defined(IN_XMLSEC) && !defined(XMLSEC_CRYPTO_DYNAMIC_LOADING) */
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <libxml/xmlIO.h>
+ 
+@@ -30,6 +26,10 @@ extern "C" {
+ #include <xmlsec/transforms.h>
+ #include <xmlsec/dl.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**********************************************************************
+  *
+  * Crypto Init/shutdown
+diff --git a/include/xmlsec/base64.h b/include/xmlsec/base64.h
+index 36d8a493..7e13862f 100644
+--- a/include/xmlsec/base64.h
++++ b/include/xmlsec/base64.h
+@@ -11,15 +11,15 @@
+ #ifndef __XMLSEC_BASE64_H__
+ #define __XMLSEC_BASE64_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * XMLSEC_BASE64_LINESIZE:
+  *
+diff --git a/include/xmlsec/bn.h b/include/xmlsec/bn.h
+index f9d2b6d3..aba1cf6f 100644
+--- a/include/xmlsec/bn.h
++++ b/include/xmlsec/bn.h
+@@ -11,14 +11,14 @@
+ #ifndef __XMLSEC_BN_H__
+ #define __XMLSEC_BN_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/buffer.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ typedef xmlSecBuffer                                            xmlSecBn,
+                                                                 *xmlSecBnPtr;
+ 
+diff --git a/include/xmlsec/buffer.h b/include/xmlsec/buffer.h
+index d1f3952c..d942c868 100644
+--- a/include/xmlsec/buffer.h
++++ b/include/xmlsec/buffer.h
+@@ -11,13 +11,13 @@
+ #ifndef __XMLSEC_BUFFER_H__
+ #define __XMLSEC_BUFFER_H__
+ 
++#include <libxml/tree.h>
++#include <xmlsec/xmlsec.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+ 
+-#include <libxml/tree.h>
+-#include <xmlsec/xmlsec.h>
+-
+ typedef struct _xmlSecBuffer                                    xmlSecBuffer,
+                                                                 *xmlSecBufferPtr;
+ 
+diff --git a/include/xmlsec/crypto.h b/include/xmlsec/crypto.h
+index af6ad426..8f138396 100644
+--- a/include/xmlsec/crypto.h
++++ b/include/xmlsec/crypto.h
+@@ -11,10 +11,6 @@
+ #ifndef __XMLSEC_CRYPTO_H__
+ #define __XMLSEC_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ 
+ /* include nothing if we compile xmlsec library itself */
+@@ -74,9 +70,5 @@ extern "C" {
+ #endif /* IN_XMLSEC_CRYPTO */
+ #endif /* IN_XMLSEC */
+ 
+-#ifdef __cplusplus
+-}
+-#endif /* __cplusplus */
+-
+ #endif /* __XMLSEC_CRYPTO_H__ */
+ 
+diff --git a/include/xmlsec/dl.h b/include/xmlsec/dl.h
+index dc73ecdc..4992c754 100644
+--- a/include/xmlsec/dl.h
++++ b/include/xmlsec/dl.h
+@@ -10,6 +10,19 @@
+ #ifndef __XMLSEC_DL_H__
+ #define __XMLSEC_DL_H__
+ 
++#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
++
++#include <libxml/tree.h>
++#include <libxml/xmlIO.h>
++
++#include <xmlsec/xmlsec.h>
++#include <xmlsec/keysdata.h>
++#include <xmlsec/keys.h>
++#include <xmlsec/keysmngr.h>
++#include <xmlsec/transforms.h>
++
++#endif /* XMLSEC_NO_CRYPTO_DYNAMIC_LOADING */
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+@@ -22,15 +35,6 @@ XMLSEC_EXPORT int                               xmlSecCryptoDLFunctionsRegisterK
+ 
+ #ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
+ 
+-#include <libxml/tree.h>
+-#include <libxml/xmlIO.h>
+-
+-#include <xmlsec/xmlsec.h>
+-#include <xmlsec/keysdata.h>
+-#include <xmlsec/keys.h>
+-#include <xmlsec/keysmngr.h>
+-#include <xmlsec/transforms.h>
+-
+ /****************************************************************************
+  *
+  * Dynamic load functions
+diff --git a/include/xmlsec/gcrypt/app.h b/include/xmlsec/gcrypt/app.h
+index f0eb88fb..bb3baad1 100644
+--- a/include/xmlsec/gcrypt/app.h
++++ b/include/xmlsec/gcrypt/app.h
+@@ -9,15 +9,15 @@
+ #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>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/gcrypt/crypto.h b/include/xmlsec/gcrypt/crypto.h
+index 6fe86d70..645a3548 100644
+--- a/include/xmlsec/gcrypt/crypto.h
++++ b/include/xmlsec/gcrypt/crypto.h
+@@ -9,10 +9,6 @@
+ #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>
+@@ -20,6 +16,10 @@ extern "C" {
+ 
+ #include <gcrypt.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_gcrypt(void);
+ 
+ /********************************************************************
+diff --git a/include/xmlsec/gnutls/app.h b/include/xmlsec/gnutls/app.h
+index f13c085f..05e9a5b5 100644
+--- a/include/xmlsec/gnutls/app.h
++++ b/include/xmlsec/gnutls/app.h
+@@ -9,15 +9,15 @@
+ #ifndef __XMLSEC_GNUTLS_APP_H__
+ #define __XMLSEC_GNUTLS_APP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/gnutls/crypto.h b/include/xmlsec/gnutls/crypto.h
+index 399e26f1..8ffce05c 100644
+--- a/include/xmlsec/gnutls/crypto.h
++++ b/include/xmlsec/gnutls/crypto.h
+@@ -9,14 +9,22 @@
+ #ifndef __XMLSEC_GNUTLS_CRYPTO_H__
+ #define __XMLSEC_GNUTLS_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ #include <xmlsec/dl.h>
++#ifndef XMLSEC_NO_DSA
++#include <gnutls/gnutls.h>
++#include <gnutls/x509.h>
++#endif /* XMLSEC_NO_DSA */
++#ifndef XMLSEC_NO_RSA
++#include <gnutls/gnutls.h>
++#include <gnutls/x509.h>
++#endif /* XMLSEC_NO_RSA */
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_gnutls(void);
+ 
+@@ -152,9 +160,6 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformKWDes3GetKlass(void)
+  *******************************************************************/
+ #ifndef XMLSEC_NO_DSA
+ 
+-#include <gnutls/gnutls.h>
+-#include <gnutls/x509.h>
+-
+ /**
+  * xmlSecGnuTLSKeyDataDsaId:
+  *
+@@ -284,9 +289,6 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecGnuTLSTransformHmacSha512GetKlass(v
+  *******************************************************************/
+ #ifndef XMLSEC_NO_RSA
+ 
+-#include <gnutls/gnutls.h>
+-#include <gnutls/x509.h>
+-
+ /**
+  * xmlSecGnuTLSKeyDataRsaId:
+  *
+diff --git a/include/xmlsec/gnutls/x509.h b/include/xmlsec/gnutls/x509.h
+index 1da86d3c..d90d28d4 100644
+--- a/include/xmlsec/gnutls/x509.h
++++ b/include/xmlsec/gnutls/x509.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_GNUTLS_X509_H__
+ #define __XMLSEC_GNUTLS_X509_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #ifndef XMLSEC_NO_X509
+ 
+ #include <gnutls/gnutls.h>
+@@ -22,6 +18,9 @@ extern "C" {
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ /**************************************************************************
+  *
+@@ -101,10 +100,10 @@ XMLSEC_CRYPTO_EXPORT int                xmlSecGnuTLSX509StoreAdoptCert  (xmlSecK
+ 
+ 
+ 
+-#endif /* XMLSEC_NO_X509 */
+-
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+ 
++#endif /* XMLSEC_NO_X509 */
++
+ #endif /* __XMLSEC_GNUTLS_X509_H__ */
+diff --git a/include/xmlsec/io.h b/include/xmlsec/io.h
+index 84786635..246d0c72 100644
+--- a/include/xmlsec/io.h
++++ b/include/xmlsec/io.h
+@@ -11,16 +11,16 @@
+ #ifndef __XMLSEC_IO_H__
+ #define __XMLSEC_IO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <libxml/xmlIO.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_EXPORT int       xmlSecIOInit                            (void);
+ XMLSEC_EXPORT void      xmlSecIOShutdown                        (void);
+ XMLSEC_EXPORT void      xmlSecIOCleanupCallbacks                (void);
+diff --git a/include/xmlsec/keyinfo.h b/include/xmlsec/keyinfo.h
+index b4f080cc..1f79284d 100644
+--- a/include/xmlsec/keyinfo.h
++++ b/include/xmlsec/keyinfo.h
+@@ -12,10 +12,6 @@
+ #ifndef __XMLSEC_KEYINFO_H__
+ #define __XMLSEC_KEYINFO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <time.h>
+ 
+ #include <libxml/tree.h>
+@@ -26,6 +22,10 @@ extern "C" {
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /****************************************************************************
+  *
+  * High-level functions
+diff --git a/include/xmlsec/keys.h b/include/xmlsec/keys.h
+index ca164370..f673128a 100644
+--- a/include/xmlsec/keys.h
++++ b/include/xmlsec/keys.h
+@@ -11,16 +11,15 @@
+ #ifndef __XMLSEC_KEYS_H__
+ #define __XMLSEC_KEYS_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <time.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/list.h>
+ #include <xmlsec/keysdata.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ /**
+  * xmlSecKeyUsage:
+diff --git a/include/xmlsec/keysdata.h b/include/xmlsec/keysdata.h
+index b39cff38..10639aa1 100644
+--- a/include/xmlsec/keysdata.h
++++ b/include/xmlsec/keysdata.h
+@@ -11,16 +11,16 @@
+ #ifndef __XMLSEC_KEYSDATA_H__
+ #define __XMLSEC_KEYSDATA_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/buffer.h>
+ #include <xmlsec/list.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /****************************************************************************
+  *
+  * Forward declarations
+diff --git a/include/xmlsec/keysmngr.h b/include/xmlsec/keysmngr.h
+index 2b2b7db9..de49d8ed 100644
+--- a/include/xmlsec/keysmngr.h
++++ b/include/xmlsec/keysmngr.h
+@@ -11,16 +11,16 @@
+ #ifndef __XMLSEC_KEYSMGMR_H__
+ #define __XMLSEC_KEYSMGMR_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/list.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/keysdata.h>
+ #include <xmlsec/keyinfo.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ typedef const struct _xmlSecKeyKlass                    xmlSecKeyKlass,
+                                                         *xmlSecKeyId;
+ typedef const struct _xmlSecKeyStoreKlass               xmlSecKeyStoreKlass,
+diff --git a/include/xmlsec/list.h b/include/xmlsec/list.h
+index 903ee9e5..46adc8d2 100644
+--- a/include/xmlsec/list.h
++++ b/include/xmlsec/list.h
+@@ -11,13 +11,13 @@
+ #ifndef __XMLSEC_LIST_H__
+ #define __XMLSEC_LIST_H__
+ 
++#include <xmlsec/xmlsec.h>
++#include <xmlsec/buffer.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+ 
+-#include <xmlsec/xmlsec.h>
+-#include <xmlsec/buffer.h>
+-
+ typedef const struct _xmlSecPtrListKlass                        xmlSecPtrListKlass,
+                                                                 *xmlSecPtrListId;
+ typedef struct _xmlSecPtrList                                   xmlSecPtrList,
+diff --git a/include/xmlsec/membuf.h b/include/xmlsec/membuf.h
+index fcc6eafe..c5959c44 100644
+--- a/include/xmlsec/membuf.h
++++ b/include/xmlsec/membuf.h
+@@ -11,16 +11,16 @@
+ #ifndef __XMLSEC_MEMBUF_H__
+ #define __XMLSEC_MEMBUF_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/buffer.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Memory Buffer transform
+diff --git a/include/xmlsec/mscng/app.h b/include/xmlsec/mscng/app.h
+index 810a1a53..f1fbf6f8 100644
+--- a/include/xmlsec/mscng/app.h
++++ b/include/xmlsec/mscng/app.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCNG_APP_H__
+ #define __XMLSEC_MSCNG_APP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <windows.h>
+ 
+ #include <xmlsec/xmlsec.h>
+@@ -20,6 +16,10 @@ extern "C" {
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/mscng/certkeys.h b/include/xmlsec/mscng/certkeys.h
+index ad7edb9e..16461088 100644
+--- a/include/xmlsec/mscng/certkeys.h
++++ b/include/xmlsec/mscng/certkeys.h
+@@ -9,16 +9,16 @@
+ #ifndef __XMLSEC_MSCNG_CERTKEYS_H__
+ #define __XMLSEC_MSCNG_CERTKEYS_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <windows.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr   xmlSecMSCngCertAdopt         (PCCERT_CONTEXT pCert,
+                                                                       xmlSecKeyDataType type);
+ XMLSEC_CRYPTO_EXPORT BCRYPT_KEY_HANDLE  xmlSecMSCngKeyDataGetPubKey  (xmlSecKeyDataPtr data);
+diff --git a/include/xmlsec/mscng/crypto.h b/include/xmlsec/mscng/crypto.h
+index 5bbf3f0d..c8afa792 100644
+--- a/include/xmlsec/mscng/crypto.h
++++ b/include/xmlsec/mscng/crypto.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCNG_CRYPTO_H__
+ #define __XMLSEC_MSCNG_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <windows.h>
+ 
+ #include <xmlsec/xmlsec.h>
+@@ -20,6 +16,10 @@ extern "C" {
+ #include <xmlsec/transforms.h>
+ #include <xmlsec/dl.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_mscng(void);
+ 
+ XMLSEC_DEPRECATED XMLSEC_CRYPTO_EXPORT LPTSTR xmlSecMSCngConvertUtf8ToTstr(const xmlChar* str);
+diff --git a/include/xmlsec/mscng/keysstore.h b/include/xmlsec/mscng/keysstore.h
+index bd8b0170..20a4eb13 100644
+--- a/include/xmlsec/mscng/keysstore.h
++++ b/include/xmlsec/mscng/keysstore.h
+@@ -9,12 +9,12 @@
+ #ifndef __XMLSEC_MSCNG_KEYSSTORE_H__
+ #define __XMLSEC_MSCNG_KEYSSTORE_H__
+ 
++#include <xmlsec/xmlsec.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+ 
+-#include <xmlsec/xmlsec.h>
+-
+ /**
+  * xmlSecMSCngKeysStoreId:
+  *
+diff --git a/include/xmlsec/mscng/x509.h b/include/xmlsec/mscng/x509.h
+index 0a3aa989..6c2f7415 100644
+--- a/include/xmlsec/mscng/x509.h
++++ b/include/xmlsec/mscng/x509.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCNG_X509_H__
+ #define __XMLSEC_MSCNG_X509_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #ifndef XMLSEC_NO_X509
+ 
+ #include <xmlsec/xmlsec.h>
+@@ -21,6 +17,10 @@ extern "C" {
+ 
+ #include <windows.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * xmlSecMSCngKeyDataX509Id:
+  *
+@@ -74,10 +74,10 @@ PCCERT_CONTEXT                          xmlSecMSCngX509FindCertBySubject     (HC
+                                                                               LPTSTR wcSubject,
+                                                                               DWORD dwCertEncodingType);
+ 
+-#endif /* XMLSEC_NO_X509 */
+-
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+ 
++#endif /* XMLSEC_NO_X509 */
++
+ #endif /* __XMLSEC_MSCNG_X509_H__ */
+diff --git a/include/xmlsec/mscrypto/app.h b/include/xmlsec/mscrypto/app.h
+index a370d4dc..86f7e513 100644
+--- a/include/xmlsec/mscrypto/app.h
++++ b/include/xmlsec/mscrypto/app.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCRYPTO_APP_H__
+ #define __XMLSEC_MSCRYPTO_APP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/keysmngr.h>
+@@ -21,6 +17,10 @@ extern "C" {
+ #include <windows.h>
+ #include <wincrypt.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/mscrypto/certkeys.h b/include/xmlsec/mscrypto/certkeys.h
+index 0e818f4a..817e3f44 100644
+--- a/include/xmlsec/mscrypto/certkeys.h
++++ b/include/xmlsec/mscrypto/certkeys.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCRYPTO_CERTKEYS_H__
+ #define __XMLSEC_MSCRYPTO_CERTKEYS_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <windows.h>
+ #include <wincrypt.h>
+ 
+@@ -20,6 +16,9 @@ extern "C" {
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ XMLSEC_CRYPTO_EXPORT PCCERT_CONTEXT     xmlSecMSCryptoKeyDataGetCert    (xmlSecKeyDataPtr data);
+ XMLSEC_CRYPTO_EXPORT HCRYPTKEY          xmlSecMSCryptoKeyDataGetKey     (xmlSecKeyDataPtr data,
+diff --git a/include/xmlsec/mscrypto/crypto.h b/include/xmlsec/mscrypto/crypto.h
+index 4ddb587b..6c5e1fc6 100644
+--- a/include/xmlsec/mscrypto/crypto.h
++++ b/include/xmlsec/mscrypto/crypto.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCRYPTO_CRYPTO_H__
+ #define __XMLSEC_MSCRYPTO_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <windows.h>
+ #include <wincrypt.h>
+ 
+@@ -21,6 +17,10 @@ extern "C" {
+ #include <xmlsec/transforms.h>
+ #include <xmlsec/dl.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_mscrypto(void);
+ 
+ /********************************************************************
+diff --git a/include/xmlsec/mscrypto/keysstore.h b/include/xmlsec/mscrypto/keysstore.h
+index 49dc3196..f66f7f4c 100644
+--- a/include/xmlsec/mscrypto/keysstore.h
++++ b/include/xmlsec/mscrypto/keysstore.h
+@@ -11,12 +11,12 @@
+ #ifndef __XMLSEC_MSCRYPTO_KEYSSTORE_H__
+ #define __XMLSEC_MSCRYPTO_KEYSSTORE_H__
+ 
++#include <xmlsec/xmlsec.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+ 
+-#include <xmlsec/xmlsec.h>
+-
+ /****************************************************************************
+  *
+  * MSCrypto Keys Store
+diff --git a/include/xmlsec/mscrypto/x509.h b/include/xmlsec/mscrypto/x509.h
+index 3199f16d..cb436097 100644
+--- a/include/xmlsec/mscrypto/x509.h
++++ b/include/xmlsec/mscrypto/x509.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_MSCRYPTO_X509_H__
+ #define __XMLSEC_MSCRYPTO_X509_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #ifndef XMLSEC_NO_X509
+ 
+ #include <xmlsec/xmlsec.h>
+@@ -22,6 +18,10 @@ extern "C" {
+ #include <windows.h>
+ #include <wincrypt.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * xmlSecMSCryptoKeyDataX509Id:
+  *
+@@ -83,10 +83,10 @@ XMLSEC_CRYPTO_EXPORT void               xmlSecMSCryptoX509StoreEnableSystemTrust
+ 
+ 
+ 
+-#endif /* XMLSEC_NO_X509 */
+-
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+ 
++#endif /* XMLSEC_NO_X509 */
++
+ #endif /* __XMLSEC_MSCRYPTO_X509_H__ */
+diff --git a/include/xmlsec/nodeset.h b/include/xmlsec/nodeset.h
+index 846c7b13..92ea1d13 100644
+--- a/include/xmlsec/nodeset.h
++++ b/include/xmlsec/nodeset.h
+@@ -11,15 +11,15 @@
+ #ifndef __XMLSEC_NODESET_H__
+ #define __XMLSEC_NODESET_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <libxml/xpath.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ typedef struct _xmlSecNodeSet   xmlSecNodeSet, *xmlSecNodeSetPtr;
+ 
+ /**
+diff --git a/include/xmlsec/nss/app.h b/include/xmlsec/nss/app.h
+index 93f6c637..e53ab4d6 100644
+--- a/include/xmlsec/nss/app.h
++++ b/include/xmlsec/nss/app.h
+@@ -10,10 +10,6 @@
+ #ifndef __XMLSEC_NSS_APP_H__
+ #define __XMLSEC_NSS_APP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <nspr.h>
+ #include <nss.h>
+ 
+@@ -22,6 +18,10 @@ extern "C" {
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/nss/bignum.h b/include/xmlsec/nss/bignum.h
+index af8f313c..97848b12 100644
+--- a/include/xmlsec/nss/bignum.h
++++ b/include/xmlsec/nss/bignum.h
+@@ -11,10 +11,6 @@
+ #ifndef __XMLSEC_NSS_BIGNUM_H__
+ #define __XMLSEC_NSS_BIGNUM_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <nspr.h>
+@@ -22,6 +18,10 @@ extern "C" {
+ 
+ #include <xmlsec/xmlsec.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT SECItem*   xmlSecNssNodeGetBigNumValue     (PRArenaPool *arena,
+                                                                  const xmlNodePtr cur,
+                                                                  SECItem *a);
+diff --git a/include/xmlsec/nss/crypto.h b/include/xmlsec/nss/crypto.h
+index 55fa233f..223c1d85 100644
+--- a/include/xmlsec/nss/crypto.h
++++ b/include/xmlsec/nss/crypto.h
+@@ -10,10 +10,6 @@
+ #ifndef __XMLSEC_NSS_CRYPTO_H__
+ #define __XMLSEC_NSS_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <nspr.h>
+ #include <nss.h>
+ #include <pk11func.h>
+@@ -23,6 +19,10 @@ extern "C" {
+ #include <xmlsec/transforms.h>
+ #include <xmlsec/dl.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_nss(void);
+ 
+ /********************************************************************
+diff --git a/include/xmlsec/nss/keysstore.h b/include/xmlsec/nss/keysstore.h
+index eb64d3c3..04f80289 100644
+--- a/include/xmlsec/nss/keysstore.h
++++ b/include/xmlsec/nss/keysstore.h
+@@ -11,12 +11,12 @@
+ #ifndef __XMLSEC_NSS_KEYSSTORE_H__
+ #define __XMLSEC_NSS_KEYSSTORE_H__
+ 
++#include <xmlsec/xmlsec.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+ 
+-#include <xmlsec/xmlsec.h>
+-
+ /****************************************************************************
+  *
+  * Nss Keys Store
+diff --git a/include/xmlsec/nss/pkikeys.h b/include/xmlsec/nss/pkikeys.h
+index b987afef..e501f165 100644
+--- a/include/xmlsec/nss/pkikeys.h
++++ b/include/xmlsec/nss/pkikeys.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_NSS_PKIKEYS_H__
+ #define __XMLSEC_NSS_PKIKEYS_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <nspr.h>
+ #include <nss.h>
+ 
+@@ -20,6 +16,9 @@ extern "C" {
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ XMLSEC_CRYPTO_EXPORT xmlSecKeyDataPtr   xmlSecNssPKIAdoptKey           (SECKEYPrivateKey *privkey,
+                                                                         SECKEYPublicKey  *pubkey);
+diff --git a/include/xmlsec/nss/x509.h b/include/xmlsec/nss/x509.h
+index 1290bde4..c8bff92d 100644
+--- a/include/xmlsec/nss/x509.h
++++ b/include/xmlsec/nss/x509.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_NSS_X509_H__
+ #define __XMLSEC_NSS_X509_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #ifndef XMLSEC_NO_X509
+ 
+ #include <nspr.h>
+@@ -23,6 +19,10 @@ extern "C" {
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * xmlSecNssKeyDataX509Id:
+  *
+@@ -82,10 +82,10 @@ XMLSEC_CRYPTO_EXPORT int                        xmlSecNssX509StoreAdoptCert (xml
+                                                                              xmlSecKeyDataType type);
+ 
+ 
+-#endif /* XMLSEC_NO_X509 */
+-
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+ 
++#endif /* XMLSEC_NO_X509 */
++
+ #endif /* __XMLSEC_NSS_X509_H__ */
+diff --git a/include/xmlsec/openssl/app.h b/include/xmlsec/openssl/app.h
+index 8280b38e..15a78803 100644
+--- a/include/xmlsec/openssl/app.h
++++ b/include/xmlsec/openssl/app.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_OPENSSL_APP_H__
+ #define __XMLSEC_OPENSSL_APP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <openssl/pem.h>
+ #include <openssl/bio.h>
+ 
+@@ -21,6 +17,10 @@ extern "C" {
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/openssl/bn.h b/include/xmlsec/openssl/bn.h
+index fa42a28f..0e813635 100644
+--- a/include/xmlsec/openssl/bn.h
++++ b/include/xmlsec/openssl/bn.h
+@@ -11,16 +11,16 @@
+ #ifndef __XMLSEC_BN_H__
+ #define __XMLSEC_BN_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <openssl/bn.h>
+ 
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT BIGNUM*    xmlSecOpenSSLNodeGetBNValue     (const xmlNodePtr cur,
+                                                                  BIGNUM **a);
+ XMLSEC_CRYPTO_EXPORT int        xmlSecOpenSSLNodeSetBNValue     (xmlNodePtr cur,
+diff --git a/include/xmlsec/openssl/crypto.h b/include/xmlsec/openssl/crypto.h
+index a8820ccb..1eada05f 100644
+--- a/include/xmlsec/openssl/crypto.h
++++ b/include/xmlsec/openssl/crypto.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_OPENSSL_CRYPTO_H__
+ #define __XMLSEC_OPENSSL_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+@@ -23,6 +19,25 @@ extern "C" {
+ #include <openssl/opensslconf.h>
+ #endif /* OPENSSL_IS_BORINGSSL */
+ 
++#ifndef XMLSEC_NO_DSA
++#include <openssl/dsa.h>
++#include <openssl/evp.h>
++#endif /* XMLSEC_NO_DSA */
++
++#ifndef XMLSEC_NO_ECDSA
++#include <openssl/ecdsa.h>
++#include <openssl/evp.h>
++#endif /* XMLSEC_NO_ECDSA */
++
++#ifndef XMLSEC_NO_RSA
++#include <openssl/rsa.h>
++#include <openssl/evp.h>
++#endif /* XMLSEC_NO_RSA */
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_openssl(void);
+ 
+ /********************************************************************
+@@ -264,8 +279,6 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformKWDes3GetKlass(void
+  *
+  *******************************************************************/
+ #ifndef XMLSEC_NO_DSA
+-#include <openssl/dsa.h>
+-#include <openssl/evp.h>
+ 
+ /**
+  * xmlSecOpenSSLKeyDataDsaId:
+@@ -312,8 +325,6 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformDsaSha256GetKlass(v
+  *
+  *******************************************************************/
+ #ifndef XMLSEC_NO_ECDSA
+-#include <openssl/ecdsa.h>
+-#include <openssl/evp.h>
+ 
+ /**
+  * xmlSecOpenSSLKeyDataEcdsaId:
+@@ -633,8 +644,6 @@ XMLSEC_CRYPTO_EXPORT xmlSecTransformId xmlSecOpenSSLTransformRipemd160GetKlass(v
+  *
+  *******************************************************************/
+ #ifndef XMLSEC_NO_RSA
+-#include <openssl/rsa.h>
+-#include <openssl/evp.h>
+ 
+ /**
+  * xmlSecOpenSSLKeyDataRsaId:
+diff --git a/include/xmlsec/openssl/evp.h b/include/xmlsec/openssl/evp.h
+index 7dbd790b..318ed301 100644
+--- a/include/xmlsec/openssl/evp.h
++++ b/include/xmlsec/openssl/evp.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_OPENSSL_EVP_H__
+ #define __XMLSEC_OPENSSL_EVP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <openssl/evp.h>
+ 
+ #include <xmlsec/xmlsec.h>
+@@ -21,6 +17,9 @@ extern "C" {
+ 
+ #include <xmlsec/openssl/crypto.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ XMLSEC_CRYPTO_EXPORT int                xmlSecOpenSSLEvpKeyDataAdoptEvp (xmlSecKeyDataPtr data,
+                                                                          EVP_PKEY* pKey);
+diff --git a/include/xmlsec/openssl/x509.h b/include/xmlsec/openssl/x509.h
+index 6bb0d22a..0d9f8c80 100644
+--- a/include/xmlsec/openssl/x509.h
++++ b/include/xmlsec/openssl/x509.h
+@@ -9,10 +9,6 @@
+ #ifndef __XMLSEC_OPENSSL_X509_H__
+ #define __XMLSEC_OPENSSL_X509_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #ifndef XMLSEC_NO_X509
+ 
+ #include <openssl/x509.h>
+@@ -21,6 +17,10 @@ extern "C" {
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * XMLSEC_STACK_OF_X509:
+  *
+@@ -100,10 +100,10 @@ XMLSEC_CRYPTO_EXPORT int                xmlSecOpenSSLX509StoreAddCertsPath(xmlSe
+ XMLSEC_CRYPTO_EXPORT int                xmlSecOpenSSLX509StoreAddCertsFile(xmlSecKeyDataStorePtr store,
+                                                                          const char* filename);
+ 
+-#endif /* XMLSEC_NO_X509 */
+-
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+ 
++#endif /* XMLSEC_NO_X509 */
++
+ #endif /* __XMLSEC_OPENSSL_X509_H__ */
+diff --git a/include/xmlsec/parser.h b/include/xmlsec/parser.h
+index bb1071f2..743a5804 100644
+--- a/include/xmlsec/parser.h
++++ b/include/xmlsec/parser.h
+@@ -11,15 +11,14 @@
+ #ifndef __XMLSEC_PARSER_H__
+ #define __XMLSEC_PARSER_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ XMLSEC_EXPORT xmlDocPtr         xmlSecParseFile         (const char *filename);
+ XMLSEC_EXPORT xmlDocPtr         xmlSecParseMemory       (const xmlSecByte *buffer,
+diff --git a/include/xmlsec/private.h b/include/xmlsec/private.h
+index 97aeff30..f35690d9 100644
+--- a/include/xmlsec/private.h
++++ b/include/xmlsec/private.h
+@@ -16,10 +16,6 @@
+ #error "xmlsec/private.h file contains private xmlsec definitions and should not be used outside xmlsec or xmlsec-$crypto libraries"
+ #endif /* XMLSEC_PRIVATE */
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <libxml/xmlIO.h>
+ 
+@@ -29,6 +25,19 @@ extern "C" {
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __GNUC__
++#ifdef HAVE_ANSIDECL_H
++#include <ansidecl.h>
++#endif
++#endif
++
++#ifdef WIN32
++#include <windows.h>
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ /*****************************************************************************
+  *
+@@ -503,9 +512,6 @@ struct _xmlSecCryptoDLFunctions {
+  * Macro used to signal to GCC unused function parameters
+  */
+ #ifdef __GNUC__
+-#ifdef HAVE_ANSIDECL_H
+-#include <ansidecl.h>
+-#endif
+ #ifndef ATTRIBUTE_UNUSED
+ #define ATTRIBUTE_UNUSED
+ #endif
+@@ -518,9 +524,6 @@ struct _xmlSecCryptoDLFunctions {
+  *
+  * Macro used to signal to MSVC unused function parameters
+  */
+-#ifdef WIN32
+-#include <windows.h>
+-#endif
+ #ifndef UNREFERENCED_PARAMETER
+ #define UNREFERENCED_PARAMETER(x)
+ #endif /* UNREFERENCED_PARAMETER */
+diff --git a/include/xmlsec/skeleton/app.h b/include/xmlsec/skeleton/app.h
+index 25b24520..fcc9d345 100644
+--- a/include/xmlsec/skeleton/app.h
++++ b/include/xmlsec/skeleton/app.h
+@@ -9,15 +9,15 @@
+ #ifndef __XMLSEC_SKELETON_APP_H__
+ #define __XMLSEC_SKELETON_APP_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/keysmngr.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /********************************************************************
+  *
+  * Init/shutdown
+diff --git a/include/xmlsec/skeleton/crypto.h b/include/xmlsec/skeleton/crypto.h
+index 69d7dce8..5b9c23f8 100644
+--- a/include/xmlsec/skeleton/crypto.h
++++ b/include/xmlsec/skeleton/crypto.h
+@@ -9,15 +9,15 @@
+ #ifndef __XMLSEC_SKELETON_CRYPTO_H__
+ #define __XMLSEC_SKELETON_CRYPTO_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/keys.h>
+ #include <xmlsec/transforms.h>
+ #include <xmlsec/dl.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ XMLSEC_CRYPTO_EXPORT xmlSecCryptoDLFunctionsPtr xmlSecCryptoGetFunctions_skeleton(void);
+ 
+ /********************************************************************
+diff --git a/include/xmlsec/soap.h b/include/xmlsec/soap.h
+index e397d096..e87eb915 100644
+--- a/include/xmlsec/soap.h
++++ b/include/xmlsec/soap.h
+@@ -13,13 +13,12 @@
+ 
+ #ifndef XMLSEC_NO_SOAP
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <xmlsec/xmlsec.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
+ 
+ /***********************************************************************
+  *
+diff --git a/include/xmlsec/strings.h b/include/xmlsec/strings.h
+index e39c18f3..ceaa3d18 100644
+--- a/include/xmlsec/strings.h
++++ b/include/xmlsec/strings.h
+@@ -11,14 +11,14 @@
+ #ifndef __XMLSEC_STRINGS_H__
+ #define __XMLSEC_STRINGS_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /*************************************************************************
+  *
+  * Global Namespaces
+diff --git a/include/xmlsec/templates.h b/include/xmlsec/templates.h
+index fafcdcc4..5f67fffa 100644
+--- a/include/xmlsec/templates.h
++++ b/include/xmlsec/templates.h
+@@ -11,15 +11,15 @@
+ #ifndef __XMLSEC_TEMPLATES_H__
+ #define __XMLSEC_TEMPLATES_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/xmlsec.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /***********************************************************************
+  *
+  * <dsig:Signature> node
+diff --git a/include/xmlsec/transforms.h b/include/xmlsec/transforms.h
+index 5d060735..1495ccbd 100644
+--- a/include/xmlsec/transforms.h
++++ b/include/xmlsec/transforms.h
+@@ -11,10 +11,6 @@
+ #ifndef __XMLSEC_TRANSFORMS_H__
+ #define __XMLSEC_TRANSFORMS_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <libxml/xpath.h>
+ 
+@@ -24,6 +20,14 @@ extern "C" {
+ #include <xmlsec/nodeset.h>
+ #include <xmlsec/keys.h>
+ 
++#ifndef XMLSEC_NO_XSLT
++#include <libxslt/security.h>
++#endif /* XMLSEC_NO_XSLT */
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ typedef const struct _xmlSecTransformKlass              xmlSecTransformKlass,
+                                                         *xmlSecTransformId;
+ 
+@@ -959,7 +963,6 @@ XMLSEC_EXPORT int               xmlSecTransformXPointerSetExpr          (xmlSecT
+ XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRelationshipGetKlass     (void);
+ 
+ #ifndef XMLSEC_NO_XSLT
+-#include <libxslt/security.h>
+ 
+ /**
+  * xmlSecTransformXsltId:
+diff --git a/include/xmlsec/x509.h b/include/xmlsec/x509.h
+index 731e63d6..6a592eed 100644
+--- a/include/xmlsec/x509.h
++++ b/include/xmlsec/x509.h
+@@ -11,9 +11,6 @@
+ 
+ #ifndef XMLSEC_NO_X509
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+ #include <stdio.h>
+ 
+ #include <libxml/tree.h>
+@@ -27,6 +24,10 @@ extern "C" {
+ #include <xmlsec/keyinfo.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * XMLSEC_X509DATA_CERTIFICATE_NODE:
+  *
+diff --git a/include/xmlsec/xmldsig.h b/include/xmlsec/xmldsig.h
+index 32510d68..7dab2411 100644
+--- a/include/xmlsec/xmldsig.h
++++ b/include/xmlsec/xmldsig.h
+@@ -15,10 +15,6 @@
+ 
+ #ifndef XMLSEC_NO_XMLDSIG
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ #include <libxml/parser.h>
+ 
+@@ -31,6 +27,10 @@ extern "C" {
+ #include <xmlsec/keyinfo.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ typedef struct _xmlSecDSigReferenceCtx          xmlSecDSigReferenceCtx,
+                                                 *xmlSecDSigReferenceCtxPtr;
+ 
+diff --git a/include/xmlsec/xmlenc.h b/include/xmlsec/xmlenc.h
+index 4347d065..b09c8df8 100644
+--- a/include/xmlsec/xmlenc.h
++++ b/include/xmlsec/xmlenc.h
+@@ -14,9 +14,6 @@
+ 
+ #ifndef XMLSEC_NO_XMLENC
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+ #include <stdio.h>
+ 
+ #include <libxml/tree.h>
+@@ -29,6 +26,10 @@ extern "C" {
+ #include <xmlsec/keyinfo.h>
+ #include <xmlsec/transforms.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * xmlEncCtxMode:
+  * @xmlEncCtxModeEncryptedData: the <enc:EncryptedData/> element procesing.
+diff --git a/include/xmlsec/xmlsec.h b/include/xmlsec/xmlsec.h
+index 71523197..4e13ea8d 100644
+--- a/include/xmlsec/xmlsec.h
++++ b/include/xmlsec/xmlsec.h
+@@ -11,16 +11,16 @@
+ #ifndef __XMLSEC_H__
+ #define __XMLSEC_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <libxml/tree.h>
+ 
+ #include <xmlsec/version.h>
+ #include <xmlsec/exports.h>
+ #include <xmlsec/strings.h>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /***********************************************************************
+  *
+  * Basic types to make ports to exotic platforms easier
+diff --git a/include/xmlsec/xmltree.h b/include/xmlsec/xmltree.h
+index 760b64a4..e29016a6 100644
+--- a/include/xmlsec/xmltree.h
++++ b/include/xmlsec/xmltree.h
+@@ -11,16 +11,20 @@
+ #ifndef __XMLSEC_TREE_H__
+ #define __XMLSEC_TREE_H__
+ 
+-#ifdef __cplusplus
+-extern "C" {
+-#endif /* __cplusplus */
+-
+ #include <stdio.h>
+ 
+ #include <libxml/tree.h>
+ #include <libxml/xpath.h>
+ #include <xmlsec/xmlsec.h>
+ 
++#ifdef WIN32
++#include <windows.h>
++#endif /* WIN32 */
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ /**
+  * xmlSecNodeGetName:
+  * @node:               the pointer to node.
+@@ -273,7 +277,6 @@ XMLSEC_EXPORT void              xmlSecQName2BitMaskDebugXmlDump(xmlSecQName2BitM
+  *
+  ************************************************************************/
+ #ifdef WIN32
+-#include <windows.h>
+ XMLSEC_EXPORT LPWSTR             xmlSecWin32ConvertLocaleToUnicode(const char* str);
+ 
+ XMLSEC_EXPORT LPWSTR             xmlSecWin32ConvertUtf8ToUnicode  (const xmlChar* str);



More information about the arch-commits mailing list