Keychain Access error when creating new system certificate

certificateerrorhigh sierrakeychain

I am following the instructions to codesign gdb on my MBP however when I get to the end of the System certificate creation process, keychain says "Unknown Error = -2,147,414,007" and the certificate has not been created.

It creates a certificate fine for login location, but system fails.

What is the problem and how can I fix this?

Best Answer

I got the same error, so I went through the process but created the certificate in the login keychain. Once this is done you can drag the certificate into the System keychain through the UI.

You will need to unlock your System keychain first if it is showing as a locked padlock: just right-click and select 'Unlock keychain "System"'.

You have to enter your password several times but eventually it works, and the corresponding codesign command works:

codesign -fs your-cert-name $(which gdb)