File: XSECW32Config.hpp

package info (click to toggle)
xml-security-c 1.5.1-3%2Bsqueeze3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,424 kB
  • ctags: 5,832
  • sloc: cpp: 45,357; sh: 8,270; makefile: 689
file content (246 lines) | stat: -rw-r--r-- 6,342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/*
 * Copyright 2002-2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * XSEC
 *
 * Configuration file for Windows platform
 *
 * Needs to be modified by hand
 *
 * Author(s): Berin Lautenbach
 *
 * $Id: XSECW32Config.hpp 794017 2009-07-14 19:03:52Z scantor $
 *
 */

#include <xercesc/util/XercesVersion.hpp>

/*
 * These are the high level numerics that need to be changed to bump the
 * version number.
 *
 * They are used to create version strings - see the details at the end of this file
 */

#define XSEC_VERSION_MAJOR   1
#define XSEC_VERSION_MEDIUM  5
#define XSEC_VERSION_MINOR   1

/*
 * Because we don't have a configure script, we need to rely on version
 * numbers to understand library idiosycracies
 */

#if (XERCES_VERSION_MAJOR >= 3)

/* Is it possible to setIdAttributes? - DOM level 3 call.  V3.x
   API Version */

#	define XSEC_XERCES_HAS_BOOLSETIDATTRIBUTE 1

/* 3.0 no longer supports DOMWriter, must use DOMLSSerializer instead
*/

#	define XSEC_XERCES_DOMLSSERIALIZER 1

/* 3.0 now uses getInputEncoding rather than getEncoding to determine
   encoding that was found in input document */

#	define XSEC_XERCES_DOMENTITYINPUTENCODING 1

/* 3.0 now 64-bit safe */

#   define XSEC_XERCES_64BITSAFE 1

/* 3.0 InputStream must expose content type */

#   define XSEC_XERCES_INPUTSTREAM_HAS_CONTENTTYPE 1
#endif

#if (XERCES_VERSION_MAJOR == 3) || ((XERCES_VERSION_MAJOR == 2) && (XERCES_VERSION_MINOR >= 3))
/*
 * As of version 2.3, xerces requires a version parameter in XMLFormatter
 * constructors
 */
#	define XSEC_XERCES_FORMATTER_REQUIRES_VERSION 1

 /* 2.3 and above use a user defined Memory Manager.  In some cases, this
   actually needs to be passed to functions
*/

#	define XSEC_XERCES_REQUIRES_MEMMGR 1

/* Does XMLString::release() exist */

#	define XSEC_XERCES_XMLSTRING_HAS_RELEASE 1

#	if (XERCES_VERSION_MAJOR < 3)
		/* Is it possible to setIdAttributes? - DOM level 3 call.  V2.x API */

#		define XSEC_XERCES_HAS_SETIDATTRIBUTE 1

#	endif

#else
/*
 * In version 2.2, the XMLUri class was broken for relative URI de-referencing
 */
#	define XSEC_XERCES_BROKEN_XMLURI 1
#endif



/*
 * The following defines whether Xalan integration is required.
 *
 * Xalan is used for XSLT and complex XPath processing.
 * Activate this #define if Xalan is not required (or desired)
 */

#define XSEC_NO_XALAN

#if !defined (XSEC_NO_XALAN)

#	include <xalanc/Include/XalanVersion.hpp>

#	if (_XALAN_VERSION <= 10800)
#		define XSEC_XSLEXCEPTION_RETURNS_DOMSTRING	1
#	endif
#	if (_XALAN_VERSION >= 10900)

		/* 1.9 and above have XSLException::getType() returns XalanDOMChar *, not
			XalanDOMString
		*/

#		undef XSEC_XSLEXCEPTION_RETURNS_DOMSTRING

		/* 1.9 and above do not take a XercesDOMSupport as input to the ctor */

#		undef XSEC_XERCESPARSERLIAISON_REQS_DOMSUPPORT

		/* 1.9 and above require a NodeRefList as input to XPathEvaluator::
		   selectNodeList
		*/

#		define XSEC_SELECTNODELIST_REQS_NODEREFLIST

		/* 1.9 and above use MemoryManager for the XPath Function classes
		*/

#		define XSEC_XALAN_REQS_MEMORYMANAGER
#	else
		/* 1.9 and above have XSLException::getType() returns XalanDOMChar *, not
			XalanDOMString
		*/

#		define XSEC_XSLEXCEPTION_RETURNS_DOMSTRING 1

		/* 1.9 and above do not take a XercesDOMSupport as input to the ctor */

#		define XSEC_XERCESPARSERLIAISON_REQS_DOMSUPPORT

		/* 1.9 and above require a NodeRefList as input to XPathEvaluator::
		   selectNodeList
		*/

#		undef XSEC_SELECTNODELIST_REQS_NODEREFLIST

		/* 1.9 and above use MemoryManager for the XPath Function classes
		*/

#		undef XSEC_XALAN_REQS_MEMORYMANAGER

#	endif

#endif

/*
 * Define presence of cryptographic providers
 */

#define HAVE_OPENSSL 1

#define HAVE_WINCAPI 1

// NSS Code is currently alpha.  It should work, but you will also
// need to include the NSS libraries during the link.

/* #define HAVE_NSS 1 */


/*
 * Some settings for OpenSSL if we have it
 *
 */

#if defined (HAVE_OPENSSL)

#	include <openssl/opensslv.h>
#	if (OPENSSL_VERSION_NUMBER >= 0x00907000)

#		define XSEC_OPENSSL_CONST_BUFFERS
#		define XSEC_OPENSSL_HAVE_AES
#		define XSEC_OPENSSL_CANSET_PADDING
#		define XSEC_OPENSSL_HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
#	endif
#	if (OPENSSL_VERSION_NUMBER >= 0x00908000)
#		define XSEC_OPENSSL_D2IX509_CONST_BUFFER
#	endif

#endif

/*
 * Macros used to determine what header files exist on this
 * system
 */

/* Posix unistd.h */
/* #define HAVE_UNISTD_H */

/* Windows direct.h */
#define HAVE_DIRECT_H 1

// --------------------------------------------------------------------------------
//           Version Handling
// --------------------------------------------------------------------------------

/*
 * The following code makes use of the Xerces version handling macros to define
 * some constants that can be used during conditional compilation.
 */

/* This can be used for conditional compilation and for testing during
 * autoconfigures.
 *
 * It will create a string of the form 10000 * MAJOR + 100 * MEDIUM + MINOR
 * E.g. 10301 for version 1.3.1
 */

#define _XSEC_VERSION_FULL CALC_EXPANDED_FORM (XSEC_VERSION_MAJOR,XSEC_VERSION_MEDIUM,XSEC_VERSION_MINOR)

/* Some useful strings for versioning - based on the same strings from Xerces */

#define XSEC_FULLVERSIONSTR INVK_CAT3_SEP_UNDERSCORE(XSEC_VERSION_MAJOR,XSEC_VERSION_MEDIUM,XSEC_VERSION_MINOR)
#define XSEC_FULLVERSIONDOT INVK_CAT3_SEP_PERIOD(XSEC_VERSION_MAJOR,XSEC_VERSION_MEDIUM,XSEC_VERSION_MINOR)
#define XSEC_FULLVERSIONNUM INVK_CAT3_SEP_NIL(XSEC_VERSION_MAJOR,XSEC_VERSION_MEDIUM,XSEC_VERSION_MINOR)
#define XSEC_VERSIONSTR     INVK_CAT2_SEP_UNDERSCORE(XSEC_VERSION_MAJOR,XSEC_VERSION_MEDIUM)

/* The following is used for backwards compatibility with previous version handling */

#define XSEC_VERSION	     "XSEC_FULLVERSIONDOT"