简体   繁体   中英

CSSMERR_TP_NOT_TRUSTED: WWDR certificate - this certificate was signed by an unknown authority

Getting the CSSMERR_TP_NOT_TRUSTED error when trying to build my project for iOS device (but simulator works fine). I have tried the System Default fix to no avail and am now trying the suggestion to add the WWDR certificate.

CSSMERR_TP_NOT_TRUSTED error log:

CodeSign /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app
        cd /Users/soroushhakami/dev/pplatsIos
        setenv CODESIGN_ALLOCATE /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
        setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /usr/bin/codesign --force --sign 1934d5614330256a833582b123621542bdd8dcfe --resource-rules=/Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app/ResourceRules.plist --entitlements /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Intermediates/pplats.build/Debug-iphoneos/pplats.build/pplats.xcent /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app

    /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app: replacing existing signature/Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app: CSSMERR_TP_NOT_TRUSTEDCommand /usr/bin/codesign failed with exit code 1

Last line of the errormessage incase you dont want to read it all : CSSMERR_TP_NOT_TRUSTEDCommand /usr/bin/codesign failed with exit code 1

All my certificates have the " this certificate was signed by an unknown authority " error. But the WWDR certificate itself bas the unknown authority error, leaving me clueless on how to solve this.

I did remove all my certificates, install the WWDR on a clean keychain but the error still persists. Any ideas?

You probably have an expired Apple Worldwide Developer Relations Certification Authority in your Keychain Access. If that so, you need to remove all expired copies from your system and install the renewed certificate in your System keychain.

  1. In Terminal, security find-identity -p codesigning
    • Take a copy of the output (especially expired certificates) for comparison later
  2. Download the newest AppleWWDRCA.cer certificate from https://developer.apple.com/support/certificates/expiration/
  3. Open Keychain Access
  4. View | Show Expired Certificates
  5. Check login Keychain
    • delete any expired Apple Wordwide Developer Relations Certificate Authority
  6. Check System Keychain
    • delete any expired Apple Wordwide Developer Relations Certificate Authority
  7. Whilst System Keychain is selected
    • File | Import Items ...
    • Select downloaded AppleDDRCA.cer
  8. In Terminal, rerun security find-identity -p codesigning
    • Compare the results with step 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM