Skip to content

Commit 17b3808

Browse files
committed
cert fix for macOS build on Github runners
1 parent 1bb18dc commit 17b3808

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

laps-client/laps_client/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@
99

1010

1111

12+
import os, sys
1213
import getpass
1314

1415

16+
if 'darwin' in sys.platform.lower():
17+
# set OpenSSL path to macOS defaults
18+
# (Github Runner sets this to /usr/local/etc/openssl@1.1/ which does not exist in plain macOS installations)
19+
os.environ['SSL_CERT_FILE'] = '/private/etc/ssl/cert.pem'
20+
os.environ['SSL_CERT_DIR'] = '/private/etc/ssl/certs'
21+
# system CA certs debugging
22+
#import ssl; print(ssl.get_default_verify_paths())
23+
#ctx = ssl.SSLContext(); ctx.load_default_certs(); print(ctx.get_ca_certs())
24+
1525
def proposeUsername(domain):
1626
return getpass.getuser() + ('@'+domain if domain else '')
1727

0 commit comments

Comments
 (0)