From 0f36e7bfa39b3e888be86e0d653513ce7eb7e2fb Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 13 Aug 2019 11:06:51 +0100 Subject: [PATCH] Explain why RNG ctx parameter is kept in MBEDTLS_SSL_CONF_RNG --- include/mbedtls/config.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 69601de6a..930f7c740 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -3670,6 +3670,9 @@ * int f_rng(void *, unsigned char *, size_t), * which ignores its first parameter (the stack will always * pass NULL to this function). + * NB: The reason not to drop the context parameter entirely + * is for compatibility with the Crypto and X.509 libraries + * which use RNG callbacks including context parameters. */ //#define MBEDTLS_SSL_CONF_RNG rng_wrap