I met this error as well and found a solution online which solved it.
****The key issue here is the root certificate. ****
Delete all root certificate ("Apple Worldwide Developer Relations Certification Authority") from your Keychain Access. Click certificates and delete it from both LOGIN & SYSTEM (If both area have this certificate)
Then download the latest cert through link below, and double click to add to keychain
https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
Make sure it is in your Keychain's SYSTEM and you ONLY have ONE root certificate in your Keychain's SYSTEM area, NOT in LOGIN area.