]> git.saurik.com Git - apple/security.git/blob - AppleCSP/open_ssl/openssl/opensslconf.h
Security-54.1.tar.gz
[apple/security.git] / AppleCSP / open_ssl / openssl / opensslconf.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 * Copyright (c) 2000-2002 Apple Computer, Inc. All Rights Reserved.
21 *
22 * The contents of this file constitute Original Code as defined in and are
23 * subject to the Apple Public Source License Version 1.2 (the 'License').
24 * You may not use this file except in compliance with the License. Please obtain
25 * a copy of the License at http://www.apple.com/publicsource and read it before
26 * using this file.
27 *
28 * This Original Code and all software distributed under the License are
29 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
30 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
31 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
32 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
33 * specific language governing rights and limitations under the License.
34 */
35
36 /*
37 * opensslconf.h - hand-rolled config #defines for openssl code used in AppleCSP
38 * Written by Doug Mitchell 4/3/2001
39 */
40 #ifndef _OPENSSL_CONF_H_
41 #define _OPENSSL_CONF_H_
42
43 #include <Security/cssmtype.h> /* for uint32, etc. */
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /*
50 * Flags to disable a lot of code we don't need.
51 */
52 #define _OPENSSL_APPLE_CDSA_ 1
53
54 #define NO_MD5 1
55 #define NO_RIPEMD 1
56 #define NO_DES 1
57 #define NO_BF 1
58 #define NO_CAST 1
59 #define NO_IDEA 1
60 #define NO_MDC2 1
61
62 #ifdef NDEBUG
63 #define NO_ERR 1
64 #endif
65
66 /* disable the static callback ptrs in cryptlib.c */
67 #define CRYPTO_CALLBACK_ENABLE 0
68
69 /* disable the BN_{set,get}_params mechanism, unused */
70 #define BN_PARAMS_ENABLE 0
71
72 typedef uint32 RC2_INT;
73 typedef uint32 RC4_INT;
74
75 /* the following two need calibration and lots of testing; see rc4_enc.c... */
76 #undef RC4_CHUNK
77 #undef RC4_INDEX
78
79 typedef uint32 RC5_32_INT;
80
81 typedef uint32 MD2_INT;
82
83 /*
84 * FIXME - this could certainly use some tweaking
85 */
86 /* Should we define BN_DIV2W here? */
87
88 /* Only one for the following should be defined */
89 /* The prime number generation stuff may not work when
90 * EIGHT_BIT but I don't care since I've only used this mode
91 * for debuging the bignum libraries */
92
93 /*
94 * Using 64 bit results in an 8% speedup for RSA sign, but a 3%
95 * slowdown for RSA verify on a G4 cubeÊcompared to 32 bit.
96 * --dpm, 5/10/01
97 */
98 #undef SIXTY_FOUR_BIT_LONG
99 #undef SIXTY_FOUR_BIT
100 #define THIRTY_TWO_BIT
101 #undef SIXTEEN_BIT
102 #undef EIGHT_BIT
103
104 #ifdef __cplusplus
105 }
106 #endif
107
108
109 #endif /* _OPENSSL_CONF_H_ */