# On Debian like systems the output of openssl version -d is /usr/lib/ssl,
# where are symlinks in it to the correct directories in /etc/ssl.
# But glusterfs hardcodes the certificate files to be placed directly in
# /usr/lib/ssl, without the correct subdirectories. So that it is possible
# again to store the certificate data in /etc/ssl/ we hardcode the path now.
# A better solution would be to configure the paths in the volfiles, but that
# is not possible, yet.
# Closes: #1056193

diff -Naur glusterfs-11.1.orig/configure glusterfs-11.1/configure
--- glusterfs-11.1.orig/configure	2023-11-06 16:24:29.990040453 +0100
+++ glusterfs-11.1/configure	2023-12-12 11:59:03.930931968 +0100
@@ -14553,7 +14553,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL trusted certificates path" >&5
 $as_echo_n "checking for OpenSSL trusted certificates path... " >&6; }
-SSL_CERT_PATH=$(openssl version -d | sed -e 's|OPENSSLDIR: "\(.*\)".*|\1|')
+SSL_CERT_PATH=/etc/ssl
 if test -d "${SSL_CERT_PATH}" 1>/dev/null 2>&1; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSL_CERT_PATH" >&5
 $as_echo "$SSL_CERT_PATH" >&6; }
diff -Naur glusterfs-11.1.orig/configure.ac glusterfs-11.1/configure.ac
--- glusterfs-11.1.orig/configure.ac	2023-11-06 16:24:25.401026631 +0100
+++ glusterfs-11.1/configure.ac	2023-12-12 11:59:20.278889134 +0100
@@ -803,7 +803,7 @@
 
 dnl Find out OpenSSL trusted certificates path
 AC_MSG_CHECKING([for OpenSSL trusted certificates path])
-SSL_CERT_PATH=$(openssl version -d | sed -e 's|OPENSSLDIR: "\(.*\)".*|\1|')
+SSL_CERT_PATH=/etc/ssl
 if test -d "${SSL_CERT_PATH}" 1>/dev/null 2>&1; then
    AC_MSG_RESULT([$SSL_CERT_PATH])
    AC_DEFINE_UNQUOTED(SSL_CERT_PATH, ["$SSL_CERT_PATH"], [Path to OpenSSL trusted certificates.])
