2 * Copyright (c) 2000-2011 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@
25 @header SecKeychainSearch
26 The functions provided in SecKeychainSearch implement a query of one or more keychains to search for a particular SecKeychainItem.
29 #ifndef _SECURITY_SECKEYCHAINSEARCH_H_
30 #define _SECURITY_SECKEYCHAINSEARCH_H_
32 #include <Security/SecKeychainItem.h>
35 #if defined(__cplusplus)
39 CF_ASSUME_NONNULL_BEGIN
42 @function SecKeychainSearchGetTypeID
43 @abstract Returns the type identifier of SecKeychainSearch instances.
44 @result The CFTypeID of SecKeychainSearch instances.
45 @discussion This API is deprecated in 10.7. The SecKeychainSearchRef type is no longer used.
47 CFTypeID
SecKeychainSearchGetTypeID(void)
48 API_DEPRECATED("SecKeychainSearch is not supported", macos(10.0, 10.7)) API_UNAVAILABLE(ios
, watchos
, tvos
, bridgeos
, macCatalyst
);
51 @function SecKeychainSearchCreateFromAttributes
52 @abstract Creates a search reference matching a list of zero or more specified attributes in the specified keychain.
53 @param keychainOrArray An reference to an array of keychains to search, a single keychain or NULL to search the user's default keychain search list.
54 @param itemClass The keychain item class.
55 @param attrList A pointer to a list of zero or more keychain attribute records to match. Pass NULL to match any keychain attribute.
56 @param searchRef On return, a pointer to the current search reference. You are responsible for calling the CFRelease function to release this reference when finished with it.
57 @result A result code. See "Security Error Codes" (SecBase.h).
58 @discussion This function is deprecated in Mac OS X 10.7 and later; to find keychain items which match specified attributes, please use the SecItemCopyMatching API (see SecItem.h).
60 OSStatus
SecKeychainSearchCreateFromAttributes(CFTypeRef __nullable keychainOrArray
, SecItemClass itemClass
, const SecKeychainAttributeList
* __nullable attrList
, SecKeychainSearchRef
* __nonnull CF_RETURNS_RETAINED searchRef
)
61 API_DEPRECATED("SecKeychainSearch is not supported", macos(10.0, 10.7)) API_UNAVAILABLE(ios
, watchos
, tvos
, bridgeos
, macCatalyst
);
64 @function SecKeychainSearchCopyNext
65 @abstract Finds the next keychain item matching the given search criteria.
66 @param searchRef A reference to the current search criteria. The search reference is created in the SecKeychainSearchCreateFromAttributes function and must be released by calling the CFRelease function when you are done with it.
67 @param itemRef On return, a pointer to a keychain item reference of the next matching keychain item, if any.
68 @result A result code. When there are no more items that match the parameters specified to SecPolicySearchCreate, errSecItemNotFound is returned. See "Security Error Codes" (SecBase.h).
69 @discussion This function is deprecated in Mac OS X 10.7 and later; to find keychain items which match specified attributes, please use the SecItemCopyMatching API (see SecItem.h).
71 OSStatus
SecKeychainSearchCopyNext(SecKeychainSearchRef searchRef
, SecKeychainItemRef
* __nonnull CF_RETURNS_RETAINED itemRef
)
72 API_DEPRECATED("SecKeychainSearch is not supported", macos(10.0, 10.7)) API_UNAVAILABLE(ios
, watchos
, tvos
, bridgeos
, macCatalyst
);
76 #if defined(__cplusplus)
80 #endif /* !_SECURITY_SECKEYCHAINSEARCH_H_ */