raven/base/openssl3/fix-secure_getenv-for-el6.patch

25 lines
1015 B
Diff

diff -Naur a/crypto/context.c b/crypto/context.c
--- a/crypto/context.c 2024-09-12 19:27:39.449406468 +0600
+++ b/crypto/context.c 2024-09-12 20:22:10.744168697 +0600
@@ -32,7 +32,7 @@
char buf[2] = "0";
int fd;
- if (secure_getenv("OPENSSL_FORCE_FIPS_MODE") != NULL) {
+ if (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) ;
diff -Naur a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
--- a/ssl/ssl_ciph.c 2024-09-12 19:27:39.360407052 +0600
+++ b/ssl/ssl_ciph.c 2024-09-12 20:21:32.369419982 +0600
@@ -1467,7 +1467,7 @@
const char *ciphers_path;
unsigned len, slen;
- if ((ciphers_path = secure_getenv("OPENSSL_SYSTEM_CIPHERS_OVERRIDE")) == NULL)
+ if ((ciphers_path = getenv("OPENSSL_SYSTEM_CIPHERS_OVERRIDE")) == NULL)
ciphers_path = SYSTEM_CIPHERS_FILE;
fp = fopen(ciphers_path, "r");
if (fp == NULL || fgets(buf, sizeof(buf), fp) == NULL) {