objc2_security/generated/
SecItem.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2_core_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// Predefined key constant used to get or set item class values in
10    /// a dictionary. Its value is one of the constants defined in the Value
11    /// Constants for kSecClass.
12    ///
13    /// class code.  You use this key to get or set a value of type CFTypeRef
14    /// that contains the item class code.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecclass?language=objc)
17    pub static kSecClass: &'static CFString;
18}
19
20extern "C" {
21    /// Predefined item class constants used to get or set values in
22    /// a dictionary. The kSecClass constant is the key and its value is one
23    /// of the constants defined here. Note: on Mac OS X 10.6, only items
24    /// of class kSecClassInternetPassword are supported.
25    ///
26    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecclassinternetpassword?language=objc)
27    pub static kSecClassInternetPassword: &'static CFString;
28}
29
30extern "C" {
31    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecclassgenericpassword?language=objc)
32    pub static kSecClassGenericPassword: &'static CFString;
33}
34
35extern "C" {
36    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecclasscertificate?language=objc)
37    pub static kSecClassCertificate: &'static CFString;
38}
39
40extern "C" {
41    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecclasskey?language=objc)
42    pub static kSecClassKey: &'static CFString;
43}
44
45extern "C" {
46    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecclassidentity?language=objc)
47    pub static kSecClassIdentity: &'static CFString;
48}
49
50extern "C" {
51    /// Predefined item attribute keys used to get or set values in a
52    /// dictionary. Not all attributes apply to each item class. The table
53    /// below lists the currently defined attributes for each item class:
54    ///
55    /// kSecClassGenericPassword item attributes:
56    /// kSecAttrAccess (macOS only)
57    /// kSecAttrAccessControl
58    /// kSecAttrAccessGroup (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
59    /// kSecAttrAccessible (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
60    /// kSecAttrCreationDate
61    /// kSecAttrModificationDate
62    /// kSecAttrDescription
63    /// kSecAttrComment
64    /// kSecAttrCreator
65    /// kSecAttrType
66    /// kSecAttrLabel
67    /// kSecAttrIsInvisible
68    /// kSecAttrIsNegative
69    /// kSecAttrAccount
70    /// kSecAttrService
71    /// kSecAttrGeneric
72    /// kSecAttrSynchronizable
73    ///
74    /// kSecClassInternetPassword item attributes:
75    /// kSecAttrAccess (macOS only)
76    /// kSecAttrAccessControl
77    /// kSecAttrAccessGroup (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
78    /// kSecAttrAccessible (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
79    /// kSecAttrCreationDate
80    /// kSecAttrModificationDate
81    /// kSecAttrDescription
82    /// kSecAttrComment
83    /// kSecAttrCreator
84    /// kSecAttrType
85    /// kSecAttrLabel
86    /// kSecAttrIsInvisible
87    /// kSecAttrIsNegative
88    /// kSecAttrAccount
89    /// kSecAttrSecurityDomain
90    /// kSecAttrServer
91    /// kSecAttrProtocol
92    /// kSecAttrAuthenticationType
93    /// kSecAttrPort
94    /// kSecAttrPath
95    /// kSecAttrSynchronizable
96    ///
97    /// kSecClassCertificate item attributes:
98    /// kSecAttrAccessible    (iOS only)
99    /// kSecAttrAccessControl (iOS only)
100    /// kSecAttrAccessGroup   (iOS only)
101    /// kSecAttrCertificateType
102    /// kSecAttrCertificateEncoding
103    /// kSecAttrLabel
104    /// kSecAttrSubject
105    /// kSecAttrIssuer
106    /// kSecAttrSerialNumber
107    /// kSecAttrSubjectKeyID
108    /// kSecAttrPublicKeyHash
109    /// kSecAttrSynchronizable
110    ///
111    /// kSecClassKey item attributes:
112    /// kSecAttrAccess (macOS only)
113    /// kSecAttrAccessControl
114    /// kSecAttrAccessGroup (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
115    /// kSecAttrAccessible (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
116    /// kSecAttrKeyClass
117    /// kSecAttrLabel
118    /// kSecAttrApplicationLabel
119    /// kSecAttrIsPermanent
120    /// kSecAttrApplicationTag
121    /// kSecAttrKeyType
122    /// kSecAttrPRF    (macOS only)
123    /// kSecAttrSalt   (macOS only)
124    /// kSecAttrRounds (macOS only)
125    /// kSecAttrKeySizeInBits
126    /// kSecAttrEffectiveKeySize
127    /// kSecAttrCanEncrypt
128    /// kSecAttrCanDecrypt
129    /// kSecAttrCanDerive
130    /// kSecAttrCanSign
131    /// kSecAttrCanVerify
132    /// kSecAttrCanWrap
133    /// kSecAttrCanUnwrap
134    /// kSecAttrSynchronizable
135    ///
136    /// Note that the attributes kSecAttrCan* describe attributes of the
137    /// key itself at relatively high level. Some of these attributes are
138    /// mathematical -- for example, a DSA key cannot encrypt. Others are
139    /// key-level policy issues -- for example, it is good cryptographic
140    /// hygiene to use an RSA key either for encryption or signing but not
141    /// both. Compare these to the certificate-level policy values in
142    /// SecPolicy.h.
143    ///
144    /// kSecClassIdentity item attributes:
145    /// Since an identity is the combination of a private key and a
146    /// certificate, this class shares attributes of both kSecClassKey and
147    /// kSecClassCertificate.
148    ///
149    ///
150    /// indicates when your application needs access to an item's data.  You
151    /// should choose the most restrictive option that meets your application's
152    /// needs to allow the system to protect that item in the best way possible.
153    /// See the "kSecAttrAccessible Value Constants" section for a list of
154    /// values which can be specified.
155    /// IMPORTANT: This attribute is currently not supported for macOS keychain
156    /// items, unless the kSecAttrSynchronizable attribute is also present. If
157    /// both attributes are specified on either macOS or iOS, the value for the
158    /// kSecAttrAccessible key may only be one whose name does not end with
159    /// "ThisDeviceOnly", as those cannot sync to another device.
160    ///
161    ///
162    /// is SecAccessControl instance which contains access control conditions
163    /// for item.
164    /// IMPORTANT: This attribute is mutually exclusive with kSecAttrAccess
165    /// attribute.
166    ///
167    ///
168    /// is a SecAccessRef describing the access control settings for this item.
169    /// This key is available on macOS only.
170    ///
171    ///
172    /// a CFStringRef indicating which access group a item is in.  The access
173    /// groups that a particular application has membership in are determined by
174    /// two entitlements for that application.  The application-identifier
175    /// entitlement contains the application's single access group, unless
176    /// there is a keychain-access-groups entitlement present.  The latter
177    /// has as its value a list of access groups; the first item in this list
178    /// is the default access group. Unless a specific access group is provided
179    /// as the value of kSecAttrAccessGroup when SecItemAdd is called, new items
180    /// are created in the application's default access group.  Specifying this
181    /// attribute in SecItemCopyMatching, SecItemUpdate, or SecItemDelete calls
182    /// limits the search to the specified access group (of which the calling
183    /// application must be a member to obtain matching results.)  To share
184    /// keychain items between multiple applications, each application must have
185    /// a common group listed in its keychain-access-groups entitlement, and each
186    /// must specify this shared access group name as the value for the
187    /// kSecAttrAccessGroup key in the dictionary passed to SecItem functions.
188    ///
189    ///
190    /// a CFBooleanRef indicating whether the item in question can be synchronized.
191    /// To add a new item which can be synced to other devices, or to obtain
192    /// synchronizable results from a query, supply this key with a value of
193    /// kCFBooleanTrue. If the key is not supplied, or has a value of
194    /// kCFBooleanFalse, then no synchronizable items will be added or returned.
195    /// A predefined value, kSecAttrSynchronizableAny, may be provided instead of
196    /// kCFBooleanTrue if both synchronizable and non-synchronizable results are
197    /// desired.
198    ///
199    /// IMPORTANT: Specifying the kSecAttrSynchronizable key has several caveats:
200    ///
201    /// - Updating or deleting items using the kSecAttrSynchronizable key will
202    /// affect all copies of the item, not just the one on your local device.
203    /// Be sure that it makes sense to use the same password on all devices
204    /// before deciding to make a password synchronizable.
205    /// - Starting in iOS 14, macOS 11, and watchOS 7, the keychain
206    /// synchronizes passwords, certificates, and cryptographic keys.
207    /// Earlier OS versions synchronize only passwords.
208    /// - Items stored or obtained using the kSecAttrSynchronizable key cannot
209    /// specify SecAccessRef-based access control with kSecAttrAccess. If a
210    /// password is intended to be shared between multiple applications, the
211    /// kSecAttrAccessGroup key must be specified, and each application
212    /// using this password must have a 'keychain-access-groups' entitlement
213    /// with the specified access group value.
214    /// - Items stored or obtained using the kSecAttrSynchronizable key may
215    /// not also specify a kSecAttrAccessible value which is incompatible
216    /// with syncing (namely, those whose names end with "ThisDeviceOnly".)
217    /// - On macOS, when kSecAttrSynchronizable is set to true, returning
218    /// references is supported only for Certificate, Key or Identity items.
219    /// - Persistent references to synchronizable items should be avoided;
220    /// while they may work locally, they cannot be moved between devices,
221    /// and may not resolve if the item is modified on some other device.
222    /// - When specifying a query that uses the kSecAttrSynchronizable key,
223    /// search keys are limited to the item's class and attributes.
224    /// The only search constant which may be used is kSecMatchLimit; other
225    /// constants using the kSecMatch prefix are not supported at this time.
226    ///
227    ///
228    /// non-synchronizable results should be returned from this query. This may be
229    /// used as a value for the kSecAttrSynchronizable dictionary key in a call to
230    /// SecItemCopyMatching, SecItemUpdate, or SecItemDelete.
231    ///
232    ///
233    /// value is the item's creation date. You use this key to get a value
234    /// of type CFDateRef that represents the date the item was created.
235    ///
236    /// whose value is the item's modification date. You use this key to get
237    /// a value of type CFDateRef that represents the last time the item was
238    /// updated.
239    ///
240    /// the item's description attribute. You use this key to set or get a
241    /// value of type CFStringRef that represents a user-visible string
242    /// describing this particular kind of item (e.g., "disk image password").
243    ///
244    /// item's comment attribute. You use this key to set or get a value of
245    /// type CFStringRef containing the user-editable comment for this item.
246    ///
247    /// item's creator attribute. You use this key to set or get a value of
248    /// type CFNumberRef that represents the item's creator. This number is
249    /// the unsigned integer representation of a four-character code (e.g.,
250    /// 'aCrt').
251    ///
252    /// type attribute. You use this key to set or get a value of type
253    /// CFNumberRef that represents the item's type. This number is the
254    /// unsigned integer representation of a four-character code (e.g.,
255    /// 'aTyp').
256    ///
257    /// item's label attribute. You use this key to set or get a value of
258    /// type CFStringRef containing the user-visible label for this item.
259    ///
260    /// item's invisible attribute. You use this key to set or get a value
261    /// of type CFBooleanRef that indicates whether the item is invisible
262    /// (i.e., should not be displayed.)
263    ///
264    /// item's negative attribute. You use this key to set or get a value of
265    /// type CFBooleanRef that indicates whether there is a valid password
266    /// associated with this keychain item. This is useful if your application
267    /// doesn't want a password for some particular service to be stored in
268    /// the keychain, but prefers that it always be entered by the user.
269    ///
270    /// item's account attribute. You use this key to set or get a CFStringRef
271    /// that contains an account name. (Items of class
272    /// kSecClassGenericPassword, kSecClassInternetPassword have this
273    /// attribute.)
274    ///
275    /// item's service attribute. You use this key to set or get a CFStringRef
276    /// that represents the service associated with this item. (Items of class
277    /// kSecClassGenericPassword have this attribute.)
278    ///
279    /// item's generic attribute. You use this key to set or get a value of
280    /// CFDataRef that contains a user-defined attribute. (Items of class
281    /// kSecClassGenericPassword have this attribute.)
282    ///
283    /// is the item's security domain attribute. You use this key to set or
284    /// get a CFStringRef value that represents the Internet security domain.
285    /// (Items of class kSecClassInternetPassword have this attribute.)
286    ///
287    /// item's server attribute. You use this key to set or get a value of
288    /// type CFStringRef that contains the server's domain name or IP address.
289    /// (Items of class kSecClassInternetPassword have this attribute.)
290    ///
291    /// item's protocol attribute. You use this key to set or get a value of
292    /// type CFNumberRef that denotes the protocol for this item (see the
293    /// SecProtocolType enum in SecKeychainItem.h). (Items of class
294    /// kSecClassInternetPassword have this attribute.)
295    ///
296    /// is the item's authentication type attribute. You use this key to set
297    /// or get a value of type CFNumberRef that denotes the authentication
298    /// scheme for this item (see the kSecAttrAuthenticationType value
299    /// constants below).
300    ///
301    /// port attribute. You use this key to set or get a CFNumberRef value
302    /// that represents an Internet port number. (Items of class
303    /// kSecClassInternetPassword have this attribute.)
304    ///
305    /// path attribute, typically this is the path component of the URL.  You use
306    /// this key to set or get a CFStringRef value that represents a path. (Items
307    /// of class kSecClassInternetPassword have this attribute.)
308    ///
309    /// value is the item's subject. You use this key to get a value of type
310    /// CFDataRef that contains the X.500 subject name of a certificate.
311    /// (Items of class kSecClassCertificate have this attribute.)
312    ///
313    /// is the item's issuer. You use this key to get a value of type
314    /// CFDataRef that contains the X.500 issuer name of a certificate. (Items
315    /// of class kSecClassCertificate have this attribute.)
316    ///
317    /// value is the item's serial number.  You use this key to get a value
318    /// of type CFDataRef that contains the serial number data of a
319    /// certificate. (Items of class kSecClassCertificate have this
320    /// attribute.)
321    ///
322    /// value is the item's subject key ID. You use this key to get a value
323    /// of type CFDataRef that contains the subject key ID of a certificate.
324    /// (Items of class kSecClassCertificate have this attribute.)
325    ///
326    /// whose value is the item's public key hash. You use this key to get a
327    /// value of type CFDataRef that contains the hash of a certificate's
328    /// public key. (Items of class kSecClassCertificate have this attribute.)
329    ///
330    /// whose value is the item's certificate type. You use this key to get
331    /// a value of type CFNumberRef that denotes the certificate type
332    /// (On iOS, currently the value of this attribute must be equal to the
333    /// version of the X509 certificate.  So, 1 for v1, 2 for v2, and 3 for v3
334    /// certificates). (On macOS, see the CSSM_CERT_TYPE enum in cssmtype.h).
335    /// Only items of class kSecClassCertificate have this attribute.
336    ///
337    /// key whose value is the item's certificate encoding. You use this key
338    /// to get a value of type CFNumberRef that denotes the certificate
339    /// encoding (On iOS, currently only the value 3 meaning
340    /// kSecAttrCertificateEncodingDER is supported). On macOS, see the
341    /// CSSM_CERT_ENCODING enum in cssmtype.h. Only items of class
342    /// kSecClassCertificate have this attribute.
343    ///
344    /// value is one of kSecAttrKeyClassPublic, kSecAttrKeyClassPrivate or
345    /// kSecAttrKeyClassSymmetric.
346    ///
347    /// is the key's application label attribute. This is different from the
348    /// kSecAttrLabel (which is intended to be human-readable). This attribute
349    /// is used to look up a key programmatically; in particular, for keys of
350    /// class kSecAttrKeyClassPublic and kSecAttrKeyClassPrivate, the value of
351    /// this attribute is the hash of the public key. This item is a type of CFDataRef.
352    /// Legacy keys may contain a UUID in this field as a CFStringRef.
353    ///
354    /// CFBooleanRef indicating whether the key in question will be stored
355    /// permanently.
356    ///
357    /// CFBooleanRef indicating that the key in question can only be exported
358    /// in a wrapped (encrypted) format. macOS only.
359    ///
360    /// CFBooleanRef indicating whether the key in question can be exported from
361    /// its keychain container. macOS only.
362    ///
363    /// CFDataRef containing private tag data.
364    ///
365    /// CFNumberRef indicating the algorithm associated with this key
366    /// (On iOS, currently only the value 42 is supported, alternatively you can use
367    /// kSecAttrKeyTypeRSA). (On macOS, see the CSSM_ALGORITHMS enum in cssmtype.h).
368    ///
369    ///
370    /// (pseudo-random function) for this key (see "kSecAttrPRF Value Constants".)
371    /// macOS only.
372    ///
373    /// CFData containing the salt to use for this key. macOS only.
374    ///
375    /// number of rounds for the pseudo-random function specified by kSecAttrPRF.
376    /// macOS only.
377    ///
378    /// is a CFNumberRef indicating the number of bits in this key.
379    ///
380    /// is a CFNumberRef indicating the effective number of bits in this key.
381    /// For example, a DES key has a kSecAttrKeySizeInBits of 64, but a
382    /// kSecAttrEffectiveKeySize of 56 bits.
383    ///
384    /// CFBooleanRef indicating whether the key in question can be used to
385    /// encrypt data.
386    ///
387    /// CFBooleanRef indicating whether the key in question can be used to
388    /// decrypt data.
389    ///
390    /// CFBooleanRef indicating whether the key in question can be used to
391    /// derive another key.
392    ///
393    /// CFBooleanRef indicating whether the key in question can be used to
394    /// create a digital signature.
395    ///
396    /// CFBooleanRef indicating whether the key in question can be used to
397    /// verify a digital signature.
398    ///
399    /// CFBooleanRef indicating whether the key in question can be used to
400    /// wrap another key.
401    ///
402    /// CFBooleanRef indicating whether the key in question can be used to
403    /// unwrap another key.
404    ///
405    /// a CFStringRef. This value is part of the primary key of each item, and
406    /// can be used to help distiguish Sync Views when defining their
407    /// queries. iOS and sychronizable items only.
408    ///
409    /// indicates that item is backed by external token. Value of this attribute
410    /// is CFStringRef uniquely identifying containing token. When this attribute
411    /// is not present, item is stored in internal keychain database.
412    /// Note that once item is created, this attribute cannot be changed - in other
413    /// words it is not possible to migrate existing items to, from or between tokens.
414    /// Currently the only available value for this attribute is
415    /// kSecAttrTokenIDSecureEnclave, which indicates that item (private key) is
416    /// backed by device's Secure Enclave.
417    ///
418    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessible?language=objc)
419    pub static kSecAttrAccessible: &'static CFString;
420}
421
422extern "C" {
423    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccess?language=objc)
424    pub static kSecAttrAccess: &'static CFString;
425}
426
427extern "C" {
428    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccesscontrol?language=objc)
429    pub static kSecAttrAccessControl: &'static CFString;
430}
431
432extern "C" {
433    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessgroup?language=objc)
434    pub static kSecAttrAccessGroup: &'static CFString;
435}
436
437extern "C" {
438    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsynchronizable?language=objc)
439    pub static kSecAttrSynchronizable: &'static CFString;
440}
441
442extern "C" {
443    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsynchronizableany?language=objc)
444    pub static kSecAttrSynchronizableAny: &'static CFString;
445}
446
447extern "C" {
448    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcreationdate?language=objc)
449    pub static kSecAttrCreationDate: &'static CFString;
450}
451
452extern "C" {
453    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrmodificationdate?language=objc)
454    pub static kSecAttrModificationDate: &'static CFString;
455}
456
457extern "C" {
458    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrdescription?language=objc)
459    pub static kSecAttrDescription: &'static CFString;
460}
461
462extern "C" {
463    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcomment?language=objc)
464    pub static kSecAttrComment: &'static CFString;
465}
466
467extern "C" {
468    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcreator?language=objc)
469    pub static kSecAttrCreator: &'static CFString;
470}
471
472extern "C" {
473    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrtype?language=objc)
474    pub static kSecAttrType: &'static CFString;
475}
476
477extern "C" {
478    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrlabel?language=objc)
479    pub static kSecAttrLabel: &'static CFString;
480}
481
482extern "C" {
483    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrisinvisible?language=objc)
484    pub static kSecAttrIsInvisible: &'static CFString;
485}
486
487extern "C" {
488    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrisnegative?language=objc)
489    pub static kSecAttrIsNegative: &'static CFString;
490}
491
492extern "C" {
493    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccount?language=objc)
494    pub static kSecAttrAccount: &'static CFString;
495}
496
497extern "C" {
498    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrservice?language=objc)
499    pub static kSecAttrService: &'static CFString;
500}
501
502extern "C" {
503    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrgeneric?language=objc)
504    pub static kSecAttrGeneric: &'static CFString;
505}
506
507extern "C" {
508    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsecuritydomain?language=objc)
509    pub static kSecAttrSecurityDomain: &'static CFString;
510}
511
512extern "C" {
513    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrserver?language=objc)
514    pub static kSecAttrServer: &'static CFString;
515}
516
517extern "C" {
518    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocol?language=objc)
519    pub static kSecAttrProtocol: &'static CFString;
520}
521
522extern "C" {
523    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtype?language=objc)
524    pub static kSecAttrAuthenticationType: &'static CFString;
525}
526
527extern "C" {
528    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrport?language=objc)
529    pub static kSecAttrPort: &'static CFString;
530}
531
532extern "C" {
533    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrpath?language=objc)
534    pub static kSecAttrPath: &'static CFString;
535}
536
537extern "C" {
538    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsubject?language=objc)
539    pub static kSecAttrSubject: &'static CFString;
540}
541
542extern "C" {
543    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrissuer?language=objc)
544    pub static kSecAttrIssuer: &'static CFString;
545}
546
547extern "C" {
548    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrserialnumber?language=objc)
549    pub static kSecAttrSerialNumber: &'static CFString;
550}
551
552extern "C" {
553    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsubjectkeyid?language=objc)
554    pub static kSecAttrSubjectKeyID: &'static CFString;
555}
556
557extern "C" {
558    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrpublickeyhash?language=objc)
559    pub static kSecAttrPublicKeyHash: &'static CFString;
560}
561
562extern "C" {
563    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcertificatetype?language=objc)
564    pub static kSecAttrCertificateType: &'static CFString;
565}
566
567extern "C" {
568    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcertificateencoding?language=objc)
569    pub static kSecAttrCertificateEncoding: &'static CFString;
570}
571
572extern "C" {
573    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeyclass?language=objc)
574    pub static kSecAttrKeyClass: &'static CFString;
575}
576
577extern "C" {
578    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrapplicationlabel?language=objc)
579    pub static kSecAttrApplicationLabel: &'static CFString;
580}
581
582extern "C" {
583    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrispermanent?language=objc)
584    pub static kSecAttrIsPermanent: &'static CFString;
585}
586
587extern "C" {
588    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrissensitive?language=objc)
589    pub static kSecAttrIsSensitive: &'static CFString;
590}
591
592extern "C" {
593    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrisextractable?language=objc)
594    pub static kSecAttrIsExtractable: &'static CFString;
595}
596
597extern "C" {
598    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrapplicationtag?language=objc)
599    pub static kSecAttrApplicationTag: &'static CFString;
600}
601
602extern "C" {
603    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytype?language=objc)
604    pub static kSecAttrKeyType: &'static CFString;
605}
606
607extern "C" {
608    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprf?language=objc)
609    pub static kSecAttrPRF: &'static CFString;
610}
611
612extern "C" {
613    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsalt?language=objc)
614    pub static kSecAttrSalt: &'static CFString;
615}
616
617extern "C" {
618    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrrounds?language=objc)
619    pub static kSecAttrRounds: &'static CFString;
620}
621
622extern "C" {
623    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeysizeinbits?language=objc)
624    pub static kSecAttrKeySizeInBits: &'static CFString;
625}
626
627extern "C" {
628    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattreffectivekeysize?language=objc)
629    pub static kSecAttrEffectiveKeySize: &'static CFString;
630}
631
632extern "C" {
633    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcanencrypt?language=objc)
634    pub static kSecAttrCanEncrypt: &'static CFString;
635}
636
637extern "C" {
638    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcandecrypt?language=objc)
639    pub static kSecAttrCanDecrypt: &'static CFString;
640}
641
642extern "C" {
643    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcanderive?language=objc)
644    pub static kSecAttrCanDerive: &'static CFString;
645}
646
647extern "C" {
648    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcansign?language=objc)
649    pub static kSecAttrCanSign: &'static CFString;
650}
651
652extern "C" {
653    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcanverify?language=objc)
654    pub static kSecAttrCanVerify: &'static CFString;
655}
656
657extern "C" {
658    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcanwrap?language=objc)
659    pub static kSecAttrCanWrap: &'static CFString;
660}
661
662extern "C" {
663    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrcanunwrap?language=objc)
664    pub static kSecAttrCanUnwrap: &'static CFString;
665}
666
667extern "C" {
668    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrsyncviewhint?language=objc)
669    pub static kSecAttrSyncViewHint: &'static CFString;
670}
671
672extern "C" {
673    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrtokenid?language=objc)
674    pub static kSecAttrTokenID: &'static CFString;
675}
676
677extern "C" {
678    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrpersistantreference?language=objc)
679    pub static kSecAttrPersistantReference: &'static CFString;
680}
681
682extern "C" {
683    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrpersistentreference?language=objc)
684    pub static kSecAttrPersistentReference: &'static CFString;
685}
686
687extern "C" {
688    /// Predefined item attribute constants used to get or set values
689    /// in a dictionary. The kSecAttrAccessible constant is the key and its
690    /// value is one of the constants defined here.
691    /// When asking SecItemCopyMatching to return the item's data, the error
692    /// errSecInteractionNotAllowed will be returned if the item's data is not
693    /// available until a device unlock occurs.
694    ///
695    /// while the device is unlocked. This is recommended for items that only
696    /// need be accesible while the application is in the foreground.  Items
697    /// with this attribute will migrate to a new device when using encrypted
698    /// backups.
699    ///
700    /// accessed once the device has been unlocked after a restart.  This is
701    /// recommended for items that need to be accesible by background
702    /// applications. Items with this attribute will migrate to a new device
703    /// when using encrypted backups.
704    ///
705    /// regardless of the lock state of the device.  This is not recommended
706    /// for anything except system use. Items with this attribute will migrate
707    /// to a new device when using encrypted backups.
708    ///
709    /// only be accessed while the device is unlocked. This is recommended for
710    /// items that only need to be accessible while the application is in the
711    /// foreground and requires a passcode to be set on the device. Items with
712    /// this attribute will never migrate to a new device, so after a backup
713    /// is restored to a new device, these items will be missing. This
714    /// attribute will not be available on devices without a passcode. Disabling
715    /// the device passcode will cause all previously protected items to
716    /// be deleted.
717    ///
718    /// be accessed while the device is unlocked. This is recommended for items
719    /// that only need be accesible while the application is in the foreground.
720    /// Items with this attribute will never migrate to a new device, so after
721    /// a backup is restored to a new device, these items will be missing.
722    ///
723    /// only be accessed once the device has been unlocked after a restart.
724    /// This is recommended for items that need to be accessible by background
725    /// applications. Items with this attribute will never migrate to a new
726    /// device, so after a backup is restored to a new device these items will
727    /// be missing.
728    ///
729    /// be accessed regardless of the lock state of the device.  This option
730    /// is not recommended for anything except system use. Items with this
731    /// attribute will never migrate to a new device, so after a backup is
732    /// restored to a new device, these items will be missing.
733    ///
734    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessiblewhenunlocked?language=objc)
735    pub static kSecAttrAccessibleWhenUnlocked: &'static CFString;
736}
737
738extern "C" {
739    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessibleafterfirstunlock?language=objc)
740    pub static kSecAttrAccessibleAfterFirstUnlock: &'static CFString;
741}
742
743extern "C" {
744    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessiblealways?language=objc)
745    #[deprecated = "Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlock"]
746    pub static kSecAttrAccessibleAlways: &'static CFString;
747}
748
749extern "C" {
750    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessiblewhenpasscodesetthisdeviceonly?language=objc)
751    pub static kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly: &'static CFString;
752}
753
754extern "C" {
755    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessiblewhenunlockedthisdeviceonly?language=objc)
756    pub static kSecAttrAccessibleWhenUnlockedThisDeviceOnly: &'static CFString;
757}
758
759extern "C" {
760    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessibleafterfirstunlockthisdeviceonly?language=objc)
761    pub static kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly: &'static CFString;
762}
763
764extern "C" {
765    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessiblealwaysthisdeviceonly?language=objc)
766    #[deprecated = "Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly"]
767    pub static kSecAttrAccessibleAlwaysThisDeviceOnly: &'static CFString;
768}
769
770extern "C" {
771    /// Predefined item attribute constants used to get or set values
772    /// in a dictionary. The kSecAttrProtocol constant is the key and its
773    /// value is one of the constants defined here.
774    ///
775    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolftp?language=objc)
776    pub static kSecAttrProtocolFTP: &'static CFString;
777}
778
779extern "C" {
780    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolftpaccount?language=objc)
781    pub static kSecAttrProtocolFTPAccount: &'static CFString;
782}
783
784extern "C" {
785    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolhttp?language=objc)
786    pub static kSecAttrProtocolHTTP: &'static CFString;
787}
788
789extern "C" {
790    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolirc?language=objc)
791    pub static kSecAttrProtocolIRC: &'static CFString;
792}
793
794extern "C" {
795    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolnntp?language=objc)
796    pub static kSecAttrProtocolNNTP: &'static CFString;
797}
798
799extern "C" {
800    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolpop3?language=objc)
801    pub static kSecAttrProtocolPOP3: &'static CFString;
802}
803
804extern "C" {
805    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolsmtp?language=objc)
806    pub static kSecAttrProtocolSMTP: &'static CFString;
807}
808
809extern "C" {
810    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolsocks?language=objc)
811    pub static kSecAttrProtocolSOCKS: &'static CFString;
812}
813
814extern "C" {
815    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolimap?language=objc)
816    pub static kSecAttrProtocolIMAP: &'static CFString;
817}
818
819extern "C" {
820    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolldap?language=objc)
821    pub static kSecAttrProtocolLDAP: &'static CFString;
822}
823
824extern "C" {
825    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolappletalk?language=objc)
826    pub static kSecAttrProtocolAppleTalk: &'static CFString;
827}
828
829extern "C" {
830    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolafp?language=objc)
831    pub static kSecAttrProtocolAFP: &'static CFString;
832}
833
834extern "C" {
835    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocoltelnet?language=objc)
836    pub static kSecAttrProtocolTelnet: &'static CFString;
837}
838
839extern "C" {
840    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolssh?language=objc)
841    pub static kSecAttrProtocolSSH: &'static CFString;
842}
843
844extern "C" {
845    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolftps?language=objc)
846    pub static kSecAttrProtocolFTPS: &'static CFString;
847}
848
849extern "C" {
850    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolhttps?language=objc)
851    pub static kSecAttrProtocolHTTPS: &'static CFString;
852}
853
854extern "C" {
855    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolhttpproxy?language=objc)
856    pub static kSecAttrProtocolHTTPProxy: &'static CFString;
857}
858
859extern "C" {
860    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolhttpsproxy?language=objc)
861    pub static kSecAttrProtocolHTTPSProxy: &'static CFString;
862}
863
864extern "C" {
865    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolftpproxy?language=objc)
866    pub static kSecAttrProtocolFTPProxy: &'static CFString;
867}
868
869extern "C" {
870    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolsmb?language=objc)
871    pub static kSecAttrProtocolSMB: &'static CFString;
872}
873
874extern "C" {
875    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolrtsp?language=objc)
876    pub static kSecAttrProtocolRTSP: &'static CFString;
877}
878
879extern "C" {
880    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolrtspproxy?language=objc)
881    pub static kSecAttrProtocolRTSPProxy: &'static CFString;
882}
883
884extern "C" {
885    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocoldaap?language=objc)
886    pub static kSecAttrProtocolDAAP: &'static CFString;
887}
888
889extern "C" {
890    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocoleppc?language=objc)
891    pub static kSecAttrProtocolEPPC: &'static CFString;
892}
893
894extern "C" {
895    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolipp?language=objc)
896    pub static kSecAttrProtocolIPP: &'static CFString;
897}
898
899extern "C" {
900    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolnntps?language=objc)
901    pub static kSecAttrProtocolNNTPS: &'static CFString;
902}
903
904extern "C" {
905    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolldaps?language=objc)
906    pub static kSecAttrProtocolLDAPS: &'static CFString;
907}
908
909extern "C" {
910    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocoltelnets?language=objc)
911    pub static kSecAttrProtocolTelnetS: &'static CFString;
912}
913
914extern "C" {
915    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolimaps?language=objc)
916    pub static kSecAttrProtocolIMAPS: &'static CFString;
917}
918
919extern "C" {
920    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolircs?language=objc)
921    pub static kSecAttrProtocolIRCS: &'static CFString;
922}
923
924extern "C" {
925    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprotocolpop3s?language=objc)
926    pub static kSecAttrProtocolPOP3S: &'static CFString;
927}
928
929extern "C" {
930    /// Predefined item attribute constants used to get or set values
931    /// in a dictionary. The kSecAttrAuthenticationType constant is the key
932    /// and its value is one of the constants defined here.
933    ///
934    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypentlm?language=objc)
935    pub static kSecAttrAuthenticationTypeNTLM: &'static CFString;
936}
937
938extern "C" {
939    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypemsn?language=objc)
940    pub static kSecAttrAuthenticationTypeMSN: &'static CFString;
941}
942
943extern "C" {
944    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypedpa?language=objc)
945    pub static kSecAttrAuthenticationTypeDPA: &'static CFString;
946}
947
948extern "C" {
949    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtyperpa?language=objc)
950    pub static kSecAttrAuthenticationTypeRPA: &'static CFString;
951}
952
953extern "C" {
954    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypehttpbasic?language=objc)
955    pub static kSecAttrAuthenticationTypeHTTPBasic: &'static CFString;
956}
957
958extern "C" {
959    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypehttpdigest?language=objc)
960    pub static kSecAttrAuthenticationTypeHTTPDigest: &'static CFString;
961}
962
963extern "C" {
964    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypehtmlform?language=objc)
965    pub static kSecAttrAuthenticationTypeHTMLForm: &'static CFString;
966}
967
968extern "C" {
969    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrauthenticationtypedefault?language=objc)
970    pub static kSecAttrAuthenticationTypeDefault: &'static CFString;
971}
972
973extern "C" {
974    /// Predefined item attribute constants used to get or set values
975    /// in a dictionary. The kSecAttrKeyClass constant is the key
976    /// and its value is one of the constants defined here.
977    ///
978    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeyclasspublic?language=objc)
979    pub static kSecAttrKeyClassPublic: &'static CFString;
980}
981
982extern "C" {
983    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeyclassprivate?language=objc)
984    pub static kSecAttrKeyClassPrivate: &'static CFString;
985}
986
987extern "C" {
988    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeyclasssymmetric?language=objc)
989    pub static kSecAttrKeyClassSymmetric: &'static CFString;
990}
991
992extern "C" {
993    /// Predefined item attribute constants used to get or set values
994    /// in a dictionary. The kSecAttrKeyType constant is the key
995    /// and its value is one of the constants defined here.
996    ///
997    /// The size is specified by kSecAttrKeySizeInBits attribute. Curves are defined in FIPS PUB 186-4 standard.
998    ///
999    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypersa?language=objc)
1000    pub static kSecAttrKeyTypeRSA: &'static CFString;
1001}
1002
1003extern "C" {
1004    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypedsa?language=objc)
1005    pub static kSecAttrKeyTypeDSA: &'static CFString;
1006}
1007
1008extern "C" {
1009    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypeaes?language=objc)
1010    pub static kSecAttrKeyTypeAES: &'static CFString;
1011}
1012
1013extern "C" {
1014    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypedes?language=objc)
1015    pub static kSecAttrKeyTypeDES: &'static CFString;
1016}
1017
1018extern "C" {
1019    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytype3des?language=objc)
1020    pub static kSecAttrKeyType3DES: &'static CFString;
1021}
1022
1023extern "C" {
1024    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytyperc4?language=objc)
1025    pub static kSecAttrKeyTypeRC4: &'static CFString;
1026}
1027
1028extern "C" {
1029    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytyperc2?language=objc)
1030    pub static kSecAttrKeyTypeRC2: &'static CFString;
1031}
1032
1033extern "C" {
1034    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypecast?language=objc)
1035    pub static kSecAttrKeyTypeCAST: &'static CFString;
1036}
1037
1038extern "C" {
1039    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypeecdsa?language=objc)
1040    pub static kSecAttrKeyTypeECDSA: &'static CFString;
1041}
1042
1043extern "C" {
1044    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypeec?language=objc)
1045    pub static kSecAttrKeyTypeEC: &'static CFString;
1046}
1047
1048extern "C" {
1049    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrkeytypeecsecprimerandom?language=objc)
1050    pub static kSecAttrKeyTypeECSECPrimeRandom: &'static CFString;
1051}
1052
1053extern "C" {
1054    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprfhmacalgsha1?language=objc)
1055    pub static kSecAttrPRFHmacAlgSHA1: &'static CFString;
1056}
1057
1058extern "C" {
1059    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprfhmacalgsha224?language=objc)
1060    pub static kSecAttrPRFHmacAlgSHA224: &'static CFString;
1061}
1062
1063extern "C" {
1064    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprfhmacalgsha256?language=objc)
1065    pub static kSecAttrPRFHmacAlgSHA256: &'static CFString;
1066}
1067
1068extern "C" {
1069    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprfhmacalgsha384?language=objc)
1070    pub static kSecAttrPRFHmacAlgSHA384: &'static CFString;
1071}
1072
1073extern "C" {
1074    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrprfhmacalgsha512?language=objc)
1075    pub static kSecAttrPRFHmacAlgSHA512: &'static CFString;
1076}
1077
1078extern "C" {
1079    /// Predefined search constants used to set values in a query
1080    /// dictionary. You can specify a combination of search attributes and
1081    /// item attributes when looking for matching items with the
1082    /// SecItemCopyMatching function.
1083    ///
1084    /// SecPolicyRef. If provided, returned certificates or identities must
1085    /// verify with this policy.
1086    ///
1087    /// CFArray of SecKeychainItemRef items. If provided, returned items will be
1088    /// limited to the subset which are contained in this list.
1089    ///
1090    /// CFArray of SecKeychainRef items. If provided, the search will be limited
1091    /// to the keychains contained in this list.
1092    ///
1093    /// CFArray of X.500 names (of type CFDataRef). If provided, returned
1094    /// certificates or identities will be limited to those whose
1095    /// certificate chain contains one of the issuers provided in this list.
1096    ///
1097    /// value is a CFStringRef containing an RFC822 email address. If
1098    /// provided, returned certificates or identities will be limited to those
1099    /// that contain the address in their subject or subject alternative name.
1100    ///
1101    /// is a CFStringRef. If provided, returned certificates or identities
1102    /// will be limited to those containing this string in the subject.
1103    ///
1104    /// is a CFStringRef. If provided, returned internet passwords will be limited to those which
1105    /// have a server host that is equal to or a subdomain of this string. This filter only works on
1106    /// the Data Protection Keychain on macOS.
1107    ///
1108    /// is a CFStringRef. If provided, returned certificates or identities
1109    /// will be limited to those with subject names that start with this string.
1110    ///
1111    /// is a CFStringRef. If provided, returned certificates or identities
1112    /// will be limited to those with subject names that end with this string.
1113    ///
1114    /// value is a CFStringRef. If provided, returned certificates or identities
1115    /// will be limited to those matching this string exactly in the subject.
1116    ///
1117    /// is a CFBooleanRef. If this value is kCFBooleanFalse, or is not
1118    /// provided, then case-sensitive string matching is performed.
1119    ///
1120    /// value is a CFBooleanRef. If this value is kCFBooleanFalse, or is not
1121    /// provided, then diacritic-sensitive string matching is performed.
1122    ///
1123    /// value is a CFBooleanRef. If this value is kCFBooleanFalse, or is not
1124    /// provided, then string matching is width-sensitive (e.g. 'a' != 0xFF41).
1125    ///
1126    /// a CFBooleanRef. If provided with a value of kCFBooleanTrue, only
1127    /// certificates which can be verified back to a trusted anchor will be
1128    /// returned. If this value is kCFBooleanFalse, or is not provided, then
1129    /// both trusted and untrusted certificates may be returned.
1130    ///
1131    /// of type CFDateRef. If provided, returned keys, certificates or
1132    /// identities will be limited to those which are valid for the given date.
1133    /// Pass a value of kCFNull to indicate the current date.
1134    ///
1135    /// CFNumberRef. If provided, this value specifies the maximum number of
1136    /// results to return. If not provided, results are limited to the first
1137    /// item found. Predefined values are provided for a single item
1138    /// (kSecMatchLimitOne) and all matching items (kSecMatchLimitAll).
1139    ///
1140    /// item found; used as a value for the kSecMatchLimit dictionary key.
1141    ///
1142    /// may be returned; used as a value for the kSecMatchLimit dictionary
1143    /// key.
1144    ///
1145    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchpolicy?language=objc)
1146    pub static kSecMatchPolicy: &'static CFString;
1147}
1148
1149extern "C" {
1150    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchitemlist?language=objc)
1151    pub static kSecMatchItemList: &'static CFString;
1152}
1153
1154extern "C" {
1155    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchsearchlist?language=objc)
1156    pub static kSecMatchSearchList: &'static CFString;
1157}
1158
1159extern "C" {
1160    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchissuers?language=objc)
1161    pub static kSecMatchIssuers: &'static CFString;
1162}
1163
1164extern "C" {
1165    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchemailaddressifpresent?language=objc)
1166    pub static kSecMatchEmailAddressIfPresent: &'static CFString;
1167}
1168
1169extern "C" {
1170    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchsubjectcontains?language=objc)
1171    pub static kSecMatchSubjectContains: &'static CFString;
1172}
1173
1174extern "C" {
1175    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchhostorsubdomainofhost?language=objc)
1176    pub static kSecMatchHostOrSubdomainOfHost: &'static CFString;
1177}
1178
1179extern "C" {
1180    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchsubjectstartswith?language=objc)
1181    pub static kSecMatchSubjectStartsWith: &'static CFString;
1182}
1183
1184extern "C" {
1185    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchsubjectendswith?language=objc)
1186    pub static kSecMatchSubjectEndsWith: &'static CFString;
1187}
1188
1189extern "C" {
1190    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchsubjectwholestring?language=objc)
1191    pub static kSecMatchSubjectWholeString: &'static CFString;
1192}
1193
1194extern "C" {
1195    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchcaseinsensitive?language=objc)
1196    pub static kSecMatchCaseInsensitive: &'static CFString;
1197}
1198
1199extern "C" {
1200    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchdiacriticinsensitive?language=objc)
1201    pub static kSecMatchDiacriticInsensitive: &'static CFString;
1202}
1203
1204extern "C" {
1205    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchwidthinsensitive?language=objc)
1206    pub static kSecMatchWidthInsensitive: &'static CFString;
1207}
1208
1209extern "C" {
1210    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchtrustedonly?language=objc)
1211    pub static kSecMatchTrustedOnly: &'static CFString;
1212}
1213
1214extern "C" {
1215    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchvalidondate?language=objc)
1216    pub static kSecMatchValidOnDate: &'static CFString;
1217}
1218
1219extern "C" {
1220    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchlimit?language=objc)
1221    pub static kSecMatchLimit: &'static CFString;
1222}
1223
1224extern "C" {
1225    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchlimitone?language=objc)
1226    pub static kSecMatchLimitOne: &'static CFString;
1227}
1228
1229extern "C" {
1230    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecmatchlimitall?language=objc)
1231    pub static kSecMatchLimitAll: &'static CFString;
1232}
1233
1234extern "C" {
1235    /// Predefined return type keys used to set values in a dictionary.
1236    /// You use these keys to specify the type of results which should be
1237    /// returned by the SecItemCopyMatching or SecItemAdd function. You can
1238    /// specify zero or more of these return types. If more than one of these
1239    /// result types is specified, the result is returned as a CFDictionaryRef
1240    /// whose keys are the result types and values are the requested data.
1241    ///
1242    /// CFBooleanRef. A value of kCFBooleanTrue indicates that the data of
1243    /// an item (CFDataRef) should be returned. For keys and password
1244    /// items, data is secret (encrypted) and may require the user to enter
1245    /// a password for access.
1246    ///
1247    /// of type CFBooleanRef. A value of kCFBooleanTrue indicates that the
1248    /// (non-encrypted) attributes of an item (CFDictionaryRef) should be
1249    /// returned.
1250    ///
1251    /// CFBooleanRef. A value of kCFBooleanTrue indicates that a reference
1252    /// should be returned. Depending on the item class requested, the
1253    /// returned reference(s) may be of type SecKeychainItemRef, SecKeyRef,
1254    /// SecCertificateRef, or SecIdentityRef. Note that returning references is
1255    /// supported only for Certificate, Key or Identity items on iOS, watchOS and
1256    /// tvOS. Similarly, returning references is supported only for Certificate, Key
1257    /// or Identity items on macOS when either kSecUseDataProtectionKeychain
1258    /// is set to true or kSecAttrSynchronizable is set to true.
1259    ///
1260    /// is of type CFBooleanRef. A value of kCFBooleanTrue indicates that a
1261    /// persistent reference to an item (CFDataRef) should be returned.
1262    ///
1263    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecreturndata?language=objc)
1264    pub static kSecReturnData: &'static CFString;
1265}
1266
1267extern "C" {
1268    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecreturnattributes?language=objc)
1269    pub static kSecReturnAttributes: &'static CFString;
1270}
1271
1272extern "C" {
1273    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecreturnref?language=objc)
1274    pub static kSecReturnRef: &'static CFString;
1275}
1276
1277extern "C" {
1278    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecreturnpersistentref?language=objc)
1279    pub static kSecReturnPersistentRef: &'static CFString;
1280}
1281
1282extern "C" {
1283    /// Predefined value type keys used to pass values in a dictionary.
1284    /// You can specify zero or more of these types depending on the function
1285    /// you are calling.  For SecItemCopyMatching or SecItemAdd these are
1286    /// used as keys in the results dictionary.
1287    ///
1288    /// CFDataRef.  For keys and password items, data is secret (encrypted)
1289    /// and may require the user to enter a password for access.
1290    ///
1291    /// on the item class requested, is of type SecKeychainItemRef, SecKeyRef,
1292    /// SecCertificateRef, or SecIdentityRef.
1293    ///
1294    /// is of type CFDataRef.  The bytes in this CFDataRef can be stored by
1295    /// the caller and used on a subsequent invocation of the application (or
1296    /// even a different application) to retrieve the item referenced by it.
1297    ///
1298    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecvaluedata?language=objc)
1299    pub static kSecValueData: &'static CFString;
1300}
1301
1302extern "C" {
1303    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecvalueref?language=objc)
1304    pub static kSecValueRef: &'static CFString;
1305}
1306
1307extern "C" {
1308    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecvaluepersistentref?language=objc)
1309    pub static kSecValuePersistentRef: &'static CFString;
1310}
1311
1312extern "C" {
1313    /// Predefined constants used to set values in a dictionary.
1314    ///
1315    /// CFArray of items. If provided, this array is treated as the set of
1316    /// all possible items to search, or add if the API being called is
1317    /// SecItemAdd. The items in this array may be of type SecKeyRef,
1318    /// SecCertificateRef, SecIdentityRef, or CFDataRef (for a persistent
1319    /// item reference.) The items in the array must all be of the same
1320    /// type. When this attribute is provided, no keychains are searched.
1321    ///
1322    /// keychain reference. You use this key to specify a value of type
1323    /// SecKeychainRef to which SecItemAdd will add the provided item(s).
1324    ///
1325    /// is a CFStringRef that represents a user-visible string describing
1326    /// the operation for which the application is attempting to authenticate.
1327    /// The application is responsible for the text localization.
1328    ///
1329    /// is a CFBooleanRef. If provided with a value of kCFBooleanTrue, the error
1330    /// errSecInteractionNotAllowed will be returned if the item is attempting
1331    /// to authenticate with UI. Note: on macOS, this attribute only applies to items stored
1332    /// in the Data Protection keychain. Legacy keychain items will still activate UI if needed.
1333    ///
1334    /// is one of kSecUseAuthenticationUIAllow, kSecUseAuthenticationUIFail, kSecUseAuthenticationUISkip.
1335    ///
1336    /// is LAContext to be used for keychain item authentication.
1337    /// If the item requires authentication and this key is omitted, a new context
1338    /// will be created just for the purpose of the single call.
1339    /// If the specified context has been previously authenticated, the operation
1340    /// will succeed without asking user for authentication.
1341    /// If the specified context has not been previously authenticated, the new
1342    /// authentication will be started on this context, allowing caller to
1343    /// eventually reuse the successfully authenticated context in subsequent
1344    /// keychain operations.
1345    ///
1346    /// is a CFBooleanRef. Set to kCFBooleanTrue to use kSecAttrAccessGroup and/or
1347    /// kSecAttrAccessible on macOS without requiring the item to be marked synchronizable.
1348    /// Note that when kSecUseDataProtectionKeychain is set to true, returning references is
1349    /// supported only for Certificate, Key or Identity items.
1350    ///
1351    /// indicating whether the item is shared with other personas on the system.
1352    ///
1353    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseitemlist?language=objc)
1354    #[deprecated = "Not implemented on this platform"]
1355    pub static kSecUseItemList: &'static CFString;
1356}
1357
1358extern "C" {
1359    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecusekeychain?language=objc)
1360    pub static kSecUseKeychain: &'static CFString;
1361}
1362
1363extern "C" {
1364    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseoperationprompt?language=objc)
1365    #[deprecated = "Use kSecUseAuthenticationContext and set LAContext.localizedReason property"]
1366    pub static kSecUseOperationPrompt: &'static CFString;
1367}
1368
1369extern "C" {
1370    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecusenoauthenticationui?language=objc)
1371    #[deprecated = "Use kSecUseAuthenticationUI instead."]
1372    pub static kSecUseNoAuthenticationUI: &'static CFString;
1373}
1374
1375extern "C" {
1376    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseauthenticationui?language=objc)
1377    pub static kSecUseAuthenticationUI: &'static CFString;
1378}
1379
1380extern "C" {
1381    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseauthenticationcontext?language=objc)
1382    pub static kSecUseAuthenticationContext: &'static CFString;
1383}
1384
1385extern "C" {
1386    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecusedataprotectionkeychain?language=objc)
1387    pub static kSecUseDataProtectionKeychain: &'static CFString;
1388}
1389
1390extern "C" {
1391    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseuserindependentkeychain?language=objc)
1392    pub static kSecUseUserIndependentKeychain: &'static CFString;
1393}
1394
1395extern "C" {
1396    /// Predefined item attribute constants used to get or set values
1397    /// in a dictionary. The kSecUseAuthenticationUI constant is the key and its
1398    /// value is one of the constants defined here.
1399    /// If the key kSecUseAuthenticationUI not provided then kSecUseAuthenticationUIAllow
1400    /// is used as default.
1401    ///
1402    ///
1403    /// errSecInteractionNotAllowed will be returned if an item needs
1404    /// to authenticate with UI
1405    ///
1406    /// to authenticate with UI will be silently skipped. This value can be used
1407    /// only with SecItemCopyMatching.
1408    ///
1409    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseauthenticationuiallow?language=objc)
1410    #[deprecated = "Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property"]
1411    pub static kSecUseAuthenticationUIAllow: &'static CFString;
1412}
1413
1414extern "C" {
1415    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseauthenticationuifail?language=objc)
1416    #[deprecated = "Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property"]
1417    pub static kSecUseAuthenticationUIFail: &'static CFString;
1418}
1419
1420extern "C" {
1421    /// [Apple's documentation](https://developer.apple.com/documentation/security/ksecuseauthenticationuiskip?language=objc)
1422    pub static kSecUseAuthenticationUISkip: &'static CFString;
1423}
1424
1425extern "C" {
1426    /// Predefined item attribute constant used to get or set values
1427    /// in a dictionary. The kSecAttrTokenID constant is the key and its value
1428    /// can be kSecAttrTokenIDSecureEnclave.
1429    ///
1430    /// token implemented using device's Secure Enclave. The only keychain items
1431    /// supported by the Secure Enclave token are 256-bit elliptic curve keys
1432    /// (kSecAttrKeyTypeECSecPrimeRandom). Keys must be generated on the secure enclave using
1433    /// SecKeyGenerateKeyPair call with kSecAttrTokenID set to
1434    /// kSecAttrTokenIDSecureEnclave in the parameters dictionary, it is not
1435    /// possible to import pregenerated keys to kSecAttrTokenIDSecureEnclave token.
1436    ///
1437    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattrtokenidsecureenclave?language=objc)
1438    pub static kSecAttrTokenIDSecureEnclave: &'static CFString;
1439}
1440
1441extern "C" {
1442    /// which contains items provided by external token (typically smart card).
1443    /// This may be used as a value for kSecAttrAccessGroup attribute. Every
1444    /// application has access to this access group so it is not needed to
1445    /// explicitly list it in keychain-access-groups entitlement, but application
1446    /// must explicitly state this access group in keychain queries in order to
1447    /// be able to access items from external tokens.
1448    ///
1449    /// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecattraccessgrouptoken?language=objc)
1450    pub static kSecAttrAccessGroupToken: &'static CFString;
1451}
1452
1453extern "C-unwind" {
1454    /// Returns one or more items which match a search query.
1455    ///
1456    /// Parameter `query`: A dictionary containing an item class specification and
1457    /// optional attributes for controlling the search. See the "Keychain
1458    /// Search Attributes" section for a description of currently defined
1459    /// search attributes.
1460    ///
1461    /// Parameter `result`: On return, a CFTypeRef reference to the found item(s). The
1462    /// exact type of the result is based on the search attributes supplied
1463    /// in the query, as discussed below.
1464    ///
1465    /// Returns: A result code. See "Security Error Codes" (SecBase.h).
1466    ///
1467    /// Attributes defining a search are specified by adding key/value
1468    /// pairs to the query dictionary.
1469    ///
1470    /// A typical query consists of:
1471    ///
1472    /// a kSecClass key, whose value is a constant from the Class
1473    /// Constants section that specifies the class of item(s) to be searched
1474    /// one or more keys from the "Attribute Key Constants" section, whose value
1475    /// is the attribute data to be matched
1476    /// one or more keys from the "Search Constants" section, whose value is
1477    /// used to further refine the search
1478    /// a key from the "Return Type Key Constants" section, specifying the type of
1479    /// results desired
1480    ///
1481    /// Result types are specified as follows:
1482    ///
1483    /// To obtain the data of a matching item (CFDataRef), specify
1484    /// kSecReturnData with a value of kCFBooleanTrue.
1485    /// To obtain the attributes of a matching item (CFDictionaryRef), specify
1486    /// kSecReturnAttributes with a value of kCFBooleanTrue.
1487    /// To obtain a reference to a matching item (SecKeychainItemRef,
1488    /// SecKeyRef, SecCertificateRef, or SecIdentityRef), specify kSecReturnRef
1489    /// with a value of kCFBooleanTrue. Note that returning references is
1490    /// supported only for Certificate, Key or Identity items on iOS, watchOS and
1491    /// tvOS. Similarly, returning references is supported only for Certificate, Key
1492    /// or Identity items on macOS when either kSecUseDataProtectionKeychain
1493    /// is set to true or kSecAttrSynchronizable is set to true.
1494    /// To obtain a persistent reference to a matching item (CFDataRef),
1495    /// specify kSecReturnPersistentRef with a value of kCFBooleanTrue. Note
1496    /// that unlike normal references, a persistent reference may be stored
1497    /// on disk or passed between processes.
1498    /// If more than one of these result types is specified, the result is
1499    /// returned as a CFDictionaryRef containing all the requested data.
1500    /// If a result type is not specified, no results are returned.
1501    ///
1502    /// By default, this function returns only the first match found. To obtain
1503    /// more than one matching item at a time, specify kSecMatchLimit with a value
1504    /// greater than 1. The result will be a CFArrayRef containing up to that
1505    /// number of matching items; the items' types are described above.
1506    ///
1507    /// To filter a provided list of items down to those matching the query,
1508    /// specify a kSecMatchItemList whose value is a CFArray of SecKeychainItemRef,
1509    /// SecKeyRef, SecCertificateRef, or SecIdentityRef items. The objects in the
1510    /// provided array must be of the same type.
1511    ///
1512    /// On iOS, to convert from a persistent item reference to a normal item reference,
1513    /// specify a kSecValuePersistentRef whose value a CFDataRef (the persistent
1514    /// reference), and a kSecReturnRef whose value is kCFBooleanTrue.
1515    ///
1516    /// On macOS, to convert from persistent item references to normal item references,
1517    /// specify a kSecMatchItemList whose value is a CFArray containing one or
1518    /// more CFDataRef elements (the persistent reference), and a kSecReturnRef
1519    /// whose value is kCFBooleanTrue. The objects in the provided array must be
1520    /// of the same type.
1521    ///
1522    /// # Safety
1523    ///
1524    /// - `query` generics must be of the correct type.
1525    /// - `result` must be a valid pointer or null.
1526    pub fn SecItemCopyMatching(query: &CFDictionary, result: *mut *const CFType) -> OSStatus;
1527}
1528
1529extern "C-unwind" {
1530    /// Add one or more items to a keychain.
1531    ///
1532    /// Parameter `attributes`: A dictionary containing an item class specification and
1533    /// optional entries specifying the item's attribute values. See the
1534    /// "Attribute Key Constants" section for a description of currently defined
1535    /// attributes.
1536    ///
1537    /// Parameter `result`: On return, a CFTypeRef reference to the newly added item(s).
1538    /// The exact type of the result is based on the values supplied
1539    /// in attributes, as discussed below. Pass NULL if this result is not
1540    /// required.
1541    ///
1542    /// Returns: A result code. See "Security Error Codes" (SecBase.h).
1543    ///
1544    /// Attributes defining an item are specified by adding key/value
1545    /// pairs to the attributes dictionary.  To add multiple items to a keychain
1546    /// at once use the kSecUseItemList key with an array of items as its value.
1547    /// This is currently only supported for non password items.
1548    ///
1549    /// On macOS, to add an item to a particular keychain, supply kSecUseKeychain
1550    /// with a SecKeychainRef as its value.
1551    ///
1552    /// On iOS, watchOS
1553    /// &
1554    /// tvOS, Certificate, Key, and Identity items may be
1555    /// added by reference, but neither Internet Passwords nor Generic Passwords
1556    /// may be. Similarly, on macOS with either kSecUseDataProtectionKeychain
1557    /// set to true or kSecAttrSynchronizable set to true, Certificate, Key, and Identity
1558    /// items may be added by reference, but neither Internet Passwords nor Generic
1559    /// Passwords may be.
1560    ///
1561    /// Result types are specified as follows:
1562    ///
1563    /// To obtain the data of the added item (CFDataRef), specify
1564    /// kSecReturnData with a value of kCFBooleanTrue.
1565    /// To obtain all the attributes of the added item (CFDictionaryRef),
1566    /// specify kSecReturnAttributes with a value of kCFBooleanTrue.
1567    /// To obtain a reference to the added item (SecKeychainItemRef, SecKeyRef,
1568    /// SecCertificateRef, or SecIdentityRef), specify kSecReturnRef with a
1569    /// value of kCFBooleanTrue. See also note about kSecReturnRef and
1570    /// macOS.
1571    /// To obtain a persistent reference to the added item (CFDataRef), specify
1572    /// kSecReturnPersistentRef with a value of kCFBooleanTrue. Note that
1573    /// unlike normal references, a persistent reference may be stored on disk
1574    /// or passed between processes.
1575    /// If more than one of these result types is specified, the result is
1576    /// returned as a CFDictionaryRef containing all the requested data.
1577    /// On iOS, if a result type is not specified, no results are returned.
1578    /// On macOS, the added item is returned.
1579    ///
1580    /// # Safety
1581    ///
1582    /// - `attributes` generics must be of the correct type.
1583    /// - `result` must be a valid pointer or null.
1584    pub fn SecItemAdd(attributes: &CFDictionary, result: *mut *const CFType) -> OSStatus;
1585}
1586
1587extern "C-unwind" {
1588    /// Modify zero or more items which match a search query.
1589    ///
1590    /// Parameter `query`: A dictionary containing an item class specification and
1591    /// optional attributes for controlling the search. See the "Attribute
1592    /// Constants" and "Search Constants" sections for a description of
1593    /// currently defined search attributes.
1594    ///
1595    /// Parameter `attributesToUpdate`: A dictionary containing one or more attributes
1596    /// whose values should be set to the ones specified. Only real keychain
1597    /// attributes are permitted in this dictionary (no "meta" attributes are
1598    /// allowed.) See the "Attribute Key Constants" section for a description of
1599    /// currently defined value attributes.
1600    ///
1601    /// Returns: A result code. See "Security Error Codes" (SecBase.h).
1602    ///
1603    /// Attributes defining a search are specified by adding key/value
1604    /// pairs to the query dictionary.
1605    ///
1606    /// # Safety
1607    ///
1608    /// - `query` generics must be of the correct type.
1609    /// - `attributes_to_update` generics must be of the correct type.
1610    pub fn SecItemUpdate(query: &CFDictionary, attributes_to_update: &CFDictionary) -> OSStatus;
1611}
1612
1613extern "C-unwind" {
1614    /// Delete zero or more items which match a search query.
1615    ///
1616    /// Parameter `query`: A dictionary containing an item class specification and
1617    /// optional attributes for controlling the search. See the "Attribute
1618    /// Constants" and "Search Constants" sections for a description of
1619    /// currently defined search attributes.
1620    ///
1621    /// Returns: A result code.  See "Security Error Codes" (SecBase.h).
1622    ///
1623    /// Attributes defining a search are specified by adding key/value
1624    /// pairs to the query dictionary.
1625    ///
1626    /// By default, this function deletes all items matching the specified query.
1627    /// You can change this behavior by specifying one of the follow keys:
1628    ///
1629    /// To delete an item identified by a transient reference, on iOS, specify
1630    /// kSecValueRef with a item reference. On macOS, give a kSecMatchItemList
1631    /// containing an item reference.
1632    /// To delete an item identified by a persistent reference, on iOS, specify
1633    /// kSecValuePersistentRef with a persistent reference returned by
1634    /// using the kSecReturnPersistentRef key to SecItemCopyMatching or
1635    /// SecItemAdd. On macOS, use kSecMatchItemList with a persistent reference
1636    /// returned by using the kSecReturnPersistentRef key with
1637    /// SecItemCopyMatching or SecItemAdd.
1638    /// To delete multiple items specify kSecMatchItemList with an array
1639    /// of references.
1640    /// If more than one of these result keys is specified, the behavior is
1641    /// undefined.
1642    ///
1643    /// # Safety
1644    ///
1645    /// `query` generics must be of the correct type.
1646    pub fn SecItemDelete(query: &CFDictionary) -> OSStatus;
1647}