Code Signing Services Result Codes

Recognize result codes specific to the code signing services API.

Overview

In macOS, you can use the SecCopyErrorMessageString function to obtain a human readable string corresponding to these status codes.

The functions of the Code Signing Services API may also return the general codes listed in Security Framework Result Codes. In particular, you might expect to encounter errSecSuccess, errSecUnimplemented, errSecParam, and errSecAllocate.

Topics

Constants

errSecCSAmbiguousBundleFormat

The bundle could be an app or a framework.

errSecCSBadBundleFormat

The bundle format is unrecognized, invalid, or unsuitable.

errSecCSBadCallbackValue

The monitor callback returned invalid value.

errSecCSBadDictionaryFormat

A required information property list (Info.plist) file or resource is malformed.

errSecCSBadDiskImageFormat

The disk image format unrecognized, invalid, or unsuitable.

errSecCSBadFrameworkVersion

The embedded framework contains a modified or invalid version.

errSecCSBadLVArch

The library validation flag cannot be used with an i386 binary.

errSecCSBadMainExecutable

The main executable failed strict validation.

errSecCSBadNestedCode

The nested code is modified or invalid.

errSecCSBadObjectFormat

The object file format invalid or unsuitable.

errSecCSBadResource

A sealed resource is missing or invalid.

errSecCSCMSTooLarge

The signature is too large to embed.

errSecCSCancelled

The operation was terminated by explicit cancellation.

errSecCSDBAccess

Cannot access signature database.

errSecCSDBDenied

Access to signature database denied.

errSecCSDSStoreSymlink

A .DS_Store file can't be a symlink.

errSecCSDbCorrupt

A system database or file is corrupt.

errSecCSFileHardQuarantined

File open or execution not allowed.

errSecCSGuestInvalid

The identity of guest code has been invalidated.

errSecCSHelperFailed

The codesign_allocate helper tool can't be found or used.

errSecCSHostProtocolContradiction

Host protocol violation: contradictory hosting modes.

errSecCSHostProtocolDedicationError

Host protocol violation: operation not allowed with or for a dedicated guest.

errSecCSHostProtocolInvalidAttribute

Code signing host returned invalid or inconsistent attributes for guest code.

errSecCSHostProtocolInvalidHash

Host protocol violation: invalid hash of guest code.

errSecCSHostProtocolNotProxy

Host protocol violation: proxy hosting not engaged.

errSecCSHostProtocolRelativePath

Host protocol violation: absolute guest path required.

errSecCSHostProtocolStateError

Host protocol violation: invalid guest state change request.

errSecCSHostProtocolUnrelated

Host protocol violation: the specified code is not a guest of the specified code signing host.

errSecCSHostReject

Code rejected its host.

errSecCSInfoPlistFailed

The Info.plist file or the signature has been modified.

errSecCSInternalError

Internal error in Code Signing Services subsystem.

errSecCSInvalidAttributeValues

An attribute value associated with a key is out of range or is the wrong type.

errSecCSInvalidFlags

Invalid or inappropriate API flags specified.

errSecCSInvalidObjectRef

Invalid API object reference.

errSecCSInvalidPlatform

Invalid platform identifier or platform mismatch.

errSecCSInvalidSymlink

Invalid destination for symbolic link in bundle.

errSecCSMultipleGuests

Code signing host has more than one block of guest code with this attribute value.

errSecCSNoMainExecutable

The code has no main executable file.

errSecCSNoMatches

No matches were found for a search or update operation.

errSecCSNoSuchCode

Code signing host has no guest code with the requested attributes.

errSecCSNotAHost

This code is not a code signing host.

errSecCSNotAppLike

The code is valid but does not seem to be an app.

errSecCSNotSupported

Operation not supported for this type of code.

errSecCSObjectRequired

A required pointer argument was NULL.

errSecCSOutdated

The presented data is out of date.

errSecCSRegularFile

The main executable or Info.plist must be a regular file (and not, for example, a symbolic link).

errSecCSReqFailed

The code failed to satisfy one of the code requirements.

errSecCSReqInvalid

Invalid or corrupted code requirements.

errSecCSReqUnsupported

Unsupported type or version of code requirements.

errSecCSResourceDirectoryFailed

A directory or its signature has been modified and is therefore invalid.

errSecCSResourceNotSupported

Found an unsupported resource.

errSecCSResourceRulesInvalid

Invalid resource selection rule or rules.

errSecCSResourcesInvalid

The sealed resource directory is invalid.

errSecCSResourcesNotFound

Cannot find sealed resources in code.

errSecCSResourcesNotSealed

Resources are not sealed by the signature.

errSecCSSigDBAccess

Can't access signature database.

errSecCSSigDBDenied

Access to signature database denied.

errSecCSSignatureFailed

Code or signature modified.

errSecCSSignatureInvalid

Invalid format for signature.

errSecCSSignatureNotVerifiable

Signature cannot be read.

errSecCSSignatureUnsupported

Unsupported type or version of signature.

errSecCSStaticCodeChanged

The code on disk has been modified after the code started running.

errSecCSStaticCodeNotFound

Cannot find code object on disk.

errSecCSTooBig

The code is too big for current signing format.

errSecCSUnimplemented

Unimplemented code signing feature.

errSecCSUnsealedAppRoot

Unsealed contents present in the bundle root.

errSecCSUnsealedFrameworkRoot

Unsealed contents present in the root directory of an embedded framework.

errSecCSUnsigned

Code object is not signed.

errSecCSUnsignedNestedCode

Nested code is unsigned.

errSecCSUnsupportedDigestAlgorithm

The signature digest algorithm(s) specified are not supported.

errSecCSUnsupportedGuestAttributes

Cannot locate guest code using this attribute set.

errSecCSWeakResourceEnvelope

The resource envelope is obsolete (version 1 signature).

errSecCSWeakResourceRules

The resource envelope is obsolete (custom omit rules).

errSecCSBadTeamIdentifier

A Team Identifier is wrong or inappropriate.

errSecCSInvalidAssociatedFileData

Resource fork, Finder information, or similar detritus not allowed.

errSecCSInvalidTeamIdentifier

A Team Identifier string is invalid.

errSecCSSignatureUntrusted

The signature is valid but signer isn’t trusted.

errSecMultipleExecSegments

The image contains multiple executable segments.

errSecCSInvalidEntitlements

Encountered an invalid entitlement plist.

errSecCSInvalidRuntimeVersion

An invalid runtime version was explicity set.

See Also

Result Codes

User Info Dictionary Error Keys

Recognize the keys of the user info dictionary provided by functions that return error objects.