From c503bb572eee1a166ce5e631785b7d24e6319605 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 5 Jul 2018 10:47:49 +0200 Subject: crytpo: Make sure we check return of ssh_get_random() correctly Signed-off-by: Andreas Schneider --- src/libcrypto.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/libcrypto.c') diff --git a/src/libcrypto.c b/src/libcrypto.c index bde706b8..46570294 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -78,6 +78,19 @@ void ssh_reseed(void){ #endif } +/** + * @brief Get random bytes + * + * Make sure to always check the return code of this function! + * + * @param[in] where The buffer to fill with random bytes + * + * @param[in] len The size of the buffer to fill. + * + * @param[in] strong Use a strong or private RNG source. + * + * @return 1 on success, 0 on error. + */ int ssh_get_random(void *where, int len, int strong) { (void)strong; -- cgit v1.2.3