]> git.saurik.com Git - apple/security.git/blob - Security/libsecurity_cryptkit/lib/ckconfig.h
Security-57031.40.6.tar.gz
[apple/security.git] / Security / libsecurity_cryptkit / lib / ckconfig.h
1 /*
2 File: ckconfig.h
3
4 Contains: Common config info.
5
6
7 Copyright: Copyright (c) 1998,2011,2014 Apple Inc.
8 All rights reserved.
9
10 Change History (most recent first):
11
12 <7> 10/06/98 ap Changed to compile with C++.
13
14 To Do:
15 */
16
17 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
18 *
19 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
20 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
21 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
22 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
23 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
24 * EXPOSE YOU TO LIABILITY.
25 ***************************************************************************
26 */
27
28 #ifndef _CK_CONFIG_H_
29 #define _CK_CONFIG_H_
30
31 /*
32 * Common build flags.
33 */
34 #define DEBUG_ENGINE 0
35
36 #define ENGINE_127_BITS 0 /* hard-coded 127 elliptic() */
37
38 /*
39 * These flags are set en masse, one set per target in the XCode project file or
40 * Makefile. They determine what gets compiled into the library. Every flag
41 * has to be defined for every configureation - preprocessors directives use
42 * #if, not #ifdef.
43 */
44
45 #ifdef CK_SECURITY_BUILD
46 /*
47 * Standard Security.framework build
48 */
49 #define CRYPTKIT_DER_ENABLE 1 /* DER encoding support */
50 #define CRYPTKIT_LIBMD_DIGEST 1 /* use CommonCrypto digests */
51 #define CRYPTKIT_ELL_PROJ_ENABLE 1 /* elliptic projection */
52 #define CRYPTKIT_ECDSA_ENABLE 1 /* ECDSA (requires ELL_PROJ_ENABLE) */
53 #define CRYPTKIT_CIPHERFILE_ENABLE 0 /* cipherfile w/symmetric encryption */
54 #define CRYPTKIT_SYMMETRIC_ENABLE 0 /* symmetric encryption */
55 #define CRYPTKIT_ASYMMETRIC_ENABLE 1 /* asymmetric encryption */
56 #define CRYPTKIT_MD5_ENABLE 1 /* MD5 hash */
57 #define CRYPTKIT_SHA1_ENABLE 1 /* SHA1 hash - needed for GHMAX_LEGACY */
58 #define CRYPTKIT_HMAC_LEGACY 1
59 #define CRYPTKIT_KEY_EXCHANGE 0 /* FEE key exchange */
60 #define CRYPTKIT_HIGH_LEVEL_SIG 0 /* high level one-shot signature */
61 #define CRYPTKIT_GIANT_STACK_ENABLE 0 /* cache of giants */
62
63 #elif defined(CK_STANDALONE_BUILD)
64 /*
65 * Standalone library build
66 */
67 #define CRYPTKIT_DER_ENABLE 0
68 #define CRYPTKIT_LIBMD_DIGEST 0
69 #define CRYPTKIT_ELL_PROJ_ENABLE 1
70 #define CRYPTKIT_ECDSA_ENABLE 1
71 #define CRYPTKIT_CIPHERFILE_ENABLE 1
72 #define CRYPTKIT_SYMMETRIC_ENABLE 1
73 #define CRYPTKIT_ASYMMETRIC_ENABLE 1
74 #define CRYPTKIT_MD5_ENABLE 1
75 #define CRYPTKIT_SHA1_ENABLE 1
76 #define CRYPTKIT_HMAC_LEGACY 0
77 #define CRYPTKIT_KEY_EXCHANGE 1
78 #define CRYPTKIT_HIGH_LEVEL_SIG 1
79 #define CRYPTKIT_GIANT_STACK_ENABLE 1
80
81 #elif defined(CK_MINIMUM_SIG_BUILD)
82 /*
83 * Standalone, just ElGamal signature and key generation
84 */
85 #define CRYPTKIT_DER_ENABLE 0
86 #define CRYPTKIT_LIBMD_DIGEST 0
87 #define CRYPTKIT_ELL_PROJ_ENABLE 0
88 #define CRYPTKIT_ECDSA_ENABLE 0
89 #define CRYPTKIT_CIPHERFILE_ENABLE 0
90 #define CRYPTKIT_SYMMETRIC_ENABLE 0
91 #define CRYPTKIT_ASYMMETRIC_ENABLE 0
92 #define CRYPTKIT_MD5_ENABLE 1
93 /* FIXME convert native ElGamal to use SHA1! */
94 #define CRYPTKIT_SHA1_ENABLE 0
95 #define CRYPTKIT_HMAC_LEGACY 0
96 #define CRYPTKIT_KEY_EXCHANGE 0
97 #define CRYPTKIT_HIGH_LEVEL_SIG 0
98 #define CRYPTKIT_GIANT_STACK_ENABLE 1
99
100 #else
101
102 #error You must supply a build configuration.
103 #endif
104
105 #endif /* _CK_CONFIG_H_ */