Fix SSL CA cert issue on CentOS
Fix "Problem with the SSL CA cert" issue @ https://github.com/google/edash-packager/issues/6. On Ubuntu, CURL_CA_BUNDLE is located at "/etc/ssl/certs/ca-certificates.crt" while on CentOs, it is located at "/etc/ssl/certs/ca-bundle.crt". With this change, GYP scans the common appearing locations for SSL CA cert. Change-Id: I838bae3954ec51f1430c900d1e82596d45a4db84
This commit is contained in:
parent
f66ebe82bb
commit
70d055c16c
|
@ -2,7 +2,7 @@
|
|||
/* lib/curl_config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Location of default ca bundle */
|
||||
#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
|
||||
/* CURL_CA_BUNDLE is defined by GYP */
|
||||
|
||||
/* Location of default ca path */
|
||||
/* #undef CURL_CA_PATH */
|
||||
|
|
|
@ -5,6 +5,23 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Scan ca bundle in its common appearing locations.
|
||||
'curl_ca_bundle%':
|
||||
'<!(for path in /etc/pki/tls/certs/ca-bundle.crt \
|
||||
/etc/ssl/cert.pem \
|
||||
/etc/ssl/certs/ca-bundle.crt \
|
||||
/etc/ssl/certs/ca-certificates.crt \
|
||||
/usr/local/share/certs/ca-root.crt \
|
||||
/usr/share/ssl/certs/ca-bundle.crt; do \
|
||||
if test -f "$path"; then ca="$path"; break; fi; \
|
||||
done; \
|
||||
if [ -z "$ca" ]; then \
|
||||
echo "Failed to locate SSL CA cert."; exit 1; \
|
||||
else \
|
||||
echo "$ca"; \
|
||||
fi)',
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'curl_config',
|
||||
|
@ -18,6 +35,7 @@
|
|||
'USE_IPV6',
|
||||
'USE_OPENSSL'
|
||||
'USE_SSLEAY',
|
||||
'CURL_CA_BUNDLE="<(curl_ca_bundle)"',
|
||||
],
|
||||
'include_dirs': [
|
||||
'config',
|
||||
|
|
Loading…
Reference in New Issue