You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: thirdparty/mbedtls/include/mbedtls/mbedtls_config.h
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1204,6 +1204,20 @@
1204
1204
* This is useful if your platform does not support
1205
1205
* standards like the /dev/urandom or Windows CryptoAPI.
1206
1206
*
1207
+
* If you enable this macro, you will probably need to enable
1208
+
* #MBEDTLS_ENTROPY_HARDWARE_ALT and provide a function
1209
+
* mbedtls_hardware_poll().
1210
+
*
1211
+
* \note The default platform entropy function supports the following
1212
+
* sources:
1213
+
* - getrandom() on Linux (if syscall() is available at compile time);
1214
+
* - getrandom() on FreeBSD and DragonFlyBSD (if available at compile
1215
+
* time);
1216
+
* - `sysctl(KERN_ARND)` on FreeBSD and NetBSD;
1217
+
* - #MBEDTLS_PLATFORM_DEV_RANDOM on Unix-like platforms
1218
+
* (unless one of the above is used);
1219
+
* - BCryptGenRandom() on Windows.
1220
+
*
1207
1221
* Uncomment this macro to disable the built-in platform entropy functions.
1208
1222
*/
1209
1223
//#define MBEDTLS_NO_PLATFORM_ENTROPY
@@ -4140,6 +4154,37 @@
4140
4154
//#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t //#define MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO int64_t /**< Default milliseconds time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled. It must be signed, and at least 64 bits. If it is changed from the default, MBEDTLS_PRINTF_MS_TIME must be updated to match.*/
4141
4155
//#define MBEDTLS_PRINTF_MS_TIME PRId64 /**< Default fmt for printf. That's avoid compiler warning if mbedtls_ms_time_t is redefined */
4142
4156
4157
+
/** \def MBEDTLS_PLATFORM_DEV_RANDOM
4158
+
*
4159
+
* Path to a special file that returns cryptographic-quality random bytes
4160
+
* when read. This is used by the default platform entropy source on
4161
+
* non-Windows platforms unless a dedicated system call is available
4162
+
* (see #MBEDTLS_NO_PLATFORM_ENTROPY).
4163
+
*
4164
+
* The default value is `/dev/random`, which is suitable on most platforms
4165
+
* other than Linux. On Linux, either `/dev/random` or `/dev/urandom`
4166
+
* may be the right choice, depending on the circumstances:
4167
+
*
4168
+
* - If possible, the library will use the getrandom() system call,
4169
+
* which is preferable, and #MBEDTLS_PLATFORM_DEV_RANDOM is not used.
4170
+
* - If there is a dedicated hardware entropy source (e.g. RDRAND on x86
4171
+
* processors), then both `/dev/random` and `/dev/urandom` are fine.
4172
+
* - `/dev/random` is always secure. However, with kernels older than 5.6,
4173
+
* `/dev/random` often blocks unnecessarily if there is no dedicated
4174
+
* hardware entropy source.
4175
+
* - `/dev/urandom` never blocks. However, it may return predictable data
4176
+
* if it is used early after the kernel boots, especially on embedded
4177
+
* devices without an interactive user.
4178
+
*
4179
+
* Thus you should change the value to `/dev/urandom` if your application
4180
+
* definitely won't be used on a device running Linux without a dedicated
4181
+
* entropy source early during or after boot.
4182
+
*
4183
+
* This is the default value of ::mbedtls_platform_dev_random, which
0 commit comments