Honor SSL_CERT_FILE environment vartiable

This commit is contained in:
Richard Frith-Macdonald 2022-10-20 10:24:42 +01:00
parent 0ca9110ef5
commit 09a9a8fe5b
3 changed files with 16 additions and 2 deletions

View file

@ -225,8 +225,13 @@ static NSMutableDictionary *fileMap = nil;
{
/* Let the GS_TLS_CA_FILE environment variable override the
* default certificate authority location.
* Failing that, use the same environment variable as OpenSSL
*/
str = [env objectForKey: @"GS_TLS_CA_FILE"];
if (nil == str)
{
str = [env objectForKey: @"SSL_CERT_FILE"];
}
if (nil == str)
{
str = [bundle pathForResource: @"ca-certificates"