Recently Apple posted an announcement, according to this the intermediate certificate got expired on Feb 14th and has to be downloaded manually and should replace the older expi
https://discussions.apple.com/thread/7357200?start=0&tstart=0
As you can see in the above link, some keys cannot be deleted while the OS is running in full mode, and you need to boot in recovery mode.
The error message says "Operation not permitted". So you don't have the necessary access right. To solve this click on the lock in the upper left corner of the keychain and enter your password.
After you entered your credentials you should be able to delete the old certificate.
I was able to delete the certificate by first viewing the expired certificate
in system keychain and then deleting them. Then rechecking if the certificate was deleted from the certificate keychain as well. Then downloading new certificate and installing them. This might help you.
I figured out how to resolve this issue.
First, I enabled the root user in my system
OS X Lion (10.7) and later
- From the Apple menu choose System Preferences.
- From the View menu choose Users & Groups.
- Click the lock and authenticate as an administrator account.
- Click Login Options.
- Click the "Edit" or "Join" button at the bottom right.
- Click the "Open Directory Utility" button.
- Click the lock in the Directory Utility window.
- Enter an administrator account name and password, then click OK.
- Choose Enable Root User from the Edit menu.
- Enter the root password you wish to use in both the Password and Verify fields, then click OK.
In the terminal, I logged in as root user
- Open Terminal
- Type
su
and then press Enter- Enter the password you just set for the root user above. This will log you in as the root user
- Type
cd /Library
and then press Enter- Type
chmod 777 Keychains/
. This will change folder permissions for the Keychains folder- Now open the
Keychain Access
App and delete theApple Worldwide Developer Relations Certification Authority
certificate from theSystem
keychain- Import the renewed Intermediate certificate in your
login
keychain- Close the Keychain Access app
Although, the certificate which you just deleted will appear again in the System keychain but all your other Developer and Distribution certificates will become valid again.
Make sure you set back the Keychains folder permission back to 755
chmod 755 Keychains/