31 lines
888 B
Diff
31 lines
888 B
Diff
diff --git a/crypto/o_init.c b/crypto/o_init.c
|
|
index b1eef43..4fbb0e5 100644
|
|
--- a/crypto/o_init.c
|
|
+++ b/crypto/o_init.c
|
|
@@ -7,7 +7,7 @@
|
|
* https://www.openssl.org/source/license.html
|
|
*/
|
|
|
|
-/* for secure_getenv */
|
|
+/* for ossl_safe_getenv */
|
|
#define _GNU_SOURCE
|
|
#include "e_os.h"
|
|
#include <openssl/err.h>
|
|
@@ -21,6 +21,7 @@
|
|
# include <openssl/rand.h>
|
|
# include <openssl/fips.h>
|
|
# include "crypto/fips.h"
|
|
+# include "internal/cryptlib.h"
|
|
|
|
# define FIPS_MODE_SWITCH_FILE "/proc/sys/crypto/fips_enabled"
|
|
|
|
@@ -29,7 +30,7 @@ static void init_fips_mode(void)
|
|
char buf[2] = "0";
|
|
int fd;
|
|
|
|
- if (secure_getenv("OPENSSL_FORCE_FIPS_MODE") != NULL) {
|
|
+ if (ossl_safe_getenv("OPENSSL_FORCE_FIPS_MODE") != NULL) {
|
|
buf[0] = '1';
|
|
} else if ((fd = open(FIPS_MODE_SWITCH_FILE, O_RDONLY)) >= 0) {
|
|
while (read(fd, buf, sizeof(buf)) < 0 && errno == EINTR) ;
|