|
97 | 97 |
|
98 | 98 | /* ------------------------------------------------------------------ |
99 | 99 | * Always-on disables (no fragment opts out today). |
100 | | - * ------------------------------------------------------------------ */ |
| 100 | + * ------------------------------------------------------------------ |
| 101 | + * Each entry asserts that no fragment has opted in via the matching |
| 102 | + * positive flag, then defines the disable. If one of these assertions |
| 103 | + * fires, the right fix is to introduce a WOLFBOOT_NEEDS_* marker and |
| 104 | + * gate the disable on its absence (see docs/wolfssl-config.md, Section |
| 105 | + * 8 Step 5). |
| 106 | + * |
| 107 | + * Entries without an assertion either have no canonical positive form |
| 108 | + * (NO_ASN_TIME, NO_SIG_WRAPPER) or describe wolfBoot's environment |
| 109 | + * rather than a wolfCrypt feature a fragment would plausibly want to |
| 110 | + * enable (NO_WRITEV, NO_MAIN_DRIVER, NO_WOLFSSL_DIR, WOLFSSL_NO_SOCK, |
| 111 | + * WOLFSSL_IGNORE_FILE_WARN, NO_ERROR_STRINGS, NO_OLD_RNGNAME). */ |
| 112 | + |
| 113 | +#if defined(HAVE_DH) |
| 114 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 115 | +#endif |
101 | 116 | #define NO_DH |
| 117 | + |
| 118 | +#if defined(WOLFSSL_PEM) |
| 119 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 120 | +#endif |
102 | 121 | #define WOLFSSL_NO_PEM |
| 122 | + |
103 | 123 | #define NO_ASN_TIME |
| 124 | + |
| 125 | +#if defined(HAVE_RC4) |
| 126 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 127 | +#endif |
104 | 128 | #define NO_RC4 |
| 129 | + |
| 130 | +#if defined(WOLFSSL_SHA1) |
| 131 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 132 | +#endif |
105 | 133 | #define NO_SHA |
| 134 | + |
| 135 | +#if defined(HAVE_DSA) |
| 136 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 137 | +#endif |
106 | 138 | #define NO_DSA |
| 139 | + |
| 140 | +#if defined(WOLFSSL_MD4) |
| 141 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 142 | +#endif |
107 | 143 | #define NO_MD4 |
| 144 | + |
| 145 | +#if defined(HAVE_RABBIT) |
| 146 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 147 | +#endif |
108 | 148 | #define NO_RABBIT |
| 149 | + |
| 150 | +#if defined(WOLFSSL_MD5) |
| 151 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 152 | +#endif |
109 | 153 | #define NO_MD5 |
| 154 | + |
110 | 155 | #define NO_SIG_WRAPPER |
| 156 | + |
| 157 | +#if defined(WOLFSSL_CERT_GEN) |
| 158 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 159 | +#endif |
111 | 160 | #define NO_CERT |
| 161 | + |
| 162 | +#if defined(HAVE_SESSION_CACHE) |
| 163 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 164 | +#endif |
112 | 165 | #define NO_SESSION_CACHE |
| 166 | + |
| 167 | +#if defined(HAVE_HC128) |
| 168 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 169 | +#endif |
113 | 170 | #define NO_HC128 |
| 171 | + |
| 172 | +#if defined(HAVE_DES3) |
| 173 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 174 | +#endif |
114 | 175 | #ifndef NO_DES3 |
115 | 176 | # define NO_DES3 |
116 | 177 | #endif |
| 178 | + |
117 | 179 | #define NO_WRITEV |
118 | 180 | #ifndef WOLFBOOT_PARTITION_FILENAME |
119 | 181 | # define NO_FILESYSTEM |
|
124 | 186 | #define WOLFSSL_NO_SOCK |
125 | 187 | #define WOLFSSL_IGNORE_FILE_WARN |
126 | 188 | #define NO_ERROR_STRINGS |
| 189 | + |
| 190 | +#if defined(HAVE_PKCS12) |
| 191 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 192 | +#endif |
127 | 193 | #define NO_PKCS12 |
| 194 | + |
| 195 | +/* NO_PKCS8: no assertion. encrypt.h's SECURE_PKCS11 path defines |
| 196 | + * HAVE_PKCS8 vestigially; wolfSSL gates PKCS8 on `#ifndef NO_PKCS8`, |
| 197 | + * so the HAVE_PKCS8 define is a no-op. Until that vestigial define is |
| 198 | + * cleaned up, we cannot assert here without false-positive on the |
| 199 | + * SECURE_PKCS11 build. */ |
128 | 200 | #define NO_PKCS8 |
| 201 | + |
| 202 | +#if defined(WOLFSSL_CHECK_PRIVATE_KEY) |
| 203 | +# error "user_settings: NEEDS_* marker required; see docs/wolfssl-config.md" |
| 204 | +#endif |
129 | 205 | #define NO_CHECK_PRIVATE_KEY |
130 | 206 |
|
131 | 207 | /* BENCH_EMBEDDED is the default outside explicit test/benchmark mode. */ |
|
0 commit comments