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