This was a really a helpful thread, I followed the same steps as @junjie mentioned but for me something weird happened, the below are the steps I did.
- Went to developer portal and revoked the certificate which was about to expire.
- Went to XCode6.4 and in the Account settings, the certificate still showed valid, I went crazy.
- Then I opened XCode7, there the certificate was shown with "Reset" button instead of create and I hit the reset button and later in the portal I was able to see an extended certificate present. This is what Apple says about Reset button
If Xcode detects an issue with a signing identity, it displays an
appropriate action in Accounts preferences. If Xcode displays a Create
button, the signing identity doesn’t exist in Member Center or on your
Mac. If Xcode displays a Reset button, the signing identity is not
usable on your Mac—for example, it is missing the private key. If you
click the Reset button, Xcode revokes and requests the corresponding
certificate.
- I tried creating an Appstore ipa with that, just to test and it worked fine so I am saved, but still not sure what has happened. May be I had multiple accounts configured in my Mac, dont know.