Browse Source

[crypto] Allow cross-certificate source to be configured at build time

Provide a build option CROSSCERT in config/crypto.h to allow the
default cross-signed certificate source to be configured at build
time.  The ${crosscert} setting may still be used to reconfigure the
cross-signed certificate source at runtime.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
f8e1678b84
2 changed files with 10 additions and 1 deletions
  1. 8
    0
      src/config/crypto.h
  2. 2
    1
      src/net/validator.c

+ 8
- 0
src/config/crypto.h View File

50
  */
50
  */
51
 #define TIMESTAMP_ERROR_MARGIN ( ( 12 * 60 + 30 ) * 60 )
51
 #define TIMESTAMP_ERROR_MARGIN ( ( 12 * 60 + 30 ) * 60 )
52
 
52
 
53
+/** Default cross-signed certificate source
54
+ *
55
+ * This is the default location from which iPXE will attempt to
56
+ * download cross-signed certificates in order to complete a
57
+ * certificate chain.
58
+ */
59
+#define CROSSCERT "http://ca.ipxe.org/auto"
60
+
53
 #include <config/named.h>
61
 #include <config/named.h>
54
 #include NAMED_CONFIG(crypto.h)
62
 #include NAMED_CONFIG(crypto.h)
55
 #include <config/local/crypto.h>
63
 #include <config/local/crypto.h>

+ 2
- 1
src/net/validator.c View File

41
 #include <ipxe/crc32.h>
41
 #include <ipxe/crc32.h>
42
 #include <ipxe/ocsp.h>
42
 #include <ipxe/ocsp.h>
43
 #include <ipxe/validator.h>
43
 #include <ipxe/validator.h>
44
+#include <config/crypto.h>
44
 
45
 
45
 /** @file
46
 /** @file
46
  *
47
  *
133
 };
134
 };
134
 
135
 
135
 /** Default cross-signed certificate source */
136
 /** Default cross-signed certificate source */
136
-static const char crosscert_default[] = "http://ca.ipxe.org/auto";
137
+static const char crosscert_default[] = CROSSCERT;
137
 
138
 
138
 /**
139
 /**
139
  * Append cross-signing certificates to certificate chain
140
  * Append cross-signing certificates to certificate chain

Loading…
Cancel
Save