mcst-linux-kernel/patches-2024.06.26/links-2.15/0001-patch-https_c-from-Ope...

28 lines
836 B
Diff
Raw Permalink Normal View History

2024-07-09 13:51:45 +03:00
From d19e5d724bb777419d24ed85dda03fedf65c7f8a Mon Sep 17 00:00:00 2001
Date: Fri, 4 May 2018 19:12:12 +0300
Subject: [PATCH] patch-https_c from OpenBSD
---
https.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/https.c b/https.c
index caf3f7f..71f21d5 100644
--- a/https.c
+++ b/https.c
@@ -261,6 +261,11 @@ links_ssl *getSSL(void)
RAND_write_file(cast_const_char f_randfile);
}
}
+#elif defined(HAVE_RAND_FILE_NAME) && defined(HAVE_RAND_LOAD_FILE) && defined(HAVE_RAND_WRITE_FILE)
+ unsigned char f_randfile[PATH_MAX];
+ const unsigned char *f = (const unsigned char *)RAND_file_name(cast_char f_randfile, sizeof(f_randfile));
+ if (RAND_load_file(cast_const_char f_randfile, -1))
+ RAND_write_file(cast_const_char f_randfile);
#endif
#if defined(HAVE_RAND_ADD)
--
2.16.4