The intention of the existing code (as documented in its own comments) is that it should be possible to override the list of trusted root certificates using a "trust" setting held in non-volatile stored options. However, the rootcert_init() function currently executes before any devices have been probed, and so will not be able to retrieve any such non-volatile stored options. Fix by executing rootcert_init() only after devices have been probed. Since startup functions may be executed multiple times (unlike initialisation functions), add an explicit flag to preserve the property that rootcert_init() should run only once. As before, if an explicit root of trust is specified at build time, then any runtime "trust" setting will be ignored. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
93 |
|
93 |
|
94 |
|
94 |
|
95 |
|
95 |
|
|
96 |
|
|
96 |
|
97 |
|
97 |
|
98 |
|
98 |
|
99 |
|
99 |
|
100 |
|
100 |
|
101 |
|
101 |
|
102 |
|
102 |
|
|
|
|
103 |
|
|
103 |
|
104 |
|
104 |
|
105 |
|
105 |
|
106 |
|
|
|
||
109 |
|
110 |
|
110 |
|
111 |
|
111 |
|
112 |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
112 |
|
116 |
|
113 |
|
117 |
|
114 |
|
118 |
|
|
|
||
118 |
|
122 |
|
119 |
|
123 |
|
120 |
|
124 |
|
121 |
|
|
|
122 |
|
|
|
|
125 |
|
|
|
126 |
|
|
123 |
|
127 |
|