Updates the status and attributes of a particular guest.


OSStatus SecHostSetGuestStatus(SecGuestRef guestRef, uint32_t status, CFDictionaryRef attributes, SecCSFlags flags);



The guest code object of the code on whose behalf this thread is acting.


A new set of code status flags for the guest (see SecCodeStatus. The host must enforce the restrictions on changes to guest status: the kSecCodeStatusValid bit can only be cleared and the kSecCodeStatusHard and kSecCodeStatusKill flags can only be set. Pass the previous guest status to indicate that no change is desired.


A key-value dictionary of attributes that can be used to identify this particular guest among all of the caller’s guests. If you include this dictionary, it completely replaces earlier-specified attributes. Pass NULL for this parameter if you do not want to change the attributes for this guest. Although you can specify any key-value pairs in this attributes dictionary, the keys in Guest Attribute Dictionary Keys are conventionally used for this purpose.


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

Return Value


This function must be called by a host acting in proxy mode every time the status of a guest changes so that Code Signing Services can update the information cache for that guest. The specified guest must have been created using the SecHostCreateGuest function.

See Also

Guest Code

Hosting Guest Code

Securely launch and manage plug-ins and other executable entities, known as guest code, from within your app acting as a host.


Creates a new guest and describes its initial properties.


Asks a code host to identify one of its guests given the type and value of specific attributes of the guest code.

Null Guest Handle

Use this special value to stand in for a null guest object.


Operational flags attached by code signing services to running code.

Guest Creation Flags

Use these supplemental flags to create a guest object.

Guest Attribute Dictionary Keys

Specify attributes of guest code.


A reference to a guest object, which identifies a particular block of guest code in the context of its code signing host.