2 * Copyright (c) 2006-2014 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
26 SecCode represents separately indentified running code in the system.
27 In addition to UNIX processes, this can also include (with suitable support)
28 scripts, applets, widgets, etc.
33 #include <Security/CSCommon.h>
34 #include <CoreFoundation/CFBase.h>
41 CF_ASSUME_NONNULL_BEGIN
44 @function SecCodeGetTypeID
45 Returns the type identifier of all SecCode instances.
47 CFTypeID
SecCodeGetTypeID(void);
51 @function SecCodeCopySelf
52 Obtains a SecCode object for the code making the call.
53 The calling code is determined in a way that is subject to modification over
54 time, but obeys the following rules. If it is a UNIX process, its process id (pid)
57 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
58 @param self Upon successful return, contains a SecCodeRef representing the caller.
60 @result Upon success, errSecSuccess. Upon error, an OSStatus value documented in
61 CSCommon.h or certain other Security framework headers.
63 OSStatus
SecCodeCopySelf(SecCSFlags flags
, SecCodeRef
* __nonnull CF_RETURNS_RETAINED self
);
67 @function SecCodeCopyStaticCode
68 Given a SecCode object, locate its origin in the file system and return
69 a SecStaticCode object representing it.
71 The link established by this call is generally reliable but is NOT guaranteed
74 Many API functions taking SecStaticCodeRef arguments will also directly
75 accept a SecCodeRef and apply this translation implicitly, operating on
76 its result or returning its error code if any. Each of these functions
77 calls out that behavior in its documentation.
79 If the code was obtained from a universal (aka "fat") program file,
80 the resulting SecStaticCodeRef will refer only to the architecture actually
81 being used. This means that multiple running codes started from the same file
82 may conceivably result in different static code references if they ended up
83 using different execution architectures. (This is unusual but possible.)
85 @param code A valid SecCode object reference representing code running
88 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
89 @constant kSecCSUseAllArchitectures
90 If code refers to a single architecture of a universal binary, return a SecStaticCodeRef
91 that refers to the entire universal code with all its architectures. By default, the
92 returned static reference identifies only the actual architecture of the running program.
94 @param staticCode On successful return, a SecStaticCode object reference representing
95 the file system origin of the given SecCode. On error, unchanged.
96 @result Upon success, errSecSuccess. Upon error, an OSStatus value documented in
97 CSCommon.h or certain other Security framework headers.
100 kSecCSUseAllArchitectures
= 1 << 0,
103 OSStatus
SecCodeCopyStaticCode(SecCodeRef code
, SecCSFlags flags
, SecStaticCodeRef
* __nonnull CF_RETURNS_RETAINED staticCode
);
107 @function SecCodeCopyHost
108 Given a SecCode object, identify the (different) SecCode object that acts
109 as its host. A SecCode's host acts as a supervisor and controller,
110 and is the ultimate authority on the its dynamic validity and status.
111 The host relationship is securely established (absent reported errors).
113 @param guest A valid SecCode object reference representing code running
115 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
116 @param host On successful return, a SecCode object reference identifying
118 @result Upon success, errSecSuccess. Upon error, an OSStatus value documented in
119 CSCommon.h or certain other Security framework headers.
121 OSStatus
SecCodeCopyHost(SecCodeRef guest
, SecCSFlags flags
, SecCodeRef
* __nonnull CF_RETURNS_RETAINED host
);
123 extern const CFStringRef kSecGuestAttributeCanonical
;
124 extern const CFStringRef kSecGuestAttributeHash
;
125 extern const CFStringRef kSecGuestAttributeMachPort
;
126 extern const CFStringRef kSecGuestAttributePid
;
127 extern const CFStringRef kSecGuestAttributeAudit
;
128 extern const CFStringRef kSecGuestAttributeDynamicCode
;
129 extern const CFStringRef kSecGuestAttributeDynamicCodeInfoPlist
;
130 extern const CFStringRef kSecGuestAttributeArchitecture
;
131 extern const CFStringRef kSecGuestAttributeSubarchitecture
;
135 @function SecCodeCopyGuestWithAttributes
136 This is the omnibus API function for obtaining dynamic code references.
137 In general, it asks a particular code acting as a code host to locate
138 and return a guest with given attributes. Different hosts support
139 different combinations of attributes and values for guest selection.
141 Asking the NULL host invokes system default procedures for obtaining
142 any running code in the system with the attributes given. The returned
143 code may be anywhere in the system.
145 The methods a host uses to identify, separate, and control its guests
146 are specific to each type of host. This call provides a generic abstraction layer
147 that allows uniform interrogation of all hosts. A SecCode that does not
148 act as a host will always return errSecCSNoSuchCode. A SecCode that does
149 support hosting may return itself to signify that the attribute refers to
150 itself rather than one of its hosts.
152 @param host A valid SecCode object reference representing code running
153 on the system that acts as a Code Signing host. As a special case, passing
154 NULL indicates that the Code Signing root of trust should be used as a starting
155 point. Currently, that is the system kernel.
156 @param attributes A CFDictionary containing zero or more attribute selector
157 values. Each selector has a CFString key and associated CFTypeRef value.
158 The key name identifies the attribute being specified; the associated value,
159 whose type depends on the the key name, selects a particular value or other
160 constraint on that attribute. Each host only supports particular combinations
161 of keys and values, and errors will be returned if any unsupported set is requested.
162 As a special case, NULL is taken to mean an empty attribute set.
163 Note that some hosts that support hosting chains (guests being hosts)
164 may return sub-guests in this call. In other words, do not assume that
165 a SecCodeRef returned by this call is a direct guest of the queried host
166 (though it will be a proximate guest, i.e. a guest's guest some way down).
167 Asking the NULL host for NULL attributes returns a code reference for the system root
168 of trust (at present, the running Darwin kernel).
169 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
170 @param guest On successful return, a SecCode object reference identifying
171 the particular guest of the host that owns the attribute value(s) specified.
172 This argument will not be changed if the call fails (does not return errSecSuccess).
173 @result Upon success, errSecSuccess. Upon error, an OSStatus value documented in
174 CSCommon.h or certain other Security framework headers. In particular:
175 @error errSecCSUnsupportedGuestAttributes The host does not support the attribute
176 type given by attributeType.
177 @error errSecCSInvalidAttributeValues The type of value given for a guest
178 attribute is not supported by the host.
179 @error errSecCSNoSuchCode The host has no guest with the attribute value given
180 by attributeValue, even though the value is of a supported type. This may also
181 be returned if the host code does not currently act as a Code Signing host.
182 @error errSecCSNotAHost The specified host cannot, in fact, act as a code
183 host. (It is missing the kSecCodeSignatureHost option flag in its code
185 @error errSecCSMultipleGuests The attributes specified do not uniquely identify
186 a guest (the specification is ambiguous).
189 OSStatus
SecCodeCopyGuestWithAttributes(SecCodeRef __nullable host
,
190 CFDictionaryRef __nullable attributes
, SecCSFlags flags
, SecCodeRef
* __nonnull CF_RETURNS_RETAINED guest
);
193 @function SecCodeCreateWithXPCMessage
194 Creates a SecCode reference to the process that sent the provided XPC message, using the
195 associated audit token.
197 @param message The xpc_object_t of a message recieved via xpc to look up the audit token
198 of the process that sent the message.
199 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
200 @param processRef On successful return, a SecCode object reference identifying
201 the particular guest of the process from the audit token. This argument will not be
202 changed if the call fails (does not return errSecSuccess).
203 @result Upon success, errSecSuccess. Upon error, an OSStatus value documented in
204 CSCommon.h or certain other Security framework headers. In particular:
205 @error errSecCSInvalidObjectRef The xpc_object_t was not of type XPC_TYPE_DICTIONARY.
206 @error errSecCSInvalidObjectRef The xpc_object_t was not an xpc message with an associated
208 For a complete list of errors, please see {@link SecCodeCopyGuestWithAttributes}.
210 OSStatus
SecCodeCreateWithXPCMessage(xpc_object_t message
, SecCSFlags flags
,
211 SecCodeRef
* __nonnull CF_RETURNS_RETAINED target
);
213 #endif // TARGET_OS_OSX
217 @function SecCodeCheckValidity
218 Performs dynamic validation of the given SecCode object. The call obtains and
219 verifies the signature on the code object. It checks the validity of only those
220 sealed components required to establish identity. It checks the SecCode's
221 dynamic validity status as reported by its host. It ensures that the SecCode's
222 host is in turn valid. Finally, it validates the code against a SecRequirement
223 if one is given. The call succeeds if all these conditions are satisfactory.
226 This call is secure against attempts to modify the file system source of the
229 @param code The code object to be validated.
230 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
231 @param requirement An optional code requirement specifying additional conditions
232 the code object must satisfy to be considered valid. If NULL, no additional
233 requirements are imposed.
234 @result If validation passes, errSecSuccess. If validation fails, an OSStatus value
235 documented in CSCommon.h or certain other Security framework headers.
237 OSStatus
SecCodeCheckValidity(SecCodeRef code
, SecCSFlags flags
,
238 SecRequirementRef __nullable requirement
);
241 @function SecCodeCheckValidityWithErrors
242 Performs dynamic validation of the given SecCode object. The call obtains and
243 verifies the signature on the code object. It checks the validity of only those
244 sealed components required to establish identity. It checks the SecCode's
245 dynamic validity status as reported by its host. It ensures that the SecCode's
246 host is in turn valid. Finally, it validates the code against a SecRequirement
247 if one is given. The call succeeds if all these conditions are satisfactory.
250 This call is secure against attempts to modify the file system source of the
253 @param code The code object to be validated.
254 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
255 @param requirement An optional code requirement specifying additional conditions
256 the code object must satisfy to be considered valid. If NULL, no additional
257 requirements are imposed.
258 @param errors An optional pointer to a CFErrorRef variable. If the call fails
259 (and something other than errSecSuccess is returned), and this argument is non-NULL,
260 a CFErrorRef is stored there further describing the nature and circumstances
261 of the failure. The caller must CFRelease() this error object when done with it.
262 @result If validation passes, errSecSuccess. If validation fails, an OSStatus value
263 documented in CSCommon.h or certain other Security framework headers.
265 OSStatus
SecCodeCheckValidityWithErrors(SecCodeRef code
, SecCSFlags flags
,
266 SecRequirementRef __nullable requirement
, CFErrorRef
*errors
);
270 @function SecCodeCopyPath
271 For a given Code or StaticCode object, returns a URL to a location on disk where the
272 code object can be found. For single files, the URL points to that file.
273 For bundles, it points to the directory containing the entire bundle.
275 @param staticCode The Code or StaticCode object to be located. For a Code
276 argument, its StaticCode is processed as per SecCodeCopyStaticCode.
277 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
278 @param path On successful return, contains a CFURL identifying the location
279 on disk of the staticCode object.
280 @result On success, errSecSuccess. On error, an OSStatus value
281 documented in CSCommon.h or certain other Security framework headers.
283 OSStatus
SecCodeCopyPath(SecStaticCodeRef staticCode
, SecCSFlags flags
,
284 CFURLRef
* __nonnull CF_RETURNS_RETAINED path
);
288 @function SecCodeCopyDesignatedRequirement
289 For a given Code or StaticCode object, determines its Designated Code Requirement.
290 The Designated Requirement is the SecRequirement that the code believes
291 should be used to properly identify it in the future.
293 If the SecCode contains an explicit Designated Requirement, a copy of that
294 is returned. If it does not, a SecRequirement is implicitly constructed from
295 its signing authority and its embedded unique identifier. No Designated
296 Requirement can be obtained from code that is unsigned. Code that is modified
297 after signature, improperly signed, or has become invalid, may or may not yield
298 a Designated Requirement. This call does not validate the SecStaticCode argument.
300 @param code The Code or StaticCode object to be interrogated. For a Code
301 argument, its StaticCode is processed as per SecCodeCopyStaticCode.
302 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
303 @param requirement On successful return, contains a copy of a SecRequirement
304 object representing the code's Designated Requirement. On error, unchanged.
305 @result On success, errSecSuccess. On error, an OSStatus value
306 documented in CSCommon.h or certain other Security framework headers.
308 OSStatus
SecCodeCopyDesignatedRequirement(SecStaticCodeRef code
, SecCSFlags flags
,
309 SecRequirementRef
* __nonnull CF_RETURNS_RETAINED requirement
);
313 @function SecCodeCopySigningInformation
314 For a given Code or StaticCode object, extract various pieces of information
315 from its code signature and return them in the form of a CFDictionary. The amount
316 and detail level of the data is controlled by the flags passed to the call. For
317 Code objects, some of the signing information returned will be from disk. You can
318 call one of the CheckValidity functions to check that the content on disk matches
319 the signing information attached to the running Code.
321 If the code exists but is not signed at all, this call will succeed and return
322 a dictionary that does NOT contain the kSecCodeInfoIdentifier key. This is the
323 recommended way to check quickly whether a code is signed.
325 If the signing data for the code is corrupt or invalid, this call may fail or it
326 may return partial data. To ensure that only valid data is returned (and errors
327 are raised for invalid data), you must successfully call one of the CheckValidity
328 functions on the code before calling CopySigningInformation.
330 @param code The Code or StaticCode object to be interrogated. For a Code
331 argument, its StaticCode is processed as per SecCodeCopyStaticCode.
332 Note that dynamic information (kSecCSDynamicInformation) cannot be obtained
333 for a StaticCode argument.
334 @param flags Optional flags. Use any or all of the kSecCS*Information flags
335 to select what information to return. A generic set of entries is returned
336 regardless; you may specify kSecCSDefaultFlags for just those.
337 @param information A CFDictionary containing information about the code is stored
338 here on successful completion. The contents of the dictionary depend on
339 the flags passed. Regardless of flags, the kSecCodeInfoIdentifier key is
340 always present if the code is signed, and always absent if the code is
342 Note that some of the objects returned are (retained) "live" API objects
343 used by the code signing infrastructure. Making changes to these objects
344 is unsupported and may cause subsequent code signing operations on the
345 affected code to behave in undefined ways.
346 @result On success, errSecSuccess. On error, an OSStatus value
347 documented in CSCommon.h or certain other Security framework headers.
351 @constant kSecCSSigningInformation Return cryptographic signing information,
352 including the certificate chain and CMS data (if any). For ad-hoc signed
353 code, there are no certificates and the CMS data is empty.
354 @constant kSecCSRequirementInformation Return information about internal code
355 requirements embedded in the code. This includes the Designated Requirement.
356 @constant kSecCSInternalInformation Return internal code signing information.
357 This information is for use by Apple, and is subject to change without notice.
358 It will not be further documented here.
359 @constant kSecCSDynamicInformation Return dynamic validity information about
360 the Code. The subject code must be a SecCodeRef (not a SecStaticCodeRef).
361 @constant kSecCSContentInformation Return more information about the file system
362 contents making up the signed code on disk. It is not generally advisable to
363 make use of this information, but some utilities (such as software-update
364 tools) may find it useful.
368 @constant kSecCodeInfoCertificates A CFArray of SecCertificates identifying the
369 certificate chain of the signing certificate as seen by the system. Absent
370 for ad-hoc signed code. May be partial or absent in error cases.
371 @constant kSecCodeInfoChangedFiles A CFArray of CFURLs identifying all files in
372 the code that may have been modified by the process of signing it. (In other
373 words, files not in this list will not have been touched by the signing operation.)
374 @constant kSecCodeInfoCMS A CFData containing the CMS cryptographic object that
375 secures the code signature. Empty for ad-hoc signed code.
376 @constant kSecCodeInfoDesignatedRequirement A SecRequirement describing the
377 actual Designated Requirement of the code.
378 @constant kSecCodeInfoEntitlements A CFData containing the embedded entitlement
379 blob of the code, if any.
380 @constant kSecCodeInfoEntitlementsDict A CFDictionary containing the embedded entitlements
381 of the code if it has entitlements and they are in standard dictionary form.
382 Absent if the code has no entitlements, or they are in a different format (in which
383 case, see kSecCodeInfoEntitlements).
384 @constant kSecCodeInfoFlags A CFNumber with the static (on-disk) state of the object.
385 Contants are defined by the type SecCodeSignatureFlags.
386 @constant kSecCodeInfoFormat A CFString characterizing the type and format of
387 the code. Suitable for display to a (knowledeable) user.
388 @constant kSecCodeInfoDigestAlgorithm A CFNumber indicating the kind of cryptographic
389 hash function chosen to establish integrity of the signature on this system, which
390 is the best supported algorithm from kSecCodeInfoDigestAlgorithms.
391 @constant kSecCodeInfoDigestAlgorithms A CFArray of CFNumbers indicating the kinds of
392 cryptographic hash functions available within the signature. The ordering of those items
393 has no significance in terms of priority, but determines the order in which
394 the hashes appear in kSecCodeInfoCdHashes.
395 @constant kSecCodeInfoPlatformIdentifier If this code was signed as part of an operating
396 system release, this value identifies that release.
397 @constant kSecCodeInfoIdentifier A CFString with the actual signing identifier
398 sealed into the signature. Absent for unsigned code.
399 @constant kSecCodeInfoImplicitDesignatedRequirement A SecRequirement describing
400 the designated requirement that the system did generate, or would have generated,
401 for the code. If the Designated Requirement was implicitly generated, this is
402 the same object as kSecCodeInfoDesignatedRequirement; this can be used to test
403 for an explicit Designated Requirement.
404 @constant kSecCodeInfoMainExecutable A CFURL identifying the main executable file
405 of the code. For single files, that is the file itself. For bundles, it is the
406 main executable as identified by its Info.plist.
407 @constant kSecCodeInfoPList A retained CFDictionary referring to the secured Info.plist
408 as seen by code signing. Absent if no Info.plist is known to the code signing
409 subsystem. Note that this is not the same dictionary as the one CFBundle would
410 give you (CFBundle is free to add entries to the on-disk plist).
411 @constant kSecCodeInfoRequirements A CFString describing the internal requirements
412 of the code in canonical syntax.
413 @constant kSecCodeInfoRequirementsData A CFData containing the internal requirements
414 of the code as a binary blob.
415 @constant kSecCodeInfoSource A CFString describing the source of the code signature
416 used for the code object. The values are meant to be shown in informational
417 displays; do not rely on the precise value returned.
418 @constant kSecCodeInfoStatus A CFNumber containing the dynamic status word of the
419 (running) code. This is a snapshot at the time the API is executed and may be
420 out of date by the time you examine it. Do note however that most of the bits
421 are sticky and thus some values are permanently reliable. Be careful.
422 @constant kSecCodeInfoTime A CFDate describing the signing date (securely) embedded
423 in the code signature. Note that a signer is able to omit this date or pre-date
424 it. Nobody certifies that this was really the date the code was signed; however,
425 you do know that this is the date the signer wanted you to see.
426 Ad-hoc signatures have no CMS and thus never have secured signing dates.
427 @constant kSecCodeInfoTimestamp A CFDate describing the signing date as (securely)
428 certified by a timestamp authority service. This time cannot be falsified by the
429 signer; you trust the timestamp authority's word on this.
430 Ad-hoc signatures have no CMS and thus never have secured signing dates.
431 @constant kSecCodeInfoTrust The (retained) SecTrust object the system uses to
432 evaluate the validity of the code's signature. You may use the SecTrust API
433 to extract detailed information, particularly for reasons why certificate
434 validation may have failed. This object may continue to be used for further
435 evaluations of this code; if you make any changes to it, behavior is undefined.
436 @constant kSecCodeInfoUnique A CFData binary identifier that uniquely identifies
437 the static code in question. It can be used to recognize this particular code
438 (and none other) now or in the future. Compare to kSecCodeInfoIdentifier, which
439 remains stable across (developer-approved) updates.
440 The algorithm used may change from time to time. However, for any existing signature,
442 @constant kSecCodeInfoCdHashes An array containing the values of the kSecCodeInfoUnique
443 binary identifier for every digest algorithm supported in the signature, in the same
444 order as in the kSecCodeInfoDigestAlgorithms array. The kSecCodeInfoUnique value
445 will be contained in this array, and be the one corresponding to the
446 kSecCodeInfoDigestAlgorithm value.
449 kSecCSInternalInformation
= 1 << 0,
450 kSecCSSigningInformation
= 1 << 1,
451 kSecCSRequirementInformation
= 1 << 2,
452 kSecCSDynamicInformation
= 1 << 3,
453 kSecCSContentInformation
= 1 << 4,
454 kSecCSSkipResourceDirectory
= 1 << 5,
455 kSecCSCalculateCMSDigest
= 1 << 6,
457 /* flag required to get this value */
458 extern const CFStringRef kSecCodeInfoCertificates
; /* Signing */
459 extern const CFStringRef kSecCodeInfoChangedFiles
; /* Content */
460 extern const CFStringRef kSecCodeInfoCMS
; /* Signing */
461 extern const CFStringRef kSecCodeInfoDesignatedRequirement
; /* Requirement */
462 extern const CFStringRef kSecCodeInfoEntitlements
; /* generic */
463 extern const CFStringRef kSecCodeInfoEntitlementsDict
; /* generic */
464 extern const CFStringRef kSecCodeInfoFlags
; /* generic */
465 extern const CFStringRef kSecCodeInfoFormat
; /* generic */
466 extern const CFStringRef kSecCodeInfoDigestAlgorithm
; /* generic */
467 extern const CFStringRef kSecCodeInfoDigestAlgorithms
; /* generic */
468 extern const CFStringRef kSecCodeInfoPlatformIdentifier
; /* generic */
469 extern const CFStringRef kSecCodeInfoIdentifier
; /* generic */
470 extern const CFStringRef kSecCodeInfoImplicitDesignatedRequirement
; /* Requirement */
471 extern const CFStringRef kSecCodeInfoMainExecutable
; /* generic */
472 extern const CFStringRef kSecCodeInfoPList
; /* generic */
473 extern const CFStringRef kSecCodeInfoRequirements
; /* Requirement */
474 extern const CFStringRef kSecCodeInfoRequirementData
; /* Requirement */
475 extern const CFStringRef kSecCodeInfoSource
; /* generic */
476 extern const CFStringRef kSecCodeInfoStatus
; /* Dynamic */
477 extern const CFStringRef kSecCodeInfoTeamIdentifier
; /* Signing */
478 extern const CFStringRef kSecCodeInfoTime
; /* Signing */
479 extern const CFStringRef kSecCodeInfoTimestamp
; /* Signing */
480 extern const CFStringRef kSecCodeInfoTrust
; /* Signing */
481 extern const CFStringRef kSecCodeInfoUnique
; /* generic */
482 extern const CFStringRef kSecCodeInfoCdHashes
; /* generic */
483 extern const CFStringRef kSecCodeInfoRuntimeVersion
; /*generic */
485 OSStatus
SecCodeCopySigningInformation(SecStaticCodeRef code
, SecCSFlags flags
,
486 CFDictionaryRef
* __nonnull CF_RETURNS_RETAINED information
);
490 @function SecCodeMapMemory
491 For a given Code or StaticCode object, ask the kernel to accept the signing information
492 currently attached to it in the caller and use it to validate memory page-ins against it,
493 updating dynamic validity state accordingly. This change affects all processes that have
494 the main executable of this code mapped.
496 @param code A Code or StaticCode object representing the signed code whose main executable
497 should be subject to page-in validation.
498 @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior.
500 OSStatus
SecCodeMapMemory(SecStaticCodeRef code
, SecCSFlags flags
);
502 CF_ASSUME_NONNULL_END