I was running into net/http: TLS handshake timeout
issues with some golang programs on macOS.
Asked
Active
Viewed 2,057 times
1 Answers
0
Turns out in my case it was due to a crazy number of certificates in my system keychain that the system was parsing.
security dump-keychain /Library/Keychains/System.keychain | grep "\"alis\"" | wc -l
should give you a number < 20 in most cases, and in mine it was > 10000. Deleting these excess certificates was a bit of a pain, but assuming they all have the same name I managed to do it using a script like this:
security find-certificate -c "<CERTNAME>" -a -Z /Library/Keychains/System.keychain | \
sudo awk '/SHA-1/{system("security delete-certificate -Z "$NF)}'
where <CERTNAME>
is replaced with the actual certificate name.

dmaclach
- 3,403
- 1
- 21
- 23