summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorKonrad Lipinski <k.lipinski2@partner.samsung.com>2019-06-11 16:25:51 +0200
committerKonrad Lipinski <k.lipinski2@samsung.com>2019-08-01 14:37:53 +0200
commitcc6febdd37186eeea33bcbce89d79f661ee0009f (patch)
tree100542f7f8fd3b3c9548150362efe35adde47551 /win32
parentc40fbfa8503e7763ef630496852f4d6b5e63b58c (diff)
downloadxmlsec1-cc6febdd37186eeea33bcbce89d79f661ee0009f.tar.gz
xmlsec1-cc6febdd37186eeea33bcbce89d79f661ee0009f.tar.bz2
xmlsec1-cc6febdd37186eeea33bcbce89d79f661ee0009f.zip
Import upstream commit c4d0493d545b99194eea1b2b058930d5a9bb91b1 (1.2.28)
Change-Id: I10f71567cb140be223923e1cd0b5895e366ac23e
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.msvc242
-rw-r--r--win32/README.txt2
-rw-r--r--win32/configure.js121
-rw-r--r--win32/mycfg.bat10
4 files changed, 293 insertions, 82 deletions
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
index e3d5262e..9c9673bf 100644
--- a/win32/Makefile.msvc
+++ b/win32/Makefile.msvc
@@ -1,6 +1,6 @@
# Makefile for xmlsec, specific for Windows, MSVC and NMAKE.
#
-# Take a look at the beginning and modify the variables to suit your
+# Take a look at the beginning and modify the variables to suit your
# environment. Having done that, you can do a
#
# nmake [all] to build the xmlsec and the accompanying utilities.
@@ -33,12 +33,12 @@ AUTOCONF = .\configure.txt
#UNICODE = 1
#DEBUG = 0
#WITH_CRYPTO=openssl
-#WITH_CRYPTO=openssl
#WITH_DEFAULT_CRYPTO=openssl
#WITH_OPENSSL=1
#WITH_OPENSSL_VERSION=
#WITH_NSS=0
#WITH_MSCRYPTO=0
+#WITH_MSCNG=0
#WITH_LIBXSLT=1
#STATIC = 0
#WITH_DL = 1
@@ -46,9 +46,9 @@ AUTOCONF = .\configure.txt
#BINPREFIX = $(PREFIX)\bin
#INCPREFIX = $(PREFIX)\include
#LIBPREFIX = $(PREFIX)\lib
-#SOPREFIX = $(PREFIX)\lib
+#SOPREFIX = $(PREFIX)\bin
#INCLUDE = $(INCLUDE);$(INCPREFIX)
-#LIB = $(LIB);$(LIBPREFIX)
+#LIB = $(LIB);$(LIBPREFIX)
# There should never be a need to modify anything below this line.
# ----------------------------------------------------------------
@@ -67,6 +67,7 @@ XMLSEC_NAME = xmlsec
XMLSEC_BASENAME = lib$(XMLSEC_NAME)
XMLSEC_SO = $(XMLSEC_BASENAME).dll
XMLSEC_SO_MANIFEST = $(XMLSEC_BASENAME).dll.manifest
+XMLSEC_PDB = $(XMLSEC_BASENAME).pdb
XMLSEC_IMP = $(XMLSEC_BASENAME).lib
XMLSEC_A = $(XMLSEC_BASENAME)_a.lib
@@ -74,6 +75,7 @@ XMLSEC_OPENSSL_NAME = $(XMLSEC_NAME)-openssl
XMLSEC_OPENSSL_BASENAME = lib$(XMLSEC_OPENSSL_NAME)
XMLSEC_OPENSSL_SO = $(XMLSEC_OPENSSL_BASENAME).dll
XMLSEC_OPENSSL_SO_MANIFEST = $(XMLSEC_OPENSSL_BASENAME).dll.manifest
+XMLSEC_OPENSSL_PDB = $(XMLSEC_OPENSSL_BASENAME).pdb
XMLSEC_OPENSSL_IMP = $(XMLSEC_OPENSSL_BASENAME).lib
XMLSEC_OPENSSL_A = $(XMLSEC_OPENSSL_BASENAME)_a.lib
@@ -81,6 +83,7 @@ XMLSEC_NSS_NAME = $(XMLSEC_NAME)-nss
XMLSEC_NSS_BASENAME = lib$(XMLSEC_NSS_NAME)
XMLSEC_NSS_SO = $(XMLSEC_NSS_BASENAME).dll
XMLSEC_NSS_SO_MANIFEST = $(XMLSEC_NSS_BASENAME).dll.manifest
+XMLSEC_NSS_PDB = $(XMLSEC_NSS_BASENAME).pdb
XMLSEC_NSS_IMP = $(XMLSEC_NSS_BASENAME).lib
XMLSEC_NSS_A = $(XMLSEC_NSS_BASENAME)_a.lib
@@ -88,9 +91,18 @@ XMLSEC_MSCRYPTO_NAME = $(XMLSEC_NAME)-mscrypto
XMLSEC_MSCRYPTO_BASENAME= lib$(XMLSEC_MSCRYPTO_NAME)
XMLSEC_MSCRYPTO_SO = $(XMLSEC_MSCRYPTO_BASENAME).dll
XMLSEC_MSCRYPTO_SO_MANIFEST = $(XMLSEC_MSCRYPTO_BASENAME).dll.manifest
+XMLSEC_MSCRYPTO_PDB = $(XMLSEC_MSCRYPTO_BASENAME).pdb
XMLSEC_MSCRYPTO_IMP = $(XMLSEC_MSCRYPTO_BASENAME).lib
XMLSEC_MSCRYPTO_A = $(XMLSEC_MSCRYPTO_BASENAME)_a.lib
+XMLSEC_MSCNG_NAME = $(XMLSEC_NAME)-mscng
+XMLSEC_MSCNG_BASENAME= lib$(XMLSEC_MSCNG_NAME)
+XMLSEC_MSCNG_SO = $(XMLSEC_MSCNG_BASENAME).dll
+XMLSEC_MSCNG_SO_MANIFEST = $(XMLSEC_MSCNG_BASENAME).dll.manifest
+XMLSEC_MSCNG_PDB = $(XMLSEC_MSCNG_BASENAME).pdb
+XMLSEC_MSCNG_IMP = $(XMLSEC_MSCNG_BASENAME).lib
+XMLSEC_MSCNG_A = $(XMLSEC_MSCNG_BASENAME)_a.lib
+
#
# Places where intermediate files produced by the compiler go
#
@@ -109,13 +121,16 @@ XMLSEC_NSS_INTDIR_A = $(XMLSEC_BASENAME)_nss_a.int
XMLSEC_MSCRYPTO_INTDIR = $(XMLSEC_BASENAME)_mscrypto.int
XMLSEC_MSCRYPTO_INTDIR_A= $(XMLSEC_BASENAME)_mscrypto_a.int
+XMLSEC_MSCNG_INTDIR = $(XMLSEC_BASENAME)_mscng.int
+XMLSEC_MSCNG_INTDIR_A= $(XMLSEC_BASENAME)_mscng_a.int
+
#
# Source folders
#
XMLSEC_OPENSSL_SRCDIR = $(XMLSEC_SRCDIR)\openssl
XMLSEC_NSS_SRCDIR = $(XMLSEC_SRCDIR)\nss
XMLSEC_MSCRYPTO_SRCDIR = $(XMLSEC_SRCDIR)\mscrypto
-
+XMLSEC_MSCNG_SRCDIR = $(XMLSEC_SRCDIR)\mscng
#
# Object files for libraries and apps.
@@ -159,7 +174,7 @@ XMLSEC_OBJS = \
$(XMLSEC_INTDIR)\xmlsec.obj \
$(XMLSEC_INTDIR)\xmltree.obj \
$(XMLSEC_INTDIR)\xpath.obj \
- $(XMLSEC_INTDIR)\xslt.obj
+ $(XMLSEC_INTDIR)\xslt.obj
XMLSEC_OBJS_A = \
$(XMLSEC_INTDIR_A)\app.obj\
$(XMLSEC_INTDIR_A)\base64.obj\
@@ -190,7 +205,7 @@ XMLSEC_OBJS_A = \
$(XMLSEC_INTDIR_A)\xmlsec.obj \
$(XMLSEC_INTDIR_A)\xmltree.obj \
$(XMLSEC_INTDIR_A)\xpath.obj \
- $(XMLSEC_INTDIR_A)\xslt.obj
+ $(XMLSEC_INTDIR_A)\xslt.obj
XMLSEC_OPENSSL_OBJS = \
$(XMLSEC_OPENSSL_INTDIR)\app.obj\
@@ -199,6 +214,7 @@ XMLSEC_OPENSSL_OBJS = \
$(XMLSEC_OPENSSL_INTDIR)\crypto.obj \
$(XMLSEC_OPENSSL_INTDIR)\digests.obj \
$(XMLSEC_OPENSSL_INTDIR)\evp.obj \
+ $(XMLSEC_OPENSSL_INTDIR)\evp_signatures.obj \
$(XMLSEC_OPENSSL_INTDIR)\hmac.obj \
$(XMLSEC_OPENSSL_INTDIR)\kt_rsa.obj \
$(XMLSEC_OPENSSL_INTDIR)\kw_aes.obj \
@@ -207,7 +223,7 @@ XMLSEC_OPENSSL_OBJS = \
$(XMLSEC_OPENSSL_INTDIR)\strings.obj \
$(XMLSEC_OPENSSL_INTDIR)\symkeys.obj \
$(XMLSEC_OPENSSL_INTDIR)\x509.obj \
- $(XMLSEC_OPENSSL_INTDIR)\x509vfy.obj
+ $(XMLSEC_OPENSSL_INTDIR)\x509vfy.obj
XMLSEC_OPENSSL_OBJS_A = \
$(XMLSEC_OPENSSL_INTDIR_A)\app.obj\
$(XMLSEC_OPENSSL_INTDIR_A)\bn.obj \
@@ -215,6 +231,7 @@ XMLSEC_OPENSSL_OBJS_A = \
$(XMLSEC_OPENSSL_INTDIR_A)\crypto.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\digests.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\evp.obj \
+ $(XMLSEC_OPENSSL_INTDIR_A)\evp_signatures.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\hmac.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\kt_rsa.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\kw_aes.obj \
@@ -223,7 +240,7 @@ XMLSEC_OPENSSL_OBJS_A = \
$(XMLSEC_OPENSSL_INTDIR_A)\strings.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\symkeys.obj \
$(XMLSEC_OPENSSL_INTDIR_A)\x509.obj \
- $(XMLSEC_OPENSSL_INTDIR_A)\x509vfy.obj
+ $(XMLSEC_OPENSSL_INTDIR_A)\x509vfy.obj
XMLSEC_NSS_OBJS = \
$(XMLSEC_NSS_INTDIR)\app.obj\
@@ -293,6 +310,39 @@ XMLSEC_MSCRYPTO_OBJS_A = \
$(XMLSEC_MSCRYPTO_INTDIR_A)\x509.obj \
$(XMLSEC_MSCRYPTO_INTDIR_A)\x509vfy.obj
+XMLSEC_MSCNG_OBJS = \
+ $(XMLSEC_MSCNG_INTDIR)\app.obj\
+ $(XMLSEC_MSCNG_INTDIR)\certkeys.obj \
+ $(XMLSEC_MSCNG_INTDIR)\crypto.obj\
+ $(XMLSEC_MSCNG_INTDIR)\ciphers.obj \
+ $(XMLSEC_MSCNG_INTDIR)\digests.obj\
+ $(XMLSEC_MSCNG_INTDIR)\hmac.obj \
+ $(XMLSEC_MSCNG_INTDIR)\symkeys.obj \
+ $(XMLSEC_MSCNG_INTDIR)\kt_rsa.obj \
+ $(XMLSEC_MSCNG_INTDIR)\kw_aes.obj \
+ $(XMLSEC_MSCNG_INTDIR)\kw_des.obj \
+ $(XMLSEC_MSCNG_INTDIR)\strings.obj\
+ $(XMLSEC_MSCNG_INTDIR)\signatures.obj\
+ $(XMLSEC_MSCNG_INTDIR)\keysstore.obj \
+ $(XMLSEC_MSCNG_INTDIR)\x509.obj\
+ $(XMLSEC_MSCNG_INTDIR)\x509vfy.obj
+XMLSEC_MSCNG_OBJS_A = \
+ $(XMLSEC_MSCNG_INTDIR_A)\app.obj\
+ $(XMLSEC_MSCNG_INTDIR_A)\certkeys.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\crypto.obj\
+ $(XMLSEC_MSCNG_INTDIR_A)\ciphers.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\digests.obj\
+ $(XMLSEC_MSCNG_INTDIR_A)\hmac.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\symkeys.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\kt_rsa.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\kw_aes.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\kw_des.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\strings.obj\
+ $(XMLSEC_MSCNG_INTDIR_A)\signatures.obj\
+ $(XMLSEC_MSCNG_INTDIR_A)\keysstore.obj \
+ $(XMLSEC_MSCNG_INTDIR_A)\x509.obj\
+ $(XMLSEC_MSCNG_INTDIR_A)\x509vfy.obj
+
#
# The preprocessor and its options.
#
@@ -302,15 +352,29 @@ CPPFLAGS = /nologo
#
# The compiler and its options.
#
-CC = cl.exe
-CFLAGS = /nologo /D "WIN32" /D "_WINDOWS"
-CFLAGS = $(CFLAGS) /D "_MBCS" /D "_REENTRANT" /W1
+CFLAGS = $(CFLAGS) /nologo /D "WIN32" /D "_WINDOWS" /D inline=__inline
+# C4130: '!=': logical operation on address of string constant:
+# this generates a false warning inside macros
+# C4127: conditional expression is constant
+# this generates a false warning inside asserts
+# C4152: nonstandard extension, function/data pointer conversion in expression
+# this generates a false warning for XMLSEC_PTR_TO_FUNC
+CFLAGS = $(CFLAGS) /D "_MBCS" /D "_REENTRANT" /W4 /wd4130
+CFLAGS = $(CFLAGS) /wd4127 /wd4152
+
+!if "$(WERROR)" == "1"
+CFLAGS = $(CFLAGS) /WX
+!endif
+
CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(BASEDIR)\include
CFLAGS = $(CFLAGS) /I$(INCPREFIX)
-CFLAGS = $(CFLAGS) /D PACKAGE=\"$(XMLSEC_NAME)\"
+CFLAGS = $(CFLAGS) /D PACKAGE=\"$(XMLSEC_NAME)\"
CFLAGS = $(CFLAGS) /D "HAVE_STDIO_H" /D "HAVE_STDLIB_H"
CFLAGS = $(CFLAGS) /D "HAVE_STRING_H" /D "HAVE_CTYPE_H"
CFLAGS = $(CFLAGS) /D "HAVE_MALLOC_H" /D "HAVE_MEMORY_H"
+CFLAGS = $(CFLAGS) /D "XMLSEC_NO_GOST" /D "XMLSEC_NO_GOST2012"
+CFLAGS = $(CFLAGS) /D "XMLSEC_NO_SIZE_T"
+
!if "$(UNICODE)" == "1"
CFLAGS = $(CFLAGS) /D "UNICODE" /D "_UNICODE"
@@ -318,60 +382,60 @@ CFLAGS = $(CFLAGS) /D "UNICODE" /D "_UNICODE"
# Optimisation and debug symbols.
!if "$(DEBUG)" == "1"
-CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7 /MDd
+CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Zi
!else
-CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MD
+CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /Zi
!endif
+CFLAGS = $(CFLAGS) $(CRUNTIME)
+
# configurable options
!if "$(WITH_LIBXSLT)" == "1"
-!else
+!else
CFLAGS = $(CFLAGS) /DXMLSEC_NO_XSLT=1
!endif
!if "$(WITH_NT4)" == "1"
CFLAGS = $(CFLAGS) /DXMLSEC_MSCRYPTO_NT4=1
-!else
+!else
!endif
-APP_CFLAGS = /D "XMLSEC_DEFAULT_CRYPTO=\"$(XMLSEC_DEFAULT_CRYPTO)\""
+CFLAGS = $(CFLAGS) /D "XMLSEC_DEFAULT_CRYPTO=\"$(XMLSEC_DEFAULT_CRYPTO)\""
!if "$(WITH_DL)" == "1"
CFLAGS = $(CFLAGS) /D "XMLSEC_DL_WIN32"
APP_CFLAGS = $(APP_CFLAGS) /D "XMLSEC_CRYPTO_DYNAMIC_LOADING"
!else
CFLAGS = $(CFLAGS) /D "XMLSEC_NO_CRYPTO_DYNAMIC_LOADING"
-APP_CFLAGS = $(APP_CFLAGS) $(XMLSEC_CRYPTO_CFLAGS)
+APP_CFLAGS = $(APP_CFLAGS) $(XMLSEC_CRYPTO_CFLAGS)
# this disables TEMPLATE tests and helps with missing algorithms (hmac) in mscrypto
APP_CFLAGS = $(APP_CFLAGS) /D "XMLSEC_NO_TMPL_TEST"
!endif
-!if "$(WITH_OPENSSL_VERSION)" == ""
XMLSEC_OPENSSL_CFLAGS = /D "XMLSEC_CRYPTO_OPENSSL" /D "XMLSEC_DEFAULT_CRYPTO=\"openssl\""
-!else
-XMLSEC_OPENSSL_CFLAGS = /D "$(WITH_OPENSSL_VERSION)" /D "XMLSEC_CRYPTO_OPENSSL" /D "XMLSEC_DEFAULT_CRYPTO=\"openssl\""
-!endif
XMLSEC_NSS_CFLAGS = /D "XMLSEC_CRYPTO_NSS" /D "XMLSEC_DEFAULT_CRYPTO=\"nss\""
XMLSEC_MSCRYPTO_CFLAGS = /D "XMLSEC_CRYPTO_MSCRYPTO" /D "XMLSEC_DEFAULT_CRYPTO=\"mscrypto\""
+XMLSEC_MSCNG_CFLAGS = /D "XMLSEC_CRYPTO_MSCNG" /D "XMLSEC_DEFAULT_CRYPTO=\"mscng\""
#
# The linker and its options.
#
-LD = link.exe
-LDFLAGS = /nologo
+LD = link.exe
+LDFLAGS = /nologo /debug
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
-LIBS =
+LIBS =
# Optimisation and debug symbols.
!if "$(DEBUG)" == "1"
-LDFLAGS = $(LDFLAGS) /DEBUG
+LDFLAGS = $(LDFLAGS)
!else
-LDFLAGS = $(LDFLAGS) /OPT:NOWIN98
+LDFLAGS = $(LDFLAGS) /opt:ref,icf
!endif
-SOLIBS = $(LIBS) libxml2.lib
-ALIBS = $(LIBS) libxml2_a.lib
+SOLIBS = $(LIBS) libxml2.lib ws2_32.lib
+ALIBS = $(LIBS) libxml2_a.lib ws2_32.lib
!if "$(WITH_ICONV)" == "1"
+CFLAGS = $(CFLAGS) /D "LIBXML_ICONV_ENABLED"
SOLIBS = $(SOLIBS) iconv.lib
ALIBS = $(ALIBS) iconv_a.lib
!endif
@@ -391,26 +455,34 @@ APP_LIBS = $(SOLIBS) $(XMLSEC_CRYPTO_SOLIBS)
!else
!endif
-XMLSEC_OPENSSL_SOLIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
-XMLSEC_OPENSSL_ALIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
+!if "$(WITH_OPENSSL_VERSION)" == "XMLSEC_OPENSSL_110"
+XMLSEC_OPENSSL_SOLIBS = libcrypto.lib wsock32.lib kernel32.lib user32.lib gdi32.lib crypt32.lib advapi32.lib ws2_32.lib
+XMLSEC_OPENSSL_ALIBS = libcrypto.lib wsock32.lib kernel32.lib user32.lib gdi32.lib crypt32.lib advapi32.lib ws2_32.lib
+!else
+XMLSEC_OPENSSL_SOLIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib crypt32.lib advapi32.lib
+XMLSEC_OPENSSL_ALIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib crypt32.lib advapi32.lib
+!endif
-XMLSEC_NSS_SOLIBS = smime3.lib ssl3.lib nss3.lib libnspr4.lib libplds4.lib libplc4.lib kernel32.lib user32.lib gdi32.lib
-XMLSEC_NSS_ALIBS = smime3.lib ssl3.lib nss3.lib libnspr4_s.lib libplds4_s.lib libplc4_s.lib kernel32.lib user32.lib gdi32.lib
+XMLSEC_NSS_SOLIBS = smime3.lib ssl3.lib nss3.lib libnspr4.lib libplds4.lib libplc4.lib kernel32.lib user32.lib gdi32.lib
+XMLSEC_NSS_ALIBS = smime3.lib ssl3.lib nss3.lib libnspr4_s.lib libplds4_s.lib libplc4_s.lib kernel32.lib user32.lib gdi32.lib
XMLSEC_MSCRYPTO_SOLIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib
XMLSEC_MSCRYPTO_ALIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib
+XMLSEC_MSCNG_SOLIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib Bcrypt.lib Ncrypt.lib
+XMLSEC_MSCNG_ALIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib Bcrypt.lib Ncrypt.lib
+
# The archiver and its options.
AR = link.exe /lib
ARFLAGS = /nologo
-
#
# xmlsec-<default-crypto> options
#
-!if "$(WITH_DEFAULT_CRYPTO)" == "openssl"
+!if "$(WITH_DEFAULT_CRYPTO)" == "openssl"
XMLSEC_DEFAULT_CRYPTO = "openssl"
+XMLSEC_DEFAULT_CRYPTO_A = "openssla"
XMLSEC_CRYPTO_CFLAGS = $(XMLSEC_OPENSSL_CFLAGS)
XMLSEC_CRYPTO_SOLIBS = $(XMLSEC_OPENSSL_SOLIBS)
XMLSEC_CRYPTO_ALIBS = $(XMLSEC_OPENSSL_ALIBS)
@@ -421,6 +493,7 @@ XMLSEC_CRYPTO_A = $(XMLSEC_OPENSSL_A)
!if "$(WITH_DEFAULT_CRYPTO)" == "nss"
XMLSEC_DEFAULT_CRYPTO = "nss"
+XMLSEC_DEFAULT_CRYPTO_A = "nssa"
XMLSEC_CRYPTO_CFLAGS = $(XMLSEC_NSS_CFLAGS)
XMLSEC_CRYPTO_SOLIBS = $(XMLSEC_NSS_SOLIBS)
XMLSEC_CRYPTO_ALIBS = $(XMLSEC_NSS_ALIBS)
@@ -431,6 +504,7 @@ XMLSEC_CRYPTO_A = $(XMLSEC_NSS_A)
!if "$(WITH_DEFAULT_CRYPTO)" == "mscrypto"
XMLSEC_DEFAULT_CRYPTO = "mscrypto"
+XMLSEC_DEFAULT_CRYPTO_A = "mscryptoa"
XMLSEC_CRYPTO_CFLAGS = $(XMLSEC_MSCRYPTO_CFLAGS)
XMLSEC_CRYPTO_SOLIBS = $(XMLSEC_MSCRYPTO_SOLIBS)
XMLSEC_CRYPTO_ALIBS = $(XMLSEC_MSCRYPTO_ALIBS)
@@ -439,45 +513,62 @@ XMLSEC_CRYPTO_IMP = $(XMLSEC_MSCRYPTO_IMP)
XMLSEC_CRYPTO_A = $(XMLSEC_MSCRYPTO_A)
!endif
+!if "$(WITH_DEFAULT_CRYPTO)" == "mscng"
+XMLSEC_DEFAULT_CRYPTO = "mscng"
+XMLSEC_DEFAULT_CRYPTO_A = "mscnga"
+XMLSEC_CRYPTO_CFLAGS = $(XMLSEC_MSCNG_CFLAGS)
+XMLSEC_CRYPTO_SOLIBS = $(XMLSEC_MSCNG_SOLIBS)
+XMLSEC_CRYPTO_ALIBS = $(XMLSEC_MSCNG_ALIBS)
+XMLSEC_CRYPTO_SO = $(XMLSEC_MSCNG_SO)
+XMLSEC_CRYPTO_IMP = $(XMLSEC_MSCNG_IMP)
+XMLSEC_CRYPTO_A = $(XMLSEC_MSCNG_A)
+!endif
+
#
# Build rules
#
-all : xmlsec xmlseca $(WITH_CRYPTO) apps
+all : xmlsec xmlseca $(WITH_CRYPTO) apps
-xmlsec : $(XMLSEC_APPS_INTDIR) $(BINDIR)\$(XMLSEC_SO) $(WITH_DEFAULT_CRYPTO)
+xmlsec : $(XMLSEC_APPS_INTDIR) $(BINDIR)\$(XMLSEC_SO) $(XMLSEC_DEFAULT_CRYPTO)
-xmlseca : $(XMLSEC_APPS_INTDIR_A) $(BINDIR)\$(XMLSEC_A) $(WITH_DEFAULT_CRYPTO)
+xmlseca : $(XMLSEC_APPS_INTDIR_A) $(BINDIR)\$(XMLSEC_A) $(XMLSEC_DEFAULT_CRYPTO_A)
-openssl: $(BINDIR)\$(XMLSEC_OPENSSL_SO) $(BINDIR)\$(XMLSEC_OPENSSL_A)
+openssla: $(BINDIR)\$(XMLSEC_OPENSSL_A)
+openssl: $(BINDIR)\$(XMLSEC_OPENSSL_SO) openssla
-nss: $(BINDIR)\$(XMLSEC_NSS_SO) $(BINDIR)\$(XMLSEC_NSS_A)
+nssa: $(BINDIR)\$(XMLSEC_NSS_A)
+nss: $(BINDIR)\$(XMLSEC_NSS_SO) nssa
+mscryptoa: $(BINDIR)\$(XMLSEC_MSCRYPTO_A)
mscrypto: $(BINDIR)\$(XMLSEC_MSCRYPTO_SO) $(BINDIR)\$(XMLSEC_MSCRYPTO_A)
+mscnga: $(BINDIR)\$(XMLSEC_MSCNG_A)
+mscng: $(BINDIR)\$(XMLSEC_MSCNG_SO) $(BINDIR)\$(XMLSEC_MSCNG_A)
+
apps : $(BINDIR)\$(APP_NAME)
check : check-keys check-dsig check-enc
check-keys : $(BINDIR)\$(APP_NAME)
cd ..
- if not exist win32\tmp mkdir win32\tmp
- set TMPFOLDER=win32/tmp
- sh ./tests/testrun.sh ./tests/testKeys.sh default ./tests win32/$(BINDIR)/$(APP_NAME) der
+ if not exist %MAKEDIR%\tmp mkdir %MAKEDIR%\tmp
+ set TMPFOLDER=%MAKEDIR%\tmp
+ sh ./tests/testrun.sh ./tests/testKeys.sh "$(WITH_DEFAULT_CRYPTO)" ./tests win32/$(BINDIR)/$(APP_NAME) der
cd win32
-check-dsig : $(BINDIR)\$(APP_NAME)
+check-dsig : $(BINDIR)\$(APP_NAME)
cd ..
- if not exist win32\tmp mkdir win32\tmp
- set TMPFOLDER=win32/tmp
- sh ./tests/testrun.sh ./tests/testDSig.sh default ./tests win32/$(BINDIR)/$(APP_NAME) der
+ if not exist %MAKEDIR%\tmp mkdir %MAKEDIR%\tmp
+ set TMPFOLDER=%MAKEDIR%\tmp
+ sh ./tests/testrun.sh ./tests/testDSig.sh "$(WITH_DEFAULT_CRYPTO)" ./tests win32/$(BINDIR)/$(APP_NAME) der
cd win32
check-enc : $(BINDIR)\$(APP_NAME)
cd ..
- if not exist win32\tmp mkdir win32\tmp
- set TMPFOLDER=win32/tmp
- sh ./tests/testrun.sh ./tests/testEnc.sh default ./tests win32/$(BINDIR)/$(APP_NAME) der
+ if not exist %MAKEDIR%\tmp mkdir %MAKEDIR%\tmp
+ set TMPFOLDER=%MAKEDIR%\tmp
+ sh ./tests/testrun.sh ./tests/testEnc.sh "$(WITH_DEFAULT_CRYPTO)" ./tests win32/$(BINDIR)/$(APP_NAME) der
cd win32
clean :
@@ -489,6 +580,8 @@ clean :
if exist $(XMLSEC_NSS_INTDIR_A) rmdir /S /Q $(XMLSEC_NSS_INTDIR_A)
if exist $(XMLSEC_MSCRYPTO_INTDIR) rmdir /S /Q $(XMLSEC_MSCRYPTO_INTDIR)
if exist $(XMLSEC_MSCRYPTO_INTDIR_A) rmdir /S /Q $(XMLSEC_MSCRYPTO_INTDIR_A)
+ if exist $(XMLSEC_MSCNG_INTDIR) rmdir /S /Q $(XMLSEC_MSCNG_INTDIR)
+ if exist $(XMLSEC_MSCNG_INTDIR_A) rmdir /S /Q $(XMLSEC_MSCNG_INTDIR_A)
if exist $(XMLSEC_APPS_INTDIR) rmdir /S /Q $(XMLSEC_APPS_INTDIR)
if exist $(XMLSEC_APPS_INTDIR_A) rmdir /S /Q $(XMLSEC_APPS_INTDIR_A)
if exist $(BINDIR) rmdir /S /Q $(BINDIR)
@@ -502,26 +595,37 @@ install : all
if exist $(BINDIR)\$(XMLSEC_OPENSSL_SO) if not exist $(INCPREFIX)\$(XMLSEC_NAME)\openssl mkdir $(INCPREFIX)\$(XMLSEC_NAME)\openssl
if exist $(BINDIR)\$(XMLSEC_NSS_SO) if not exist $(INCPREFIX)\$(XMLSEC_NAME)\nss mkdir $(INCPREFIX)\$(XMLSEC_NAME)\nss
if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_SO) if not exist $(INCPREFIX)\$(XMLSEC_NAME)\mscrypto mkdir $(INCPREFIX)\$(XMLSEC_NAME)\mscrypto
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_SO) if not exist $(INCPREFIX)\$(XMLSEC_NAME)\mscng mkdir $(INCPREFIX)\$(XMLSEC_NAME)\mscng
if exist $(BASEDIR)\include\$(XMLSEC_NAME) copy $(BASEDIR)\include\$(XMLSEC_NAME)\*.h $(INCPREFIX)\$(XMLSEC_NAME)
if exist $(BINDIR)\$(XMLSEC_OPENSSL_SO) copy $(BASEDIR)\include\$(XMLSEC_NAME)\openssl\*.h $(INCPREFIX)\$(XMLSEC_NAME)\openssl
if exist $(BINDIR)\$(XMLSEC_NSS_SO) copy $(BASEDIR)\include\$(XMLSEC_NAME)\nss\*.h $(INCPREFIX)\$(XMLSEC_NAME)\nss
if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_SO) copy $(BASEDIR)\include\$(XMLSEC_NAME)\mscrypto\*.h $(INCPREFIX)\$(XMLSEC_NAME)\mscrypto
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_SO) copy $(BASEDIR)\include\$(XMLSEC_NAME)\mscng\*.h $(INCPREFIX)\$(XMLSEC_NAME)\mscng
if exist $(BINDIR)\$(XMLSEC_SO) copy $(BINDIR)\$(XMLSEC_SO) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_SO_MANIFEST) copy $(BINDIR)\$(XMLSEC_SO_MANIFEST) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_PDB) copy $(BINDIR)\$(XMLSEC_PDB) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_A) copy $(BINDIR)\$(XMLSEC_A) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_IMP) copy $(BINDIR)\$(XMLSEC_IMP) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_OPENSSL_SO) copy $(BINDIR)\$(XMLSEC_OPENSSL_SO) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_OPENSSL_SO_MANIFEST) copy $(BINDIR)\$(XMLSEC_OPENSSL_SO_MANIFEST) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_OPENSSL_PDB) copy $(BINDIR)\$(XMLSEC_OPENSSL_PDB) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_OPENSSL_A) copy $(BINDIR)\$(XMLSEC_OPENSSL_A) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_OPENSSL_IMP) copy $(BINDIR)\$(XMLSEC_OPENSSL_IMP) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_NSS_SO) copy $(BINDIR)\$(XMLSEC_NSS_SO) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_NSS_SO_MANIFEST) copy $(BINDIR)\$(XMLSEC_NSS_SO_MANIFEST) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_NSS_PDB) copy $(BINDIR)\$(XMLSEC_NSS_PDB) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_NSS_A) copy $(BINDIR)\$(XMLSEC_NSS_A) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_NSS_IMP) copy $(BINDIR)\$(XMLSEC_NSS_IMP) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_SO) copy $(BINDIR)\$(XMLSEC_MSCRYPTO_SO) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_SO_MANIFEST) copy $(BINDIR)\$(XMLSEC_MSCRYPTO_SO_MANIFEST) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_PDB) copy $(BINDIR)\$(XMLSEC_MSCRYPTO_PDB) $(SOPREFIX)
if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_A) copy $(BINDIR)\$(XMLSEC_MSCRYPTO_A) $(LIBPREFIX)
if exist $(BINDIR)\$(XMLSEC_MSCRYPTO_IMP) copy $(BINDIR)\$(XMLSEC_MSCRYPTO_IMP) $(LIBPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_SO) copy $(BINDIR)\$(XMLSEC_MSCNG_SO) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_SO_MANIFEST) copy $(BINDIR)\$(XMLSEC_MSCNG_SO_MANIFEST) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_PDB) copy $(BINDIR)\$(XMLSEC_MSCNG_PDB) $(SOPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_A) copy $(BINDIR)\$(XMLSEC_MSCNG_A) $(LIBPREFIX)
+ if exist $(BINDIR)\$(XMLSEC_MSCNG_IMP) copy $(BINDIR)\$(XMLSEC_MSCNG_IMP) $(LIBPREFIX)
if exist $(BINDIR)\$(APP_NAME) copy $(BINDIR)\$(APP_NAME) $(BINPREFIX)
if exist $(BINDIR)\$(APP_NAME_MANIFEST) copy $(BINDIR)\$(APP_NAME_MANIFEST) $(BINPREFIX)
@@ -529,20 +633,29 @@ uninstall :
if exist $(INCPREFIX)\$(XMLSEC_NAME) rmdir /S /Q $(INCPREFIX)\$(XMLSEC_NAME)
if exist $(SOPREFIX)\$(XMLSEC_SO) del /F /S /Q $(SOPREFIX)\$(XMLSEC_SO)
if exist $(SOPREFIX)\$(XMLSEC_SO_MANIFEST) del /F /S /Q $(SOPREFIX)\$(XMLSEC_SO)
+ if exist $(SOPREFIX)\$(XMLSEC_PDB) del /F /S /Q $(SOPREFIX)\$(XMLSEC_PDB)
if exist $(LIBPREFIX)\$(XMLSEC_A) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_A)
if exist $(LIBPREFIX)\$(XMLSEC_IMP) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_IMP)
if exist $(SOPREFIX)\$(XMLSEC_OPENSSL_SO) del /F /S /Q $(SOPREFIX)\$(XMLSEC_OPENSSL_SO)
if exist $(SOPREFIX)\$(XMLSEC_OPENSSL_SO_MANIFEST) del /F /S /Q $(SOPREFIX)\$(XMLSEC_OPENSSL_SO)
+ if exist $(SOPREFIX)\$(XMLSEC_OPENSSL_PDB) del /F /S /Q $(SOPREFIX)\$(XMLSEC_OPENSSL_PDB)
if exist $(LIBPREFIX)\$(XMLSEC_OPENSSL_A) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_OPENSSL_A)
if exist $(LIBPREFIX)\$(XMLSEC_OPENSSL_IMP) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_OPENSSL_IMP)
if exist $(SOPREFIX)\$(XMLSEC_NSS_SO) del /F /S /Q $(SOPREFIX)\$(XMLSEC_NSS_SO)
if exist $(SOPREFIX)\$(XMLSEC_NSS_SO_MANIFEST) del /F /S /Q $(SOPREFIX)\$(XMLSEC_NSS_SO)
+ if exist $(SOPREFIX)\$(XMLSEC_NSS_PDB) del /F /S /Q $(SOPREFIX)\$(XMLSEC_NSS_PDB)
if exist $(LIBPREFIX)\$(XMLSEC_NSS_A) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_NSS_A)
if exist $(LIBPREFIX)\$(XMLSEC_NSS_IMP) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_NSS_IMP)
if exist $(SOPREFIX)\$(XMLSEC_MSCRYPTO_SO) del /F /S /Q $(SOPREFIX)\$(XMLSEC_MSCRYPTO_SO)
if exist $(SOPREFIX)\$(XMLSEC_MSCRYPTO_SO_MANIFEST) del /F /S /Q $(SOPREFIX)\$(XMLSEC_MSCRYPTO_SO)
+ if exist $(SOPREFIX)\$(XMLSEC_MSCRYPTO_PDB) del /F /S /Q $(SOPREFIX)\$(XMLSEC_MSCRYPTO_PDB)
if exist $(LIBPREFIX)\$(XMLSEC_MSCRYPTO_A) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_MSCRYPTO_A)
if exist $(LIBPREFIX)\$(XMLSEC_MSCRYPTO_IMP) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_MSCRYPTO_IMP)
+ if exist $(SOPREFIX)\$(XMLSEC_MSCNG_SO) del /F /S /Q $(SOPREFIX)\$(XMLSEC_MSCNG_SO)
+ if exist $(SOPREFIX)\$(XMLSEC_MSCNG_SO_MANIFEST) del /F /S /Q $(SOPREFIX)\$(XMLSEC_MSCNG_SO)
+ if exist $(SOPREFIX)\$(XMLSEC_MSCNG_PDB) del /F /S /Q $(SOPREFIX)\$(XMLSEC_MSCNG_PDB)
+ if exist $(LIBPREFIX)\$(XMLSEC_MSCNG_A) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_MSCNG_A)
+ if exist $(LIBPREFIX)\$(XMLSEC_MSCNG_IMP) del /F /S /Q $(LIBPREFIX)\$(XMLSEC_MSCNG_IMP)
if exist $(BINPREFIX)\$(APP_NAME) del /F /S /Q $(BINPREFIX)\$(APP_NAME)
if exist $(BINPREFIX)\$(APP_NAME_MANIFEST) del /F /S /Q $(BINPREFIX)\$(APP_NAME_MANIFEST)
@@ -584,6 +697,11 @@ $(XMLSEC_MSCRYPTO_INTDIR) :
$(XMLSEC_MSCRYPTO_INTDIR_A) :
if not exist $(XMLSEC_MSCRYPTO_INTDIR_A) mkdir $(XMLSEC_MSCRYPTO_INTDIR_A)
+$(XMLSEC_MSCNG_INTDIR) :
+ if not exist $(XMLSEC_MSCNG_INTDIR) mkdir $(XMLSEC_MSCNG_INTDIR)
+$(XMLSEC_MSCNG_INTDIR_A) :
+ if not exist $(XMLSEC_MSCNG_INTDIR_A) mkdir $(XMLSEC_MSCNG_INTDIR_A)
+
# An implicit rule for xmlsec compilation.
{$(APPS_SRCDIR)}.c{$(XMLSEC_APPS_INTDIR)}.obj::
$(CC) $(CFLAGS) $(APP_CFLAGS) /Fo$(XMLSEC_APPS_INTDIR)\ /c $<
@@ -606,6 +724,11 @@ $(XMLSEC_MSCRYPTO_INTDIR_A) :
{$(XMLSEC_MSCRYPTO_SRCDIR)}.c{$(XMLSEC_MSCRYPTO_INTDIR)}.obj::
$(CC) $(CFLAGS) $(XMLSEC_MSCRYPTO_CFLAGS) /Fo$(XMLSEC_MSCRYPTO_INTDIR)\ /c $<
+{$(XMLSEC_SRCDIR)}.c{$(XMLSEC_MSCNG_INTDIR)}.obj::
+ $(CC) $(CFLAGS) $(XMLSEC_MSCNG_CFLAGS) /Fo$(XMLSEC_MSCNG_INTDIR)\ /c $<
+{$(XMLSEC_MSCNG_SRCDIR)}.c{$(XMLSEC_MSCNG_INTDIR)}.obj::
+ $(CC) $(CFLAGS) $(XMLSEC_MSCNG_CFLAGS) /Fo$(XMLSEC_MSCNG_INTDIR)\ /c $<
+
# An implicit rule for static xmlsec compilation.
{$(APPS_SRCDIR)}.c{$(XMLSEC_APPS_INTDIR_A)}.obj::
$(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "XMLSEC_STATIC" \
@@ -636,6 +759,13 @@ $(XMLSEC_MSCRYPTO_INTDIR_A) :
$(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "XMLSEC_STATIC" \
$(CFLAGS) $(XMLSEC_MSCRYPTO_CFLAGS) /Fo$(XMLSEC_MSCRYPTO_INTDIR_A)\ /c $<
+{$(XMLSEC_SRCDIR)}.c{$(XMLSEC_MSCNG_INTDIR_A)}.obj::
+ $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "XMLSEC_STATIC" \
+ $(CFLAGS) $(XMLSEC_MSCNG_CFLAGS) /Fo$(XMLSEC_MSCNG_INTDIR_A)\ /c $<
+{$(XMLSEC_MSCNG_SRCDIR)}.c{$(XMLSEC_MSCNG_INTDIR_A)}.obj::
+ $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "XMLSEC_STATIC" \
+ $(CFLAGS) $(XMLSEC_MSCNG_CFLAGS) /Fo$(XMLSEC_MSCNG_INTDIR_A)\ /c $<
+
# Compiles xmlsec source. Uses the implicit rule for commands.
$(XMLSEC_OBJS) : $(XMLSEC_INTDIR)
$(XMLSEC_OBJS_A) : $(XMLSEC_INTDIR_A)
@@ -649,6 +779,9 @@ $(XMLSEC_NSS_OBJS_A) : $(XMLSEC_NSS_INTDIR_A)
$(XMLSEC_MSCRYPTO_OBJS) : $(XMLSEC_MSCRYPTO_INTDIR)
$(XMLSEC_MSCRYPTO_OBJS_A) : $(XMLSEC_MSCRYPTO_INTDIR_A)
+$(XMLSEC_MSCNG_OBJS) : $(XMLSEC_MSCNG_INTDIR)
+$(XMLSEC_MSCNG_OBJS_A) : $(XMLSEC_MSCNG_INTDIR_A)
+
# Creates the shared objects and archives.
$(BINDIR)\$(XMLSEC_SO) : $(BINDIR) $(XMLSEC_OBJS)
$(LD) $(LDFLAGS) /DLL /VERSION:$(XMLSEC_VERSION_MAJOR).$(XMLSEC_VERSION_MINOR) \
@@ -678,6 +811,13 @@ $(BINDIR)\$(XMLSEC_MSCRYPTO_SO) : $(BINDIR) $(XMLSEC_MSCRYPTO_OBJS)
$(BINDIR)\$(XMLSEC_MSCRYPTO_A) : $(BINDIR) $(XMLSEC_MSCRYPTO_OBJS_A)
$(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XMLSEC_MSCRYPTO_A) $(XMLSEC_MSCRYPTO_OBJS_A)
+$(BINDIR)\$(XMLSEC_MSCNG_SO) : $(BINDIR) $(XMLSEC_MSCNG_OBJS)
+ $(LD) $(LDFLAGS) /DLL /VERSION:$(XMLSEC_VERSION_MAJOR).$(XMLSEC_VERSION_MINOR) \
+ /IMPLIB:$(BINDIR)\$(XMLSEC_MSCNG_IMP) /OUT:$(BINDIR)\$(XMLSEC_MSCNG_SO) \
+ $(XMLSEC_MSCNG_OBJS) $(XMLSEC_IMP) $(SOLIBS) $(XMLSEC_MSCNG_SOLIBS)
+$(BINDIR)\$(XMLSEC_MSCNG_A) : $(BINDIR) $(XMLSEC_MSCNG_OBJS_A)
+ $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XMLSEC_MSCNG_A) $(XMLSEC_MSCNG_OBJS_A)
+
# An implicit rule for xmlsec command line tool
$(BINDIR)\xmlseca.exe: $(BINDIR) $(XMLSEC_APPS_OBJS_A)
$(LD) $(LDFLAGS) /OUT:$@ $(XMLSEC_A) $(XMLSEC_CRYPTO_A) $(APP_LIBS) $(XMLSEC_APPS_OBJS_A)
diff --git a/win32/README.txt b/win32/README.txt
index 7040e050..ddb9edf3 100644
--- a/win32/README.txt
+++ b/win32/README.txt
@@ -127,7 +127,7 @@ you need to add one of the following global defines:
#define XMLSEC_CRYPTO_NSS
Also you'll need to define all configuration parameters used during XML Security
-Library compilation (XMLSEC_OPENSSL_100, XMLSEC_NO_AES, XMLSEC_NO_X509,...).
+Library compilation (XMLSEC_NO_AES, XMLSEC_NO_X509,...).
2.1 Additional Global Defines for static linking.
------------- ------------- ------------- ------
diff --git a/win32/configure.js b/win32/configure.js
index 7bbba19e..854a46af 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -1,5 +1,5 @@
/* Configure script for xmlsec, specific for Windows with Scripting Host.
- *
+ *
* This script will configure the libxmlsec build process and create necessary files.
* Run it with an 'help', or an invalid option and it will tell you what options
* it accepts.
@@ -30,7 +30,11 @@ var versionFile = ".\\configure.txt";
var optsFileIn = baseDir + "\\config.h.in";
var optsFile = baseDir + "\\config.h";
-/* Version strings for the binary distribution. Will be filled later
+/* Input and output files regarding the xmlsec version. */
+var versionHeaderIn = baseDir + "\\include\\xmlsec\\version.h.in";
+var versionHeader = baseDir + "\\include\\xmlsec\\version.h";
+
+/* Version strings for the binary distribution. Will be filled later
in the code. */
var verMajorXmlSec;
var verMinorXmlSec;
@@ -43,6 +47,7 @@ var withOpenSSL = 0;
var withOpenSSLVersion = "";
var withNss = 0;
var withMSCrypto = 0;
+var withMSCng = 0;
var withLibXSLT = 1;
var withIconv = 1;
var withNT4 = 1;
@@ -50,15 +55,20 @@ var withNT4 = 1;
/* Win32 build options. */
var buildUnicode = 1;
var buildDebug = 0;
+var buildWerror = 0;
+var buildCc = "cl.exe";
+var buildCflags = "";
var buildStatic = 1;
var buildWithDLSupport = 1;
var buildPrefix = ".";
var buildBinPrefix = "$(PREFIX)\\bin";
var buildIncPrefix = "$(PREFIX)\\include";
var buildLibPrefix = "$(PREFIX)\\lib";
-var buildSoPrefix = "$(PREFIX)\\lib";
+var buildSoPrefix = "$(PREFIX)\\bin";
var buildInclude = ".";
var buildLib = ".";
+var cruntime = "/MD";
+
/* Local stuff */
var error = 0;
@@ -97,14 +107,17 @@ function usage()
txt += "either 'yes' or 'no'.\n\n";
txt += "XmlSec Library options, default value given in parentheses:\n\n";
txt += " crypto: Crypto engines list, first is default: \"openssl\",\n";
- txt += " \"openssl=096\", \"openssl=097\", \"openssl=098\", \n";
- txt += " \"nss\", \"mscrypto\" (\"" + withCrypto + "\");\n"
- txt += " xslt: LibXSLT is used (" + (withLibXSLT? "yes" : "no") + ")\n";
- txt += " iconv: Use the iconv library (" + (withIconv? "yes" : "no") + ")\n";
- txt += " nt4: Enable NT 4.0 support (" + (withNT4? "yes" : "no") + ")\n";
+ txt += " \"openssl=100\", \"openssl=110\", \n";
+ txt += " \"nss\", \"mscrypto\", \"mscng\" (\"" + withCrypto + "\");\n"
+ txt += " xslt: LibXSLT is used (" + (withLibXSLT? "yes" : "no") + ")\n";
+ txt += " iconv: Use the iconv library (" + (withIconv? "yes" : "no") + ")\n";
+ txt += " nt4: Enable NT 4.0 support (" + (withNT4? "yes" : "no") + ")\n";
txt += "\nWin32 build options, default value given in parentheses:\n\n";
txt += " unicode: Build Unicode version (" + (buildUnicode? "yes" : "no") + ")\n";
txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n";
+ txt += " werror: Build with warnings as errors(" + (buildWerror? "yes" : "no") + ")\n";
+ txt += " cc: Build with the specified compiler(" + buildCc + ")\n";
+ txt += " cflags: Build with the specified compiler flags('" + buildCflags + "')\n";
txt += " static: Link libxmlsec statically to xmlsec (" + (buildStatic? "yes" : "no") + ")\n";
txt += " with-dl: Enable dynamic loading of xmlsec-crypto libraries (" + (buildWithDLSupport? "yes" : "no") + ")\n";
txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n";
@@ -114,7 +127,7 @@ function usage()
txt += " (" + buildIncPrefix + ")\n";
txt += " libdir: Directory where static and import libraries should be\n";
txt += " installed (" + buildLibPrefix + ")\n";
- txt += " sodir: Directory where shared libraries should be installed\n";
+ txt += " sodir: Directory where shared libraries should be installed\n";
txt += " (" + buildSoPrefix + ")\n";
txt += " include: Additional search path for the compiler, particularily\n";
txt += " where libxml headers can be found (" + buildInclude + ")\n";
@@ -149,24 +162,28 @@ function discoverVersion()
} else if(s.search(/^XMLSEC_VERSION_SUBMINOR/) != -1) {
vf.WriteLine(s);
verMicroXmlSec = s.substring(s.indexOf("=") + 1, s.length)
- }
+ }
}
cf.Close();
vf.WriteLine("BASEDIR=" + baseDir);
vf.WriteLine("XMLSEC_SRCDIR=" + srcDir);
vf.WriteLine("APPS_SRCDIR=" + srcDirApps);
vf.WriteLine("BINDIR=" + binDir);
- vf.WriteLine("WITH_CRYPTO=" + withCrypto);
- vf.WriteLine("WITH_DEFAULT_CRYPTO=" + withDefaultCrypto);
- vf.WriteLine("WITH_OPENSSL=" + withOpenSSL);
- vf.WriteLine("WITH_OPENSSL_VERSION=XMLSEC_OPENSSL_" + withOpenSSLVersion);
- vf.WriteLine("WITH_NSS=" + withNss);
- vf.WriteLine("WITH_MSCRYPTO=" + withMSCrypto);
+ vf.WriteLine("WITH_CRYPTO=" + withCrypto);
+ vf.WriteLine("WITH_DEFAULT_CRYPTO=" + withDefaultCrypto);
+ vf.WriteLine("WITH_OPENSSL=" + withOpenSSL);
+ vf.WriteLine("WITH_OPENSSL_VERSION=XMLSEC_OPENSSL_" + withOpenSSLVersion);
+ vf.WriteLine("WITH_NSS=" + withNss);
+ vf.WriteLine("WITH_MSCRYPTO=" + withMSCrypto);
+ vf.WriteLine("WITH_MSCNG=" + withMSCng);
vf.WriteLine("WITH_LIBXSLT=" + (withLibXSLT ? "1" : "0"));
vf.WriteLine("WITH_ICONV=" + (withIconv ? "1" : "0"));
vf.WriteLine("WITH_NT4=" + (withNT4 ? "1" : "0"));
vf.WriteLine("UNICODE=" + (buildUnicode? "1" : "0"));
vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
+ vf.WriteLine("WERROR=" + (buildWerror? "1" : "0"));
+ vf.WriteLine("CC=" + buildCc);
+ vf.WriteLine("CFLAGS=" + buildCflags);
vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
vf.WriteLine("WITH_DL=" + (buildWithDLSupport ? "1" : "0"));
vf.WriteLine("PREFIX=" + buildPrefix);
@@ -176,6 +193,7 @@ function discoverVersion()
vf.WriteLine("SOPREFIX=" + buildSoPrefix);
vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
vf.WriteLine("LIB=$(LIB);" + buildLib);
+ vf.WriteLine("CRUNTIME=" + cruntime);
vf.Close();
}
@@ -191,10 +209,10 @@ function configureXmlSec()
ln = ofi.ReadLine();
s = new String(ln);
if (s.search(/\@VERSION\@/) != -1) {
- of.WriteLine(s.replace(/\@VERSION\@/,
+ of.WriteLine(s.replace(/\@VERSION\@/,
verMajorXmlSec + "." + verMinorXmlSec + "." + verMicroXmlSec));
} else if (s.search(/\@XMLSECVERSION_NUMBER\@/) != -1) {
- of.WriteLine(s.replace(/\@XMLSECVERSION_NUMBER\@/,
+ of.WriteLine(s.replace(/\@XMLSECVERSION_NUMBER\@/,
verMajorXmlSec*10000 + verMinorXmlSec*100 + verMicroXmlSec*1));
} else
of.WriteLine(ln);
@@ -203,6 +221,43 @@ function configureXmlSec()
of.Close();
}
+/* This one will generate version.h from version.h.in. */
+function configureXmlSecVersion()
+{
+ var fso, ofi, of, ln, s;
+ fso = new ActiveXObject("Scripting.FileSystemObject");
+ if (fso.FileExists(versionHeader)) {
+ // version.h is already generated, nothing to do.
+ return;
+ }
+
+ ofi = fso.OpenTextFile(versionHeaderIn, 1);
+ of = fso.CreateTextFile(versionHeader, true);
+ while (ofi.AtEndOfStream != true) {
+ ln = ofi.ReadLine();
+ s = new String(ln);
+ if (s.search(/\@XMLSEC_VERSION_MAJOR\@/) != -1) {
+ of.WriteLine(s.replace(/\@XMLSEC_VERSION_MAJOR\@/,
+ verMajorXmlSec));
+ } else if (s.search(/\@XMLSEC_VERSION_MINOR\@/) != -1) {
+ of.WriteLine(s.replace(/\@XMLSEC_VERSION_MINOR\@/,
+ verMinorXmlSec));
+ } else if (s.search(/\@XMLSEC_VERSION_SUBMINOR\@/) != -1) {
+ of.WriteLine(s.replace(/\@XMLSEC_VERSION_SUBMINOR\@/,
+ verMicroXmlSec));
+ } else if (s.search(/\@XMLSEC_VERSION\@/) != -1) {
+ of.WriteLine(s.replace(/\@XMLSEC_VERSION\@/,
+ verMajorXmlSec + "." + verMinorXmlSec + "." + verMicroXmlSec));
+ } else if (s.search(/\@XMLSEC_VERSION_INFO\@/) != -1) {
+ of.WriteLine(s.replace(/\@XMLSEC_VERSION_INFO\@/,
+ (parseInt(verMajorXmlSec) + parseInt(verMinorXmlSec)) + ":" + verMicroXmlSec + ":" + verMinorXmlSec));
+ } else
+ of.WriteLine(ln);
+ }
+ ofi.Close();
+ of.Close();
+}
+
/* Creates the readme file for the binary distribution of 'bname', for the
version 'ver' in the file 'file'. This one is called from the Makefile when
generating a binary distribution. The parameters are passed by make. */
@@ -226,7 +281,7 @@ function genReadme(bname, ver, file)
f.WriteLine("environment variable.");
f.WriteLine(" If you want to make programmes in C which use " + bname + ", you'll");
f.WriteLine("likely know how to use the contents of this package. If you don't, please");
- f.WriteLine("refer to your compiler's documentation.");
+ f.WriteLine("refer to your compiler's documentation.");
f.WriteBlankLines(1);
f.WriteLine(" If there is something you cannot keep for yourself, such as a problem,");
f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using");
@@ -261,6 +316,12 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
buildUnicode = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "debug")
buildDebug = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "werror")
+ buildWerror = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "cc")
+ buildCc = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "cflags")
+ buildCflags = arg.substring(opt.length + 1, arg.length);
else if (opt == "static")
buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "with-dl")
@@ -281,6 +342,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
buildInclude = arg.substring(opt.length + 1, arg.length);
else if (opt == "lib")
buildLib = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "cruntime")
+ cruntime = arg.substring(opt.length + 1, arg.length);
else
error = 1;
} else if (i == 0) {
@@ -304,18 +367,14 @@ if (error != 0) {
// Discover crypto support
var crlist, j, curcrypto;
-crlist = withCrypto.split(",");
+crlist = withCrypto.split(",");
withCrypto = "";
withDefaultCrypto = "";
-for (j = 0; j < crlist.length; j++) {
+for (j = 0; j < crlist.length; j++) {
if (crlist[j] == "openssl") {
curcrypto="openssl";
withOpenSSL = 1;
- withOpenSSLVersion = "100"; /* default */
- } else if (crlist[j] == "openssl=098") {
- curcrypto="openssl";
- withOpenSSL = 1;
- withOpenSSLVersion = "098";
+ withOpenSSLVersion = "110"; /* default */
} else if (crlist[j] == "openssl=100") {
curcrypto="openssl";
withOpenSSL = 1;
@@ -330,6 +389,9 @@ for (j = 0; j < crlist.length; j++) {
} else if (crlist[j] == "mscrypto") {
curcrypto="mscrypto";
withMSCrypto = 1;
+ } else if (crlist[j] == "mscng") {
+ curcrypto="mscng";
+ withMSCng = 1;
} else {
WScript.Echo("Unknown crypto engine \"" + crlist[j] + "\" is found. Aborting.");
WScript.Quit(error);
@@ -353,6 +415,8 @@ WScript.Echo(baseName + " version: " + verMajorXmlSec + "." + verMinorXmlSec + "
// Configure libxmlsec.
configureXmlSec();
+// Generate version.h.
+configureXmlSecVersion();
if (error != 0) {
WScript.Echo("Configuration failed, aborting.");
WScript.Quit(error);
@@ -373,14 +437,19 @@ txtOut += " Use OpenSSL: " + boolToStr(withOpenSSL) + "\n";
txtOut += "Use OpenSSL Version: " + withOpenSSLVersion + "\n";
txtOut += " Use NSS: " + boolToStr(withNss) + "\n";
txtOut += " Use MSCrypto: " + boolToStr(withMSCrypto) + "\n";
+txtOut += " Use MSCng: " + boolToStr(withMSCng) + "\n";
txtOut += " Use LibXSLT: " + boolToStr(withLibXSLT) + "\n";
txtOut += " Use iconv: " + boolToStr(withIconv) + "\n";
txtOut += " NT 4.0 support: " + boolToStr(withNT4) + "\n";
txtOut += "\n";
txtOut += "Win32 build configuration\n";
txtOut += "-------------------------\n";
+txtOut += " C-Runtime option: " + cruntime + "\n";
txtOut += " Unicode: " + boolToStr(buildUnicode) + "\n";
txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n";
+txtOut += "Warnings as errors: " + boolToStr(buildWerror) + "\n";
+txtOut += " C compiler: " + buildCc + "\n";
+txtOut += " C compiler flags: " + buildCflags + "\n";
txtOut += " Static xmlsec: " + boolToStr(buildStatic) + "\n";
txtOut += " Enable DL support: " + boolToStr(buildWithDLSupport) + "\n";
txtOut += " Install prefix: " + buildPrefix + "\n";
diff --git a/win32/mycfg.bat b/win32/mycfg.bat
index 17617b0c..5e4819c8 100644
--- a/win32/mycfg.bat
+++ b/win32/mycfg.bat
@@ -8,14 +8,16 @@ REM
REM Aleksey Sanin <aleksey@aleksey.com>
REM
-SET PREFIX=C:\cygwin\home\local
-SET XMLSEC_INCLUDE=%PREFIX%\include;%PREFIX%\include\mozilla;%PREFIX%\include\mozilla\nspr;%PREFIX%\include\mozilla\nss;%MSSDK_INCLUDE%
+SET PREFIX=C:\local
+SET XMLSEC_CRYPTO=openssl
+SET XMLSEC_INCLUDE=%PREFIX%\include;%MSSDK_INCLUDE%
SET XMLSEC_LIB=%PREFIX%\lib;%MSSDK_LIB%
-SET XMLSEC_OPTIONS=static=no iconv=no debug=yes xslt=yes crypto=mscrypto,openssl unicode=yes
+SET XMLSEC_OPTIONS=static=yes iconv=no debug=yes xslt=yes crypto=%XMLSEC_CRYPTO% unicode=yes
del /F Makefile configure.txt
-cscript configure.js prefix=%PREFIX% %XMLSEC_OPTIONS% include=%XMLSEC_INCLUDE% lib=%XMLSEC_LIB%
+cscript configure.js prefix=%PREFIX% %XMLSEC_OPTIONS% include=%XMLSEC_INCLUDE% lib=%XMLSEC_LIB%
mkdir binaries
copy %PREFIX%\bin\*.dll binaries
copy %PREFIX%\lib\*.dll binaries
+