summaryrefslogtreecommitdiffstats
path: root/src/config/crypto.h
blob: 1edcdce457c7cab44d49c6beea45a664f70d9a95 (plain) (blame)
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
#ifndef CONFIG_CRYPTO_H
#define CONFIG_CRYPTO_H

/** @file
 *
 * Cryptographic configuration
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

/** RSA public-key algorithm */
#define CRYPTO_PUBKEY_RSA

/** AES-CBC block cipher */
#define CRYPTO_CIPHER_AES_CBC

/** MD5 digest algorithm
 *
 * Note that use of MD5 is implicit when using TLSv1.1 or earlier.
 */
#define CRYPTO_DIGEST_MD5

/** SHA-1 digest algorithm
 *
 * Note that use of SHA-1 is implicit when using TLSv1.1 or earlier.
 */
#define CRYPTO_DIGEST_SHA1

/** SHA-224 digest algorithm */
#define CRYPTO_DIGEST_SHA224

/** SHA-256 digest algorithm
 *
 * Note that use of SHA-256 is implicit when using TLSv1.2.
 */
#define CRYPTO_DIGEST_SHA256

/** SHA-384 digest algorithm */
#define CRYPTO_DIGEST_SHA384

/** SHA-512 digest algorithm */
#define CRYPTO_DIGEST_SHA512

/** Margin of error (in seconds) allowed in signed timestamps
 *
 * We default to allowing a reasonable margin of error: 12 hours to
 * allow for the local time zone being non-GMT, plus 30 minutes to
 * allow for general clock drift.
 */
#define TIMESTAMP_ERROR_MARGIN ( ( 12 * 60 + 30 ) * 60 )

/** Default cross-signed certificate source
 *
 * This is the default location from which iPXE will attempt to
 * download cross-signed certificates in order to complete a
 * certificate chain.
 */
#define CROSSCERT "http://ca.ipxe.org/auto"

/** Perform OCSP checks when applicable
 *
 * Some CAs provide non-functional OCSP servers, and some clients are
 * forced to operate on networks without access to the OCSP servers.
 * Allow the user to explicitly disable the use of OCSP checks.
 */
#define OCSP_CHECK

#include <config/named.h>
#include NAMED_CONFIG(crypto.h)
#include <config/local/crypto.h>
#include LOCAL_NAMED_CONFIG(crypto.h)

#endif /* CONFIG_CRYPTO_H */