I fixed the problem by:
Exporting from Keychain all my Apple Developer certificates to a .p12 file.
Deleting all my Apple Developer certificates.
Double-clicking the exported certificates file to re-import the certificates to the keychain.
After that, it magically started working again.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags: