Function

SecKeychainSetSearchList(_:)

Specifies the list of keychains to use in the default keychain search list.

Declaration

func SecKeychainSetSearchList(_ searchList: CFArray) -> OSStatus

Parameters

searchList

An array of keychain references (of type SecKeychain) specifying the list of keychains to use in the default keychain search list. Passing an empty array clears the search list.

Return Value

Discussion

The default keychain search list is used by several functions; see for example SecKeychainSearchCreateFromAttributes, SecKeychainFindInternetPassword(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:), or SecKeychainFindGenericPassword(_:_:_:_:_:_:_:_:). To obtain the current default keychain search list, use the SecKeychainCopySearchList(_:) function.

The default keychain search list is displayed as the keychain list in the Keychain Access utility. If you use SecKeychainSetSearchList(_:) to change the keychain search list, the list displayed in Keychain Access changes accordingly.

See Also

Search

class SecKeychainSearch

An opaque type that contains information about a keychain search.