Function

SecCodeCopyPath(_:_:_:)

Retrieves the location on disk of signed code, given a code or static code object.

Declaration

func SecCodeCopyPath(_ staticCode: SecStaticCode, _ flags: SecCSFlags, _ path: UnsafeMutablePointer<CFURL?>) -> OSStatus

Parameters

staticCode

The code or static code object whose code you wish to locate. If you provide a code object, the function processes it in the same manner as the SecCodeCopyStaticCode(_:_:_:) function.

flags

Optional flags; see SecCSFlags for possible values. Pass defaultFlags for standard behavior.

path

On return, provides a URL identifying the location on disk of the code or static code object. For single files, the URL points to the file. For bundles, it points to the directory containing the entire bundle. Call the CFRelease function to release this object when you are finished with it.

Return Value

See Also

Working with Code Objects

func SecCodeCopyStaticCode(SecCode, SecCSFlags, UnsafeMutablePointer<SecStaticCode?>) -> OSStatus

Returns a static code object representing the on-disk version of the given running code.

Code Signing Architecture Flags

Use these supplemental flags to get static code.