]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_apple_csp/open_ssl/openssl/opensslconf.h
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / libsecurity_apple_csp / open_ssl / openssl / opensslconf.h
1 /*
2 * Copyright (c) 2000-2001,2011,2014 Apple 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,2011,2014 Apple 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_IDEA 1
58 #define NO_MDC2 1
59
60 #ifdef NDEBUG
61 #define NO_ERR 1
62 #endif
63
64 /* disable the static callback ptrs in cryptlib.c */
65 #define CRYPTO_CALLBACK_ENABLE 0
66
67 /* disable the BN_{set,get}_params mechanism, unused */
68 #define BN_PARAMS_ENABLE 0
69
70 typedef uint32 RC2_INT;
71 typedef uint32 RC4_INT;
72
73 /* the following two need calibration and lots of testing; see rc4_enc.c... */
74 #undef RC4_CHUNK
75 #undef RC4_INDEX
76
77 typedef uint32 RC5_32_INT;
78 typedef uint32 MD2_INT;
79
80 #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
81 #define CONFIG_HEADER_BF_LOCL_H
82 #define BF_PTR
83 #endif /* HEADER_BF_LOCL_H */
84
85 /*
86 * FIXME - this could certainly use some tweaking
87 */
88 /* Should we define BN_DIV2W here? */
89
90 /* Only one for the following should be defined */
91 /* The prime number generation stuff may not work when
92 * EIGHT_BIT but I don't care since I've only used this mode
93 * for debuging the bignum libraries */
94
95 /*
96 * Using 64 bit results in an 8% speedup for RSA sign, but a 3%
97 * slowdown for RSA verify on a G4 cubeƊcompared to 32 bit.
98 * --dpm, 5/10/01
99 */
100 #undef SIXTY_FOUR_BIT_LONG
101 #undef SIXTY_FOUR_BIT
102 #define THIRTY_TWO_BIT
103 #undef SIXTEEN_BIT
104 #undef EIGHT_BIT
105
106 #ifdef __cplusplus
107 }
108 #endif
109
110
111 #endif /* _OPENSSL_CONF_H_ */