Help: How to resolve a signing problem "due to certificateKind"

After upgrading Mac to El Capitan and Xcode to 7.2 code signing stopped working for me. When I try to validate or export an achive Xcode tells me that I do not have matching signing assets. I believe the relevant log message is this:

Disqualifying <DVTSigningCertificate: AC; name='iPhoneDevShyrokov (X)', hash='F', certificateKind='1.2.840.113635.100.6.1.2'> due to certificateKind (input 1.2.840.113635.100.6.1.4 doesn't match 1.2.840.113635.100.6.1.2)


I know what signing certificate should be matched to what provisioning profile, but the match fails. It tells me that my signing certificate has certificateKind 1.2.840.113635.100.6.1.2, while my provisioning profile has 1.2.840.113635.100.6.1.4. I tried regenerating my certificate, but it still had the same kind (ending with 2). Any suggestions how I can resolve this?


Thanks.

I get the same error anyword on how to fix this

I'm also getting this same issue since yesterday - when I try to export using my Developer ID, I get an error message saying that there has been a codesign error and offering to show the logs. The logs show the same message, but seem to relate to code-signing Autoupdate.app inside the Sparkle framework, which my app uses for updates when distributed outside the App Store:

2017-01-13 14:56:12 +0000  Disqualifying <DVTSigningCertificate: 0x7fdd64e0d600; name='Mac Developer: DevName', hash='HASH', serialNumber='SERIAL', certificateKind='1.2.840.113635.100.6.1.12, issueDate='2016-09-27 14:31:07 +0000''> due to certificateKind (input 1.2.840.113635.100.6.1.13 doesn't match 1.2.840.113635.100.6.1.12)

Has anyone figured out how to fix this yet?

Edit: Argh, I found the problem and it was something stupidly simple. A couple of days ago I changed my system clock to test a time-based feature, and although I'd change it back to show the right time, somehow it wasn't set to "Set date and time automatically". The clue was somewhere else in the error logs mentioning a time discrepancy. Once I changed the system clock back to automatic, I could archive and export again.

This issue can occur when an expired WWDR Intermediate certificate is present in both the System keychain and Login keychain - witnessed via Keychain Access.


To resolve, first delete the old, and then download and install the renewed certificate from Apple.


Using Keychain Access, select the System keychain. Select 'Show Expired Certificates' in the View menu and then delete the expired version(s) of the Apple Worldwide Developer Relations Certificate Authority Intermediate certificate. Install the new certificates and they should now appear as valid in Keychain Access and be available to Xcode.


Option-clean your project in Xcode (Product menu w/option key pressed, select 'clean build folder') and go again.

Help: How to resolve a signing problem "due to certificateKind"
 
 
Q