File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1150,14 +1150,27 @@ build_package_openssl() {
1150
1150
local pem_file=" $OPENSSLDIR /cert.pem"
1151
1151
security find-certificate -a -p /Library/Keychains/System.keychain > " $pem_file "
1152
1152
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> " $pem_file "
1153
- else
1153
+ elif [ -e /etc/pki/tls/cert.pem ]; then # RedHat
1154
+ # See https://github.com/rubygems/rubygems/issues/2415#issuecomment-509806259
1155
+ rm -rf " $OPENSSLDIR /certs" " $pem_file "
1156
+ ln -s /etc/pki/tls/certs " $OPENSSLDIR "
1157
+ ln -s /etc/pki/tls/cert.pem " $pem_file "
1158
+ elif [ -e /etc/ssl/certs/ca-certificates.crt ]; then # Debian
1159
+ # See https://github.com/rubygems/rubygems/issues/2415#issuecomment-509806259
1160
+ rm -rf " $OPENSSLDIR /certs" " $pem_file "
1161
+ ln -s /etc/ssl/certs " $OPENSSLDIR "
1162
+ ln -s /etc/ssl/certs/ca-certificates.crt " $pem_file "
1163
+ elif type openssl & > /dev/null; then
1154
1164
# symlink to the system openssl certs
1155
1165
local SYSTEM_OPENSSLDIR
1156
1166
SYSTEM_OPENSSLDIR=$( openssl version -d | sed -e ' s/.*: "//' -e ' s/"$//' || true)
1157
1167
if [ -n " $SYSTEM_OPENSSLDIR " ]; then
1158
1168
ln -sf " $SYSTEM_OPENSSLDIR /cert.pem" " $OPENSSLDIR /cert.pem"
1159
1169
ln -snf " $SYSTEM_OPENSSLDIR /certs" " $OPENSSLDIR /certs"
1160
1170
fi
1171
+ else
1172
+ echo " Could not find OpenSSL certificates" >&2
1173
+ exit 1
1161
1174
fi
1162
1175
}
1163
1176
You can’t perform that action at this time.
0 commit comments