peachsim 0.1.1692 → 0.1.1700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +18273 -15925
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +2349 -1778
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +7885 -3334
- package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +297 -77
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +294 -74
- package/dist-lib/native-app-identity-project.cjs +48 -37
- package/dist-lib/native-app-identity-project.mjs +47 -36
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib.json +199 -79
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +19600 -15992
- package/dist-lib/swift-compile.cjs +640 -402
- package/dist-lib/swift-compile.mjs +595 -357
- package/dist-lib/swift-package.cjs +24 -20
- package/dist-lib/swift-package.mjs +23 -19
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +1559 -1208
- package/dist-lib/vite.cjs +251 -42
- package/dist-lib/worklet-executable.cjs +2 -2
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -0
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +68 -12
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -22
- package/src/nitro-compile.ts +32 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +168 -48
- package/src/swift-coverage/xcode-assets.ts +4 -3
- package/src/swift-host.ts +14 -3
- package/src/swift-objc-compile.ts +32 -5
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +43 -13
- package/src/swift-package.ts +33 -26
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +68 -19
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +8 -0
- package/src/vite-plugin.ts +0 -10
- package/src/xcode-project.ts +62 -42
- package/src/settings-flags.ts +0 -107
|
@@ -1,30 +1,1285 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2006-2014 Apple Inc. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
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
|
|
11
|
+
* file.
|
|
12
|
+
*
|
|
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.
|
|
20
|
+
*
|
|
21
|
+
* @APPLE_LICENSE_HEADER_END@
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/*!
|
|
25
|
+
@header SecItem
|
|
26
|
+
SecItem defines CoreFoundation-based constants and functions for
|
|
27
|
+
access to Security items (certificates, keys, identities, and
|
|
28
|
+
passwords.)
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#ifndef _SECURITY_SECITEM_H_
|
|
32
|
+
#define _SECURITY_SECITEM_H_
|
|
33
|
+
|
|
2
34
|
#include <Security/SecBase.h>
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
extern const CFStringRef
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
#include <CoreFoundation/CFNumber.h>
|
|
36
|
+
#include <CoreFoundation/CFArray.h>
|
|
37
|
+
#include <CoreFoundation/CFDictionary.h>
|
|
38
|
+
|
|
39
|
+
__BEGIN_DECLS
|
|
40
|
+
|
|
41
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
42
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
43
|
+
|
|
44
|
+
/*!
|
|
45
|
+
@enum Class Key Constant
|
|
46
|
+
@discussion Predefined key constant used to get or set item class values in
|
|
47
|
+
a dictionary. Its value is one of the constants defined in the Value
|
|
48
|
+
Constants for kSecClass.
|
|
49
|
+
@constant kSecClass Specifies a dictionary key whose value is the item's
|
|
50
|
+
class code. You use this key to get or set a value of type CFTypeRef
|
|
51
|
+
that contains the item class code.
|
|
52
|
+
*/
|
|
53
|
+
extern const CFStringRef kSecClass
|
|
54
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
55
|
+
|
|
56
|
+
/*!
|
|
57
|
+
@enum Class Value Constants
|
|
58
|
+
@discussion Predefined item class constants used to get or set values in
|
|
59
|
+
a dictionary. The kSecClass constant is the key and its value is one
|
|
60
|
+
of the constants defined here. Note: on Mac OS X 10.6, only items
|
|
61
|
+
of class kSecClassInternetPassword are supported.
|
|
62
|
+
@constant kSecClassInternetPassword Specifies Internet password items.
|
|
63
|
+
@constant kSecClassGenericPassword Specifies generic password items.
|
|
64
|
+
@constant kSecClassCertificate Specifies certificate items.
|
|
65
|
+
@constant kSecClassKey Specifies key items.
|
|
66
|
+
@constant kSecClassIdentity Specifies identity items.
|
|
67
|
+
*/
|
|
68
|
+
extern const CFStringRef kSecClassInternetPassword
|
|
69
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
70
|
+
extern const CFStringRef kSecClassGenericPassword
|
|
71
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
72
|
+
extern const CFStringRef kSecClassCertificate
|
|
73
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
74
|
+
extern const CFStringRef kSecClassKey
|
|
75
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
76
|
+
extern const CFStringRef kSecClassIdentity
|
|
77
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
78
|
+
|
|
79
|
+
/*!
|
|
80
|
+
@enum Attribute Key Constants
|
|
81
|
+
@discussion Predefined item attribute keys used to get or set values in a
|
|
82
|
+
dictionary. Not all attributes apply to each item class. The table
|
|
83
|
+
below lists the currently defined attributes for each item class:
|
|
84
|
+
|
|
85
|
+
kSecClassGenericPassword item attributes:
|
|
86
|
+
kSecAttrAccess (macOS only)
|
|
87
|
+
kSecAttrAccessControl
|
|
88
|
+
kSecAttrAccessGroup (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
|
|
89
|
+
kSecAttrAccessible (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
|
|
90
|
+
kSecAttrCreationDate
|
|
91
|
+
kSecAttrModificationDate
|
|
92
|
+
kSecAttrDescription
|
|
93
|
+
kSecAttrComment
|
|
94
|
+
kSecAttrCreator
|
|
95
|
+
kSecAttrType
|
|
96
|
+
kSecAttrLabel
|
|
97
|
+
kSecAttrIsInvisible
|
|
98
|
+
kSecAttrIsNegative
|
|
99
|
+
kSecAttrAccount
|
|
100
|
+
kSecAttrService
|
|
101
|
+
kSecAttrGeneric
|
|
102
|
+
kSecAttrSynchronizable
|
|
103
|
+
|
|
104
|
+
kSecClassInternetPassword item attributes:
|
|
105
|
+
kSecAttrAccess (macOS only)
|
|
106
|
+
kSecAttrAccessControl
|
|
107
|
+
kSecAttrAccessGroup (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
|
|
108
|
+
kSecAttrAccessible (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
|
|
109
|
+
kSecAttrCreationDate
|
|
110
|
+
kSecAttrModificationDate
|
|
111
|
+
kSecAttrDescription
|
|
112
|
+
kSecAttrComment
|
|
113
|
+
kSecAttrCreator
|
|
114
|
+
kSecAttrType
|
|
115
|
+
kSecAttrLabel
|
|
116
|
+
kSecAttrIsInvisible
|
|
117
|
+
kSecAttrIsNegative
|
|
118
|
+
kSecAttrAccount
|
|
119
|
+
kSecAttrSecurityDomain
|
|
120
|
+
kSecAttrServer
|
|
121
|
+
kSecAttrProtocol
|
|
122
|
+
kSecAttrAuthenticationType
|
|
123
|
+
kSecAttrPort
|
|
124
|
+
kSecAttrPath
|
|
125
|
+
kSecAttrSynchronizable
|
|
126
|
+
|
|
127
|
+
kSecClassCertificate item attributes:
|
|
128
|
+
kSecAttrAccessible (iOS only)
|
|
129
|
+
kSecAttrAccessControl (iOS only)
|
|
130
|
+
kSecAttrAccessGroup (iOS only)
|
|
131
|
+
kSecAttrCertificateType
|
|
132
|
+
kSecAttrCertificateEncoding
|
|
133
|
+
kSecAttrLabel
|
|
134
|
+
kSecAttrSubject
|
|
135
|
+
kSecAttrIssuer
|
|
136
|
+
kSecAttrSerialNumber
|
|
137
|
+
kSecAttrSubjectKeyID
|
|
138
|
+
kSecAttrPublicKeyHash
|
|
139
|
+
kSecAttrSynchronizable
|
|
140
|
+
|
|
141
|
+
kSecClassKey item attributes:
|
|
142
|
+
kSecAttrAccess (macOS only)
|
|
143
|
+
kSecAttrAccessControl
|
|
144
|
+
kSecAttrAccessGroup (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
|
|
145
|
+
kSecAttrAccessible (iOS; also macOS if kSecAttrSynchronizable and/or kSecUseDataProtectionKeychain set)
|
|
146
|
+
kSecAttrKeyClass
|
|
147
|
+
kSecAttrLabel
|
|
148
|
+
kSecAttrApplicationLabel
|
|
149
|
+
kSecAttrIsPermanent
|
|
150
|
+
kSecAttrApplicationTag
|
|
151
|
+
kSecAttrKeyType
|
|
152
|
+
kSecAttrPRF (macOS only)
|
|
153
|
+
kSecAttrSalt (macOS only)
|
|
154
|
+
kSecAttrRounds (macOS only)
|
|
155
|
+
kSecAttrKeySizeInBits
|
|
156
|
+
kSecAttrEffectiveKeySize
|
|
157
|
+
kSecAttrCanEncrypt
|
|
158
|
+
kSecAttrCanDecrypt
|
|
159
|
+
kSecAttrCanDerive
|
|
160
|
+
kSecAttrCanSign
|
|
161
|
+
kSecAttrCanVerify
|
|
162
|
+
kSecAttrCanWrap
|
|
163
|
+
kSecAttrCanUnwrap
|
|
164
|
+
kSecAttrSynchronizable
|
|
165
|
+
|
|
166
|
+
Note that the attributes kSecAttrCan* describe attributes of the
|
|
167
|
+
key itself at relatively high level. Some of these attributes are
|
|
168
|
+
mathematical -- for example, a DSA key cannot encrypt. Others are
|
|
169
|
+
key-level policy issues -- for example, it is good cryptographic
|
|
170
|
+
hygiene to use an RSA key either for encryption or signing but not
|
|
171
|
+
both. Compare these to the certificate-level policy values in
|
|
172
|
+
SecPolicy.h.
|
|
173
|
+
|
|
174
|
+
kSecClassIdentity item attributes:
|
|
175
|
+
Since an identity is the combination of a private key and a
|
|
176
|
+
certificate, this class shares attributes of both kSecClassKey and
|
|
177
|
+
kSecClassCertificate.
|
|
178
|
+
|
|
179
|
+
@constant kSecAttrAccessible Specifies a dictionary key whose value
|
|
180
|
+
indicates when your application needs access to an item's data. You
|
|
181
|
+
should choose the most restrictive option that meets your application's
|
|
182
|
+
needs to allow the system to protect that item in the best way possible.
|
|
183
|
+
See the "kSecAttrAccessible Value Constants" section for a list of
|
|
184
|
+
values which can be specified.
|
|
185
|
+
IMPORTANT: This attribute is currently not supported for macOS keychain
|
|
186
|
+
items, unless the kSecAttrSynchronizable attribute is also present. If
|
|
187
|
+
both attributes are specified on either macOS or iOS, the value for the
|
|
188
|
+
kSecAttrAccessible key may only be one whose name does not end with
|
|
189
|
+
"ThisDeviceOnly", as those cannot sync to another device.
|
|
190
|
+
|
|
191
|
+
@constant kSecAttrAccessControl Specifies a dictionary key whose value
|
|
192
|
+
is SecAccessControl instance which contains access control conditions
|
|
193
|
+
for item.
|
|
194
|
+
IMPORTANT: This attribute is mutually exclusive with kSecAttrAccess
|
|
195
|
+
attribute.
|
|
196
|
+
|
|
197
|
+
@constant kSecAttrAccess Specifies a dictionary key whose value
|
|
198
|
+
is a SecAccessRef describing the access control settings for this item.
|
|
199
|
+
This key is available on macOS only.
|
|
200
|
+
|
|
201
|
+
@constant kSecAttrAccessGroup Specifies a dictionary key whose value is
|
|
202
|
+
a CFStringRef indicating which access group a item is in. The access
|
|
203
|
+
groups that a particular application has membership in are determined by
|
|
204
|
+
two entitlements for that application. The application-identifier
|
|
205
|
+
entitlement contains the application's single access group, unless
|
|
206
|
+
there is a keychain-access-groups entitlement present. The latter
|
|
207
|
+
has as its value a list of access groups; the first item in this list
|
|
208
|
+
is the default access group. Unless a specific access group is provided
|
|
209
|
+
as the value of kSecAttrAccessGroup when SecItemAdd is called, new items
|
|
210
|
+
are created in the application's default access group. Specifying this
|
|
211
|
+
attribute in SecItemCopyMatching, SecItemUpdate, or SecItemDelete calls
|
|
212
|
+
limits the search to the specified access group (of which the calling
|
|
213
|
+
application must be a member to obtain matching results.) To share
|
|
214
|
+
keychain items between multiple applications, each application must have
|
|
215
|
+
a common group listed in its keychain-access-groups entitlement, and each
|
|
216
|
+
must specify this shared access group name as the value for the
|
|
217
|
+
kSecAttrAccessGroup key in the dictionary passed to SecItem functions.
|
|
218
|
+
|
|
219
|
+
@constant kSecAttrSynchronizable Specifies a dictionary key whose value is
|
|
220
|
+
a CFBooleanRef indicating whether the item in question can be synchronized.
|
|
221
|
+
To add a new item which can be synced to other devices, or to obtain
|
|
222
|
+
synchronizable results from a query, supply this key with a value of
|
|
223
|
+
kCFBooleanTrue. If the key is not supplied, or has a value of
|
|
224
|
+
kCFBooleanFalse, then no synchronizable items will be added or returned.
|
|
225
|
+
A predefined value, kSecAttrSynchronizableAny, may be provided instead of
|
|
226
|
+
kCFBooleanTrue if both synchronizable and non-synchronizable results are
|
|
227
|
+
desired.
|
|
228
|
+
|
|
229
|
+
IMPORTANT: Specifying the kSecAttrSynchronizable key has several caveats:
|
|
230
|
+
|
|
231
|
+
- Updating or deleting items using the kSecAttrSynchronizable key will
|
|
232
|
+
affect all copies of the item, not just the one on your local device.
|
|
233
|
+
Be sure that it makes sense to use the same password on all devices
|
|
234
|
+
before deciding to make a password synchronizable.
|
|
235
|
+
- Starting in iOS 14, macOS 11, and watchOS 7, the keychain
|
|
236
|
+
synchronizes passwords, certificates, and cryptographic keys.
|
|
237
|
+
Earlier OS versions synchronize only passwords.
|
|
238
|
+
- Items stored or obtained using the kSecAttrSynchronizable key cannot
|
|
239
|
+
specify SecAccessRef-based access control with kSecAttrAccess. If a
|
|
240
|
+
password is intended to be shared between multiple applications, the
|
|
241
|
+
kSecAttrAccessGroup key must be specified, and each application
|
|
242
|
+
using this password must have a 'keychain-access-groups' entitlement
|
|
243
|
+
with the specified access group value.
|
|
244
|
+
- Items stored or obtained using the kSecAttrSynchronizable key may
|
|
245
|
+
not also specify a kSecAttrAccessible value which is incompatible
|
|
246
|
+
with syncing (namely, those whose names end with "ThisDeviceOnly".)
|
|
247
|
+
- On macOS, when kSecAttrSynchronizable is set to true, returning
|
|
248
|
+
references is supported only for Certificate, Key or Identity items.
|
|
249
|
+
- Persistent references to synchronizable items should be avoided;
|
|
250
|
+
while they may work locally, they cannot be moved between devices,
|
|
251
|
+
and may not resolve if the item is modified on some other device.
|
|
252
|
+
- When specifying a query that uses the kSecAttrSynchronizable key,
|
|
253
|
+
search keys are limited to the item's class and attributes.
|
|
254
|
+
The only search constant which may be used is kSecMatchLimit; other
|
|
255
|
+
constants using the kSecMatch prefix are not supported at this time.
|
|
256
|
+
|
|
257
|
+
@constant kSecAttrSynchronizableAny Specifies that both synchronizable and
|
|
258
|
+
non-synchronizable results should be returned from this query. This may be
|
|
259
|
+
used as a value for the kSecAttrSynchronizable dictionary key in a call to
|
|
260
|
+
SecItemCopyMatching, SecItemUpdate, or SecItemDelete.
|
|
261
|
+
|
|
262
|
+
@constant kSecAttrCreationDate (read-only) Specifies a dictionary key whose
|
|
263
|
+
value is the item's creation date. You use this key to get a value
|
|
264
|
+
of type CFDateRef that represents the date the item was created.
|
|
265
|
+
@constant kSecAttrModificationDate (read-only) Specifies a dictionary key
|
|
266
|
+
whose value is the item's modification date. You use this key to get
|
|
267
|
+
a value of type CFDateRef that represents the last time the item was
|
|
268
|
+
updated.
|
|
269
|
+
@constant kSecAttrDescription Specifies a dictionary key whose value is
|
|
270
|
+
the item's description attribute. You use this key to set or get a
|
|
271
|
+
value of type CFStringRef that represents a user-visible string
|
|
272
|
+
describing this particular kind of item (e.g., "disk image password").
|
|
273
|
+
@constant kSecAttrComment Specifies a dictionary key whose value is the
|
|
274
|
+
item's comment attribute. You use this key to set or get a value of
|
|
275
|
+
type CFStringRef containing the user-editable comment for this item.
|
|
276
|
+
@constant kSecAttrCreator Specifies a dictionary key whose value is the
|
|
277
|
+
item's creator attribute. You use this key to set or get a value of
|
|
278
|
+
type CFNumberRef that represents the item's creator. This number is
|
|
279
|
+
the unsigned integer representation of a four-character code (e.g.,
|
|
280
|
+
'aCrt').
|
|
281
|
+
@constant kSecAttrType Specifies a dictionary key whose value is the item's
|
|
282
|
+
type attribute. You use this key to set or get a value of type
|
|
283
|
+
CFNumberRef that represents the item's type. This number is the
|
|
284
|
+
unsigned integer representation of a four-character code (e.g.,
|
|
285
|
+
'aTyp').
|
|
286
|
+
@constant kSecAttrLabel Specifies a dictionary key whose value is the
|
|
287
|
+
item's label attribute. You use this key to set or get a value of
|
|
288
|
+
type CFStringRef containing the user-visible label for this item.
|
|
289
|
+
@constant kSecAttrIsInvisible Specifies a dictionary key whose value is the
|
|
290
|
+
item's invisible attribute. You use this key to set or get a value
|
|
291
|
+
of type CFBooleanRef that indicates whether the item is invisible
|
|
292
|
+
(i.e., should not be displayed.)
|
|
293
|
+
@constant kSecAttrIsNegative Specifies a dictionary key whose value is the
|
|
294
|
+
item's negative attribute. You use this key to set or get a value of
|
|
295
|
+
type CFBooleanRef that indicates whether there is a valid password
|
|
296
|
+
associated with this keychain item. This is useful if your application
|
|
297
|
+
doesn't want a password for some particular service to be stored in
|
|
298
|
+
the keychain, but prefers that it always be entered by the user.
|
|
299
|
+
@constant kSecAttrAccount Specifies a dictionary key whose value is the
|
|
300
|
+
item's account attribute. You use this key to set or get a CFStringRef
|
|
301
|
+
that contains an account name. (Items of class
|
|
302
|
+
kSecClassGenericPassword, kSecClassInternetPassword have this
|
|
303
|
+
attribute.)
|
|
304
|
+
@constant kSecAttrService Specifies a dictionary key whose value is the
|
|
305
|
+
item's service attribute. You use this key to set or get a CFStringRef
|
|
306
|
+
that represents the service associated with this item. (Items of class
|
|
307
|
+
kSecClassGenericPassword have this attribute.)
|
|
308
|
+
@constant kSecAttrGeneric Specifies a dictionary key whose value is the
|
|
309
|
+
item's generic attribute. You use this key to set or get a value of
|
|
310
|
+
CFDataRef that contains a user-defined attribute. (Items of class
|
|
311
|
+
kSecClassGenericPassword have this attribute.)
|
|
312
|
+
@constant kSecAttrSecurityDomain Specifies a dictionary key whose value
|
|
313
|
+
is the item's security domain attribute. You use this key to set or
|
|
314
|
+
get a CFStringRef value that represents the Internet security domain.
|
|
315
|
+
(Items of class kSecClassInternetPassword have this attribute.)
|
|
316
|
+
@constant kSecAttrServer Specifies a dictionary key whose value is the
|
|
317
|
+
item's server attribute. You use this key to set or get a value of
|
|
318
|
+
type CFStringRef that contains the server's domain name or IP address.
|
|
319
|
+
(Items of class kSecClassInternetPassword have this attribute.)
|
|
320
|
+
@constant kSecAttrProtocol Specifies a dictionary key whose value is the
|
|
321
|
+
item's protocol attribute. You use this key to set or get a value of
|
|
322
|
+
type CFNumberRef that denotes the protocol for this item (see the
|
|
323
|
+
SecProtocolType enum in SecKeychainItem.h). (Items of class
|
|
324
|
+
kSecClassInternetPassword have this attribute.)
|
|
325
|
+
@constant kSecAttrAuthenticationType Specifies a dictionary key whose value
|
|
326
|
+
is the item's authentication type attribute. You use this key to set
|
|
327
|
+
or get a value of type CFNumberRef that denotes the authentication
|
|
328
|
+
scheme for this item (see the kSecAttrAuthenticationType value
|
|
329
|
+
constants below).
|
|
330
|
+
@constant kSecAttrPort Specifies a dictionary key whose value is the item's
|
|
331
|
+
port attribute. You use this key to set or get a CFNumberRef value
|
|
332
|
+
that represents an Internet port number. (Items of class
|
|
333
|
+
kSecClassInternetPassword have this attribute.)
|
|
334
|
+
@constant kSecAttrPath Specifies a dictionary key whose value is the item's
|
|
335
|
+
path attribute, typically this is the path component of the URL. You use
|
|
336
|
+
this key to set or get a CFStringRef value that represents a path. (Items
|
|
337
|
+
of class kSecClassInternetPassword have this attribute.)
|
|
338
|
+
@constant kSecAttrSubject (read-only) Specifies a dictionary key whose
|
|
339
|
+
value is the item's subject. You use this key to get a value of type
|
|
340
|
+
CFDataRef that contains the X.500 subject name of a certificate.
|
|
341
|
+
(Items of class kSecClassCertificate have this attribute.)
|
|
342
|
+
@constant kSecAttrIssuer (read-only) Specifies a dictionary key whose value
|
|
343
|
+
is the item's issuer. You use this key to get a value of type
|
|
344
|
+
CFDataRef that contains the X.500 issuer name of a certificate. (Items
|
|
345
|
+
of class kSecClassCertificate have this attribute.)
|
|
346
|
+
@constant kSecAttrSerialNumber (read-only) Specifies a dictionary key whose
|
|
347
|
+
value is the item's serial number. You use this key to get a value
|
|
348
|
+
of type CFDataRef that contains the serial number data of a
|
|
349
|
+
certificate. (Items of class kSecClassCertificate have this
|
|
350
|
+
attribute.)
|
|
351
|
+
@constant kSecAttrSubjectKeyID (read-only) Specifies a dictionary key whose
|
|
352
|
+
value is the item's subject key ID. You use this key to get a value
|
|
353
|
+
of type CFDataRef that contains the subject key ID of a certificate.
|
|
354
|
+
(Items of class kSecClassCertificate have this attribute.)
|
|
355
|
+
@constant kSecAttrPublicKeyHash (read-only) Specifies a dictionary key
|
|
356
|
+
whose value is the item's public key hash. You use this key to get a
|
|
357
|
+
value of type CFDataRef that contains the hash of a certificate's
|
|
358
|
+
public key. (Items of class kSecClassCertificate have this attribute.)
|
|
359
|
+
@constant kSecAttrCertificateType (read-only) Specifies a dictionary key
|
|
360
|
+
whose value is the item's certificate type. You use this key to get
|
|
361
|
+
a value of type CFNumberRef that denotes the certificate type
|
|
362
|
+
(On iOS, currently the value of this attribute must be equal to the
|
|
363
|
+
version of the X509 certificate. So, 1 for v1, 2 for v2, and 3 for v3
|
|
364
|
+
certificates). (On macOS, see the CSSM_CERT_TYPE enum in cssmtype.h).
|
|
365
|
+
Only items of class kSecClassCertificate have this attribute.
|
|
366
|
+
@constant kSecAttrCertificateEncoding (read-only) Specifies a dictionary
|
|
367
|
+
key whose value is the item's certificate encoding. You use this key
|
|
368
|
+
to get a value of type CFNumberRef that denotes the certificate
|
|
369
|
+
encoding (On iOS, currently only the value 3 meaning
|
|
370
|
+
kSecAttrCertificateEncodingDER is supported). On macOS, see the
|
|
371
|
+
CSSM_CERT_ENCODING enum in cssmtype.h. Only items of class
|
|
372
|
+
kSecClassCertificate have this attribute.
|
|
373
|
+
@constant kSecAttrKeyClass (read only) Specifies a dictionary key whose
|
|
374
|
+
value is one of kSecAttrKeyClassPublic, kSecAttrKeyClassPrivate or
|
|
375
|
+
kSecAttrKeyClassSymmetric.
|
|
376
|
+
@constant kSecAttrApplicationLabel Specifies a dictionary key whose value
|
|
377
|
+
is the key's application label attribute. This is different from the
|
|
378
|
+
kSecAttrLabel (which is intended to be human-readable). This attribute
|
|
379
|
+
is used to look up a key programmatically; in particular, for keys of
|
|
380
|
+
class kSecAttrKeyClassPublic and kSecAttrKeyClassPrivate, the value of
|
|
381
|
+
this attribute is the hash of the public key. This item is a type of CFDataRef.
|
|
382
|
+
Legacy keys may contain a UUID in this field as a CFStringRef.
|
|
383
|
+
@constant kSecAttrIsPermanent Specifies a dictionary key whose value is a
|
|
384
|
+
CFBooleanRef indicating whether the key in question will be stored
|
|
385
|
+
permanently.
|
|
386
|
+
@constant kSecAttrIsSensitive Specifies a dictionary key whose value is a
|
|
387
|
+
CFBooleanRef indicating that the key in question can only be exported
|
|
388
|
+
in a wrapped (encrypted) format. macOS only.
|
|
389
|
+
@constant kSecAttrIsExtractable Specifies a dictionary key whose value is a
|
|
390
|
+
CFBooleanRef indicating whether the key in question can be exported from
|
|
391
|
+
its keychain container. macOS only.
|
|
392
|
+
@constant kSecAttrApplicationTag Specifies a dictionary key whose value is a
|
|
393
|
+
CFDataRef containing private tag data.
|
|
394
|
+
@constant kSecAttrKeyType Specifies a dictionary key whose value is a
|
|
395
|
+
CFNumberRef indicating the algorithm associated with this key
|
|
396
|
+
(On iOS, currently only the value 42 is supported, alternatively you can use
|
|
397
|
+
kSecAttrKeyTypeRSA). (On macOS, see the CSSM_ALGORITHMS enum in cssmtype.h).
|
|
398
|
+
|
|
399
|
+
@constant kSecAttrPRF Specifies a dictionary key whose value is the PRF
|
|
400
|
+
(pseudo-random function) for this key (see "kSecAttrPRF Value Constants".)
|
|
401
|
+
macOS only.
|
|
402
|
+
@constant kSecAttrSalt Specifies a dictionary key whose value is a
|
|
403
|
+
CFData containing the salt to use for this key. macOS only.
|
|
404
|
+
@constant kSecAttrRounds Specifies a dictionary key whose value is the
|
|
405
|
+
number of rounds for the pseudo-random function specified by kSecAttrPRF.
|
|
406
|
+
macOS only.
|
|
407
|
+
@constant kSecAttrKeySizeInBits Specifies a dictionary key whose value
|
|
408
|
+
is a CFNumberRef indicating the number of bits in this key.
|
|
409
|
+
@constant kSecAttrEffectiveKeySize Specifies a dictionary key whose value
|
|
410
|
+
is a CFNumberRef indicating the effective number of bits in this key.
|
|
411
|
+
For example, a DES key has a kSecAttrKeySizeInBits of 64, but a
|
|
412
|
+
kSecAttrEffectiveKeySize of 56 bits.
|
|
413
|
+
@constant kSecAttrCanEncrypt Specifies a dictionary key whole value is a
|
|
414
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
415
|
+
encrypt data.
|
|
416
|
+
@constant kSecAttrCanDecrypt Specifies a dictionary key whose value is a
|
|
417
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
418
|
+
decrypt data.
|
|
419
|
+
@constant kSecAttrCanDerive Specifies a dictionary key whole value is a
|
|
420
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
421
|
+
derive another key.
|
|
422
|
+
@constant kSecAttrCanSign Specifies a dictionary key whole value is a
|
|
423
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
424
|
+
create a digital signature.
|
|
425
|
+
@constant kSecAttrCanVerify Specifies a dictionary key whole value is a
|
|
426
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
427
|
+
verify a digital signature.
|
|
428
|
+
@constant kSecAttrCanWrap Specifies a dictionary key whole value is a
|
|
429
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
430
|
+
wrap another key.
|
|
431
|
+
@constant kSecAttrCanUnwrap Specifies a dictionary key whole value is a
|
|
432
|
+
CFBooleanRef indicating whether the key in question can be used to
|
|
433
|
+
unwrap another key.
|
|
434
|
+
@constant kSecAttrSyncViewHint Specifies a dictionary key whose value is
|
|
435
|
+
a CFStringRef. This value is part of the primary key of each item, and
|
|
436
|
+
can be used to help distiguish Sync Views when defining their
|
|
437
|
+
queries. iOS and sychronizable items only.
|
|
438
|
+
@constant kSecAttrTokenID Specifies a dictionary key whose presence
|
|
439
|
+
indicates that item is backed by external token. Value of this attribute
|
|
440
|
+
is CFStringRef uniquely identifying containing token. When this attribute
|
|
441
|
+
is not present, item is stored in internal keychain database.
|
|
442
|
+
Note that once item is created, this attribute cannot be changed - in other
|
|
443
|
+
words it is not possible to migrate existing items to, from or between tokens.
|
|
444
|
+
Currently the only available value for this attribute is
|
|
445
|
+
kSecAttrTokenIDSecureEnclave, which indicates that item (private key) is
|
|
446
|
+
backed by device's Secure Enclave.
|
|
447
|
+
*/
|
|
448
|
+
extern const CFStringRef kSecAttrAccessible
|
|
449
|
+
API_AVAILABLE(macos(10.9), ios(4.0));
|
|
450
|
+
extern const CFStringRef kSecAttrAccess
|
|
451
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
452
|
+
extern const CFStringRef kSecAttrAccessControl
|
|
453
|
+
API_AVAILABLE(macos(10.10), ios(8.0));
|
|
454
|
+
extern const CFStringRef kSecAttrAccessGroup
|
|
455
|
+
API_AVAILABLE(macos(10.9), ios(3.0));
|
|
456
|
+
extern const CFStringRef kSecAttrSynchronizable
|
|
457
|
+
API_AVAILABLE(macos(10.9), ios(7.0));
|
|
458
|
+
extern const CFStringRef kSecAttrSynchronizableAny
|
|
459
|
+
API_AVAILABLE(macos(10.9), ios(7.0));
|
|
460
|
+
extern const CFStringRef kSecAttrCreationDate
|
|
461
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
462
|
+
extern const CFStringRef kSecAttrModificationDate
|
|
463
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
464
|
+
extern const CFStringRef kSecAttrDescription
|
|
465
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
466
|
+
extern const CFStringRef kSecAttrComment
|
|
467
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
468
|
+
extern const CFStringRef kSecAttrCreator
|
|
469
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
470
|
+
extern const CFStringRef kSecAttrType
|
|
471
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
472
|
+
extern const CFStringRef kSecAttrLabel
|
|
473
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
474
|
+
extern const CFStringRef kSecAttrIsInvisible
|
|
475
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
476
|
+
extern const CFStringRef kSecAttrIsNegative
|
|
477
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
478
|
+
extern const CFStringRef kSecAttrAccount
|
|
479
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
480
|
+
extern const CFStringRef kSecAttrService
|
|
481
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
482
|
+
extern const CFStringRef kSecAttrGeneric
|
|
483
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
484
|
+
extern const CFStringRef kSecAttrSecurityDomain
|
|
485
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
486
|
+
extern const CFStringRef kSecAttrServer
|
|
487
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
488
|
+
extern const CFStringRef kSecAttrProtocol
|
|
489
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
490
|
+
extern const CFStringRef kSecAttrAuthenticationType
|
|
491
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
492
|
+
extern const CFStringRef kSecAttrPort
|
|
493
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
494
|
+
extern const CFStringRef kSecAttrPath
|
|
495
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
496
|
+
extern const CFStringRef kSecAttrSubject
|
|
497
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
498
|
+
extern const CFStringRef kSecAttrIssuer
|
|
499
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
500
|
+
extern const CFStringRef kSecAttrSerialNumber
|
|
501
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
502
|
+
extern const CFStringRef kSecAttrSubjectKeyID
|
|
503
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
504
|
+
extern const CFStringRef kSecAttrPublicKeyHash
|
|
505
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
506
|
+
extern const CFStringRef kSecAttrCertificateType
|
|
507
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
508
|
+
extern const CFStringRef kSecAttrCertificateEncoding
|
|
509
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
510
|
+
extern const CFStringRef kSecAttrKeyClass
|
|
511
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
512
|
+
extern const CFStringRef kSecAttrApplicationLabel
|
|
513
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
514
|
+
extern const CFStringRef kSecAttrIsPermanent
|
|
515
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
516
|
+
extern const CFStringRef kSecAttrIsSensitive
|
|
517
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
518
|
+
extern const CFStringRef kSecAttrIsExtractable
|
|
519
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
520
|
+
extern const CFStringRef kSecAttrApplicationTag
|
|
521
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
522
|
+
extern const CFStringRef kSecAttrKeyType
|
|
523
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
524
|
+
extern const CFStringRef kSecAttrPRF
|
|
525
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
526
|
+
extern const CFStringRef kSecAttrSalt
|
|
527
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
528
|
+
extern const CFStringRef kSecAttrRounds
|
|
529
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
530
|
+
extern const CFStringRef kSecAttrKeySizeInBits
|
|
531
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
532
|
+
extern const CFStringRef kSecAttrEffectiveKeySize
|
|
533
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
534
|
+
extern const CFStringRef kSecAttrCanEncrypt
|
|
535
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
536
|
+
extern const CFStringRef kSecAttrCanDecrypt
|
|
537
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
538
|
+
extern const CFStringRef kSecAttrCanDerive
|
|
539
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
540
|
+
extern const CFStringRef kSecAttrCanSign
|
|
541
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
542
|
+
extern const CFStringRef kSecAttrCanVerify
|
|
543
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
544
|
+
extern const CFStringRef kSecAttrCanWrap
|
|
545
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
546
|
+
extern const CFStringRef kSecAttrCanUnwrap
|
|
547
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
548
|
+
extern const CFStringRef kSecAttrSyncViewHint
|
|
549
|
+
API_AVAILABLE(macos(10.11), ios(9.0));
|
|
550
|
+
extern const CFStringRef kSecAttrTokenID
|
|
551
|
+
API_AVAILABLE(macos(10.12), ios(9.0));
|
|
552
|
+
extern const CFStringRef kSecAttrPersistantReference
|
|
553
|
+
API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
|
|
554
|
+
extern const CFStringRef kSecAttrPersistentReference
|
|
555
|
+
API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
|
|
556
|
+
|
|
557
|
+
/*!
|
|
558
|
+
@enum kSecAttrAccessible Value Constants
|
|
559
|
+
@discussion Predefined item attribute constants used to get or set values
|
|
560
|
+
in a dictionary. The kSecAttrAccessible constant is the key and its
|
|
561
|
+
value is one of the constants defined here.
|
|
562
|
+
When asking SecItemCopyMatching to return the item's data, the error
|
|
563
|
+
errSecInteractionNotAllowed will be returned if the item's data is not
|
|
564
|
+
available until a device unlock occurs.
|
|
565
|
+
@constant kSecAttrAccessibleWhenUnlocked Item data can only be accessed
|
|
566
|
+
while the device is unlocked. This is recommended for items that only
|
|
567
|
+
need be accesible while the application is in the foreground. Items
|
|
568
|
+
with this attribute will migrate to a new device when using encrypted
|
|
569
|
+
backups.
|
|
570
|
+
@constant kSecAttrAccessibleAfterFirstUnlock Item data can only be
|
|
571
|
+
accessed once the device has been unlocked after a restart. This is
|
|
572
|
+
recommended for items that need to be accesible by background
|
|
573
|
+
applications. Items with this attribute will migrate to a new device
|
|
574
|
+
when using encrypted backups.
|
|
575
|
+
@constant kSecAttrAccessibleAlways Item data can always be accessed
|
|
576
|
+
regardless of the lock state of the device. This is not recommended
|
|
577
|
+
for anything except system use. Items with this attribute will migrate
|
|
578
|
+
to a new device when using encrypted backups.
|
|
579
|
+
@constant kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly Item data can
|
|
580
|
+
only be accessed while the device is unlocked. This is recommended for
|
|
581
|
+
items that only need to be accessible while the application is in the
|
|
582
|
+
foreground and requires a passcode to be set on the device. Items with
|
|
583
|
+
this attribute will never migrate to a new device, so after a backup
|
|
584
|
+
is restored to a new device, these items will be missing. This
|
|
585
|
+
attribute will not be available on devices without a passcode. Disabling
|
|
586
|
+
the device passcode will cause all previously protected items to
|
|
587
|
+
be deleted.
|
|
588
|
+
@constant kSecAttrAccessibleWhenUnlockedThisDeviceOnly Item data can only
|
|
589
|
+
be accessed while the device is unlocked. This is recommended for items
|
|
590
|
+
that only need be accesible while the application is in the foreground.
|
|
591
|
+
Items with this attribute will never migrate to a new device, so after
|
|
592
|
+
a backup is restored to a new device, these items will be missing.
|
|
593
|
+
@constant kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly Item data can
|
|
594
|
+
only be accessed once the device has been unlocked after a restart.
|
|
595
|
+
This is recommended for items that need to be accessible by background
|
|
596
|
+
applications. Items with this attribute will never migrate to a new
|
|
597
|
+
device, so after a backup is restored to a new device these items will
|
|
598
|
+
be missing.
|
|
599
|
+
@constant kSecAttrAccessibleAlwaysThisDeviceOnly Item data can always
|
|
600
|
+
be accessed regardless of the lock state of the device. This option
|
|
601
|
+
is not recommended for anything except system use. Items with this
|
|
602
|
+
attribute will never migrate to a new device, so after a backup is
|
|
603
|
+
restored to a new device, these items will be missing.
|
|
604
|
+
*/
|
|
605
|
+
extern const CFStringRef kSecAttrAccessibleWhenUnlocked
|
|
606
|
+
API_AVAILABLE(macos(10.9), ios(4.0));
|
|
607
|
+
extern const CFStringRef kSecAttrAccessibleAfterFirstUnlock
|
|
608
|
+
API_AVAILABLE(macos(10.9), ios(4.0));
|
|
609
|
+
extern const CFStringRef kSecAttrAccessibleAlways
|
|
610
|
+
API_DEPRECATED("Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlock", macos(10.9, 10.14), ios(4.0, 12.0));
|
|
611
|
+
extern const CFStringRef kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly
|
|
612
|
+
API_AVAILABLE(macos(10.10), ios(8.0));
|
|
613
|
+
extern const CFStringRef kSecAttrAccessibleWhenUnlockedThisDeviceOnly
|
|
614
|
+
API_AVAILABLE(macos(10.9), ios(4.0));
|
|
615
|
+
extern const CFStringRef kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
|
|
616
|
+
API_AVAILABLE(macos(10.9), ios(4.0));
|
|
617
|
+
extern const CFStringRef kSecAttrAccessibleAlwaysThisDeviceOnly
|
|
618
|
+
API_DEPRECATED("Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly", macos(10.9, 10.14), ios(4.0, 12.0));
|
|
619
|
+
|
|
620
|
+
/*!
|
|
621
|
+
@enum kSecAttrProtocol Value Constants
|
|
622
|
+
@discussion Predefined item attribute constants used to get or set values
|
|
623
|
+
in a dictionary. The kSecAttrProtocol constant is the key and its
|
|
624
|
+
value is one of the constants defined here.
|
|
625
|
+
@constant kSecAttrProtocolFTP.
|
|
626
|
+
@constant kSecAttrProtocolFTPAccount.
|
|
627
|
+
@constant kSecAttrProtocolHTTP.
|
|
628
|
+
@constant kSecAttrProtocolIRC.
|
|
629
|
+
@constant kSecAttrProtocolNNTP.
|
|
630
|
+
@constant kSecAttrProtocolPOP3.
|
|
631
|
+
@constant kSecAttrProtocolSMTP.
|
|
632
|
+
@constant kSecAttrProtocolSOCKS.
|
|
633
|
+
@constant kSecAttrProtocolIMAP.
|
|
634
|
+
@constant kSecAttrProtocolLDAP.
|
|
635
|
+
@constant kSecAttrProtocolAppleTalk.
|
|
636
|
+
@constant kSecAttrProtocolAFP.
|
|
637
|
+
@constant kSecAttrProtocolTelnet.
|
|
638
|
+
@constant kSecAttrProtocolSSH.
|
|
639
|
+
@constant kSecAttrProtocolFTPS.
|
|
640
|
+
@constant kSecAttrProtocolHTTPS.
|
|
641
|
+
@constant kSecAttrProtocolHTTPProxy.
|
|
642
|
+
@constant kSecAttrProtocolHTTPSProxy.
|
|
643
|
+
@constant kSecAttrProtocolFTPProxy.
|
|
644
|
+
@constant kSecAttrProtocolSMB.
|
|
645
|
+
@constant kSecAttrProtocolRTSP.
|
|
646
|
+
@constant kSecAttrProtocolRTSPProxy.
|
|
647
|
+
@constant kSecAttrProtocolDAAP.
|
|
648
|
+
@constant kSecAttrProtocolEPPC.
|
|
649
|
+
@constant kSecAttrProtocolIPP.
|
|
650
|
+
@constant kSecAttrProtocolNNTPS.
|
|
651
|
+
@constant kSecAttrProtocolLDAPS.
|
|
652
|
+
@constant kSecAttrProtocolTelnetS.
|
|
653
|
+
@constant kSecAttrProtocolIMAPS.
|
|
654
|
+
@constant kSecAttrProtocolIRCS.
|
|
655
|
+
@constant kSecAttrProtocolPOP3S.
|
|
656
|
+
*/
|
|
657
|
+
extern const CFStringRef kSecAttrProtocolFTP
|
|
658
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
659
|
+
extern const CFStringRef kSecAttrProtocolFTPAccount
|
|
660
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
661
|
+
extern const CFStringRef kSecAttrProtocolHTTP
|
|
662
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
663
|
+
extern const CFStringRef kSecAttrProtocolIRC
|
|
664
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
665
|
+
extern const CFStringRef kSecAttrProtocolNNTP
|
|
666
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
667
|
+
extern const CFStringRef kSecAttrProtocolPOP3
|
|
668
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
669
|
+
extern const CFStringRef kSecAttrProtocolSMTP
|
|
670
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
671
|
+
extern const CFStringRef kSecAttrProtocolSOCKS
|
|
672
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
673
|
+
extern const CFStringRef kSecAttrProtocolIMAP
|
|
674
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
675
|
+
extern const CFStringRef kSecAttrProtocolLDAP
|
|
676
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
677
|
+
extern const CFStringRef kSecAttrProtocolAppleTalk
|
|
678
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
679
|
+
extern const CFStringRef kSecAttrProtocolAFP
|
|
680
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
681
|
+
extern const CFStringRef kSecAttrProtocolTelnet
|
|
682
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
683
|
+
extern const CFStringRef kSecAttrProtocolSSH
|
|
684
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
685
|
+
extern const CFStringRef kSecAttrProtocolFTPS
|
|
686
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
687
|
+
extern const CFStringRef kSecAttrProtocolHTTPS
|
|
688
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
689
|
+
extern const CFStringRef kSecAttrProtocolHTTPProxy
|
|
690
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
691
|
+
extern const CFStringRef kSecAttrProtocolHTTPSProxy
|
|
692
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
693
|
+
extern const CFStringRef kSecAttrProtocolFTPProxy
|
|
694
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
695
|
+
extern const CFStringRef kSecAttrProtocolSMB
|
|
696
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
697
|
+
extern const CFStringRef kSecAttrProtocolRTSP
|
|
698
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
699
|
+
extern const CFStringRef kSecAttrProtocolRTSPProxy
|
|
700
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
701
|
+
extern const CFStringRef kSecAttrProtocolDAAP
|
|
702
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
703
|
+
extern const CFStringRef kSecAttrProtocolEPPC
|
|
704
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
705
|
+
extern const CFStringRef kSecAttrProtocolIPP
|
|
706
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
707
|
+
extern const CFStringRef kSecAttrProtocolNNTPS
|
|
708
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
709
|
+
extern const CFStringRef kSecAttrProtocolLDAPS
|
|
710
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
711
|
+
extern const CFStringRef kSecAttrProtocolTelnetS
|
|
712
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
713
|
+
extern const CFStringRef kSecAttrProtocolIMAPS
|
|
714
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
715
|
+
extern const CFStringRef kSecAttrProtocolIRCS
|
|
716
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
717
|
+
extern const CFStringRef kSecAttrProtocolPOP3S
|
|
718
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
719
|
+
|
|
720
|
+
/*!
|
|
721
|
+
@enum kSecAttrAuthenticationType Value Constants
|
|
722
|
+
@discussion Predefined item attribute constants used to get or set values
|
|
723
|
+
in a dictionary. The kSecAttrAuthenticationType constant is the key
|
|
724
|
+
and its value is one of the constants defined here.
|
|
725
|
+
@constant kSecAttrAuthenticationTypeNTLM.
|
|
726
|
+
@constant kSecAttrAuthenticationTypeMSN.
|
|
727
|
+
@constant kSecAttrAuthenticationTypeDPA.
|
|
728
|
+
@constant kSecAttrAuthenticationTypeRPA.
|
|
729
|
+
@constant kSecAttrAuthenticationTypeHTTPBasic.
|
|
730
|
+
@constant kSecAttrAuthenticationTypeHTTPDigest.
|
|
731
|
+
@constant kSecAttrAuthenticationTypeHTMLForm.
|
|
732
|
+
@constant kSecAttrAuthenticationTypeDefault.
|
|
733
|
+
*/
|
|
734
|
+
extern const CFStringRef kSecAttrAuthenticationTypeNTLM
|
|
735
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
736
|
+
extern const CFStringRef kSecAttrAuthenticationTypeMSN
|
|
737
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
738
|
+
extern const CFStringRef kSecAttrAuthenticationTypeDPA
|
|
739
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
740
|
+
extern const CFStringRef kSecAttrAuthenticationTypeRPA
|
|
741
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
742
|
+
extern const CFStringRef kSecAttrAuthenticationTypeHTTPBasic
|
|
743
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
744
|
+
extern const CFStringRef kSecAttrAuthenticationTypeHTTPDigest
|
|
745
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
746
|
+
extern const CFStringRef kSecAttrAuthenticationTypeHTMLForm
|
|
747
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
748
|
+
extern const CFStringRef kSecAttrAuthenticationTypeDefault
|
|
749
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
750
|
+
|
|
751
|
+
/*!
|
|
752
|
+
@enum kSecAttrKeyClass Value Constants
|
|
753
|
+
@discussion Predefined item attribute constants used to get or set values
|
|
754
|
+
in a dictionary. The kSecAttrKeyClass constant is the key
|
|
755
|
+
and its value is one of the constants defined here.
|
|
756
|
+
@constant kSecAttrKeyClassPublic.
|
|
757
|
+
@constant kSecAttrKeyClassPrivate.
|
|
758
|
+
@constant kSecAttrKeyClassSymmetric.
|
|
759
|
+
*/
|
|
760
|
+
extern const CFStringRef kSecAttrKeyClassPublic
|
|
761
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
762
|
+
extern const CFStringRef kSecAttrKeyClassPrivate
|
|
763
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
764
|
+
extern const CFStringRef kSecAttrKeyClassSymmetric
|
|
765
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
766
|
+
|
|
767
|
+
/*!
|
|
768
|
+
@enum kSecAttrKeyType Value Constants
|
|
769
|
+
@discussion Predefined item attribute constants used to get or set values
|
|
770
|
+
in a dictionary. The kSecAttrKeyType constant is the key
|
|
771
|
+
and its value is one of the constants defined here.
|
|
772
|
+
@constant kSecAttrKeyTypeECSECPrimeRandom. The used curve is P-192, P-256, P-384 or P-521.
|
|
773
|
+
The size is specified by kSecAttrKeySizeInBits attribute. Curves are defined in FIPS PUB 186-4 standard.
|
|
774
|
+
@constant kSecAttrKeyTypeEC This is the legacy name for kSecAttrKeyTypeECSECPrimeRandom, new applications should not use it.
|
|
775
|
+
@constant kSecAttrKeyTypeDSA (macOS only)
|
|
776
|
+
@constant kSecAttrKeyTypeAES (macOS only)
|
|
777
|
+
@constant kSecAttrKeyType3DES (macOS only)
|
|
778
|
+
@constant kSecAttrKeyTypeRC4 (macOS only)
|
|
779
|
+
@constant kSecAttrKeyTypeRC2 (macOS only)
|
|
780
|
+
@constant kSecAttrKeyTypeCAST (macOS only)
|
|
781
|
+
@constant kSecAttrKeyTypeECDSA (deprecated; use kSecAttrKeyTypeECSECPrimeRandom instead.) (macOS only)
|
|
782
|
+
*/
|
|
783
|
+
extern const CFStringRef kSecAttrKeyTypeRSA
|
|
784
|
+
API_AVAILABLE(macos(10.7), ios(2.0));
|
|
785
|
+
extern const CFStringRef kSecAttrKeyTypeDSA
|
|
786
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
787
|
+
extern const CFStringRef kSecAttrKeyTypeAES
|
|
788
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
789
|
+
extern const CFStringRef kSecAttrKeyTypeDES
|
|
790
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
791
|
+
extern const CFStringRef kSecAttrKeyType3DES
|
|
792
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
793
|
+
extern const CFStringRef kSecAttrKeyTypeRC4
|
|
794
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
795
|
+
extern const CFStringRef kSecAttrKeyTypeRC2
|
|
796
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
797
|
+
extern const CFStringRef kSecAttrKeyTypeCAST
|
|
798
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
799
|
+
extern const CFStringRef kSecAttrKeyTypeECDSA
|
|
800
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
801
|
+
extern const CFStringRef kSecAttrKeyTypeEC
|
|
802
|
+
API_AVAILABLE(macos(10.9), ios(4.0));
|
|
803
|
+
extern const CFStringRef kSecAttrKeyTypeECSECPrimeRandom
|
|
804
|
+
API_AVAILABLE(macos(10.12), ios(10.0));
|
|
805
|
+
|
|
806
|
+
/*
|
|
807
|
+
@enum kSecAttrPRF Value Constants
|
|
808
|
+
@discussion Predefined item attribute constants used to specify the PRF
|
|
809
|
+
to use with SecKeyDeriveFromPassword. macOS only.
|
|
810
|
+
@constant kSecAttrPRFHmacAlgSHA1
|
|
811
|
+
@constant kSecAttrPRFHmacAlgSHA224
|
|
812
|
+
@constant kSecAttrPRFHmacAlgSHA256
|
|
813
|
+
@constant kSecAttrPRFHmacAlgSHA384
|
|
814
|
+
@constant kSecAttrPRFHmacAlgSHA512
|
|
815
|
+
*/
|
|
816
|
+
extern const CFStringRef kSecAttrPRFHmacAlgSHA1
|
|
817
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
818
|
+
extern const CFStringRef kSecAttrPRFHmacAlgSHA224
|
|
819
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
820
|
+
extern const CFStringRef kSecAttrPRFHmacAlgSHA256
|
|
821
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
822
|
+
extern const CFStringRef kSecAttrPRFHmacAlgSHA384
|
|
823
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
824
|
+
extern const CFStringRef kSecAttrPRFHmacAlgSHA512
|
|
825
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
/*!
|
|
829
|
+
@enum Search Constants
|
|
830
|
+
@discussion Predefined search constants used to set values in a query
|
|
831
|
+
dictionary. You can specify a combination of search attributes and
|
|
832
|
+
item attributes when looking for matching items with the
|
|
833
|
+
SecItemCopyMatching function.
|
|
834
|
+
@constant kSecMatchPolicy Specifies a dictionary key whose value is a
|
|
835
|
+
SecPolicyRef. If provided, returned certificates or identities must
|
|
836
|
+
verify with this policy.
|
|
837
|
+
@constant kSecMatchItemList macOS only. Specifies a dictionary key whose value is a
|
|
838
|
+
CFArray of SecKeychainItemRef items. If provided, returned items will be
|
|
839
|
+
limited to the subset which are contained in this list.
|
|
840
|
+
@constant kSecMatchSearchList Specifies a dictionary key whose value is a
|
|
841
|
+
CFArray of SecKeychainRef items. If provided, the search will be limited
|
|
842
|
+
to the keychains contained in this list.
|
|
843
|
+
@constant kSecMatchIssuers Specifies a dictionary key whose value is a
|
|
844
|
+
CFArray of X.500 names (of type CFDataRef). If provided, returned
|
|
845
|
+
certificates or identities will be limited to those whose
|
|
846
|
+
certificate chain contains one of the issuers provided in this list.
|
|
847
|
+
@constant kSecMatchEmailAddressIfPresent Specifies a dictionary key whose
|
|
848
|
+
value is a CFStringRef containing an RFC822 email address. If
|
|
849
|
+
provided, returned certificates or identities will be limited to those
|
|
850
|
+
that contain the address in their subject or subject alternative name.
|
|
851
|
+
@constant kSecMatchSubjectContains Specifies a dictionary key whose value
|
|
852
|
+
is a CFStringRef. If provided, returned certificates or identities
|
|
853
|
+
will be limited to those containing this string in the subject.
|
|
854
|
+
@constant kSecMatchHostOrSubdomainOfHost Specifies a dictionary key whose value
|
|
855
|
+
is a CFStringRef. If provided, returned internet passwords will be limited to those which
|
|
856
|
+
have a server host that is equal to or a subdomain of this string. This filter only works on
|
|
857
|
+
the Data Protection Keychain on macOS.
|
|
858
|
+
@constant kSecMatchSubjectStartsWith macOS only. Specifies a dictionary key whose value
|
|
859
|
+
is a CFStringRef. If provided, returned certificates or identities
|
|
860
|
+
will be limited to those with subject names that start with this string.
|
|
861
|
+
@constant kSecMatchSubjectEndsWith macOS only. Specifies a dictionary key whose value
|
|
862
|
+
is a CFStringRef. If provided, returned certificates or identities
|
|
863
|
+
will be limited to those with subject names that end with this string.
|
|
864
|
+
@constant kSecMatchSubjectWholeString macOS only. Specifies a dictionary key whose
|
|
865
|
+
value is a CFStringRef. If provided, returned certificates or identities
|
|
866
|
+
will be limited to those matching this string exactly in the subject.
|
|
867
|
+
@constant kSecMatchCaseInsensitive Specifies a dictionary key whose value
|
|
868
|
+
is a CFBooleanRef. If this value is kCFBooleanFalse, or is not
|
|
869
|
+
provided, then case-sensitive string matching is performed.
|
|
870
|
+
@constant kSecMatchDiacriticInsensitive macOS only. Specifies a dictionary key whose
|
|
871
|
+
value is a CFBooleanRef. If this value is kCFBooleanFalse, or is not
|
|
872
|
+
provided, then diacritic-sensitive string matching is performed.
|
|
873
|
+
@constant kSecMatchWidthInsensitive macOS only. Specifies a dictionary key whose
|
|
874
|
+
value is a CFBooleanRef. If this value is kCFBooleanFalse, or is not
|
|
875
|
+
provided, then string matching is width-sensitive (e.g. 'a' != 0xFF41).
|
|
876
|
+
@constant kSecMatchTrustedOnly Specifies a dictionary key whose value is
|
|
877
|
+
a CFBooleanRef. If provided with a value of kCFBooleanTrue, only
|
|
878
|
+
certificates which can be verified back to a trusted anchor will be
|
|
879
|
+
returned. If this value is kCFBooleanFalse, or is not provided, then
|
|
880
|
+
both trusted and untrusted certificates may be returned.
|
|
881
|
+
@constant kSecMatchValidOnDate Specifies a dictionary key whose value is
|
|
882
|
+
of type CFDateRef. If provided, returned keys, certificates or
|
|
883
|
+
identities will be limited to those which are valid for the given date.
|
|
884
|
+
Pass a value of kCFNull to indicate the current date.
|
|
885
|
+
@constant kSecMatchLimit Specifies a dictionary key whose value is a
|
|
886
|
+
CFNumberRef. If provided, this value specifies the maximum number of
|
|
887
|
+
results to return. If not provided, results are limited to the first
|
|
888
|
+
item found. Predefined values are provided for a single item
|
|
889
|
+
(kSecMatchLimitOne) and all matching items (kSecMatchLimitAll).
|
|
890
|
+
@constant kSecMatchLimitOne Specifies that results are limited to the first
|
|
891
|
+
item found; used as a value for the kSecMatchLimit dictionary key.
|
|
892
|
+
@constant kSecMatchLimitAll Specifies that an unlimited number of results
|
|
893
|
+
may be returned; used as a value for the kSecMatchLimit dictionary
|
|
894
|
+
key.
|
|
895
|
+
*/
|
|
896
|
+
extern const CFStringRef kSecMatchPolicy
|
|
897
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
898
|
+
extern const CFStringRef kSecMatchItemList
|
|
899
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
900
|
+
extern const CFStringRef kSecMatchSearchList
|
|
901
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
902
|
+
extern const CFStringRef kSecMatchIssuers
|
|
903
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
904
|
+
extern const CFStringRef kSecMatchEmailAddressIfPresent
|
|
905
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
906
|
+
extern const CFStringRef kSecMatchSubjectContains
|
|
907
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
908
|
+
extern const CFStringRef kSecMatchHostOrSubdomainOfHost
|
|
909
|
+
API_AVAILABLE(macos(15.0), ios(18.0));
|
|
910
|
+
extern const CFStringRef kSecMatchSubjectStartsWith
|
|
911
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
912
|
+
extern const CFStringRef kSecMatchSubjectEndsWith
|
|
913
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
914
|
+
extern const CFStringRef kSecMatchSubjectWholeString
|
|
915
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
916
|
+
extern const CFStringRef kSecMatchCaseInsensitive
|
|
917
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
918
|
+
extern const CFStringRef kSecMatchDiacriticInsensitive
|
|
919
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
920
|
+
extern const CFStringRef kSecMatchWidthInsensitive
|
|
921
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
922
|
+
extern const CFStringRef kSecMatchTrustedOnly
|
|
923
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
924
|
+
extern const CFStringRef kSecMatchValidOnDate
|
|
925
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
926
|
+
extern const CFStringRef kSecMatchLimit
|
|
927
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
928
|
+
extern const CFStringRef kSecMatchLimitOne
|
|
929
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
930
|
+
extern const CFStringRef kSecMatchLimitAll
|
|
931
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
/*!
|
|
935
|
+
@enum Return Type Key Constants
|
|
936
|
+
@discussion Predefined return type keys used to set values in a dictionary.
|
|
937
|
+
You use these keys to specify the type of results which should be
|
|
938
|
+
returned by the SecItemCopyMatching or SecItemAdd function. You can
|
|
939
|
+
specify zero or more of these return types. If more than one of these
|
|
940
|
+
result types is specified, the result is returned as a CFDictionaryRef
|
|
941
|
+
whose keys are the result types and values are the requested data.
|
|
942
|
+
@constant kSecReturnData Specifies a dictionary key whose value is of type
|
|
943
|
+
CFBooleanRef. A value of kCFBooleanTrue indicates that the data of
|
|
944
|
+
an item (CFDataRef) should be returned. For keys and password
|
|
945
|
+
items, data is secret (encrypted) and may require the user to enter
|
|
946
|
+
a password for access.
|
|
947
|
+
@constant kSecReturnAttributes Specifies a dictionary key whose value is
|
|
948
|
+
of type CFBooleanRef. A value of kCFBooleanTrue indicates that the
|
|
949
|
+
(non-encrypted) attributes of an item (CFDictionaryRef) should be
|
|
950
|
+
returned.
|
|
951
|
+
@constant kSecReturnRef Specifies a dictionary key whose value is a
|
|
952
|
+
CFBooleanRef. A value of kCFBooleanTrue indicates that a reference
|
|
953
|
+
should be returned. Depending on the item class requested, the
|
|
954
|
+
returned reference(s) may be of type SecKeychainItemRef, SecKeyRef,
|
|
955
|
+
SecCertificateRef, or SecIdentityRef. Note that returning references is
|
|
956
|
+
supported only for Certificate, Key or Identity items on iOS, watchOS and
|
|
957
|
+
tvOS. Similarly, returning references is supported only for Certificate, Key
|
|
958
|
+
or Identity items on macOS when either kSecUseDataProtectionKeychain
|
|
959
|
+
is set to true or kSecAttrSynchronizable is set to true.
|
|
960
|
+
@constant kSecReturnPersistentRef Specifies a dictionary key whose value
|
|
961
|
+
is of type CFBooleanRef. A value of kCFBooleanTrue indicates that a
|
|
962
|
+
persistent reference to an item (CFDataRef) should be returned.
|
|
963
|
+
*/
|
|
964
|
+
extern const CFStringRef kSecReturnData
|
|
965
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
966
|
+
extern const CFStringRef kSecReturnAttributes
|
|
967
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
968
|
+
extern const CFStringRef kSecReturnRef
|
|
969
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
970
|
+
extern const CFStringRef kSecReturnPersistentRef
|
|
971
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
/*!
|
|
975
|
+
@enum Value Type Key Constants
|
|
976
|
+
@discussion Predefined value type keys used to pass values in a dictionary.
|
|
977
|
+
You can specify zero or more of these types depending on the function
|
|
978
|
+
you are calling. For SecItemCopyMatching or SecItemAdd these are
|
|
979
|
+
used as keys in the results dictionary.
|
|
980
|
+
@constant kSecValueData Specifies a dictionary key whose value is of type
|
|
981
|
+
CFDataRef. For keys and password items, data is secret (encrypted)
|
|
982
|
+
and may require the user to enter a password for access.
|
|
983
|
+
@constant kSecValueRef Specifies a dictionary key whose value, depending
|
|
984
|
+
on the item class requested, is of type SecKeychainItemRef, SecKeyRef,
|
|
985
|
+
SecCertificateRef, or SecIdentityRef.
|
|
986
|
+
@constant kSecValuePersistentRef Specifies a dictionary key whose value
|
|
987
|
+
is of type CFDataRef. The bytes in this CFDataRef can be stored by
|
|
988
|
+
the caller and used on a subsequent invocation of the application (or
|
|
989
|
+
even a different application) to retrieve the item referenced by it.
|
|
990
|
+
*/
|
|
991
|
+
extern const CFStringRef kSecValueData
|
|
992
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
993
|
+
extern const CFStringRef kSecValueRef
|
|
994
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
995
|
+
extern const CFStringRef kSecValuePersistentRef
|
|
996
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
/*!
|
|
1000
|
+
@enum Other Constants
|
|
1001
|
+
@discussion Predefined constants used to set values in a dictionary.
|
|
1002
|
+
@constant kSecUseItemList Specifies a dictionary key whose value is a
|
|
1003
|
+
CFArray of items. If provided, this array is treated as the set of
|
|
1004
|
+
all possible items to search, or add if the API being called is
|
|
1005
|
+
SecItemAdd. The items in this array may be of type SecKeyRef,
|
|
1006
|
+
SecCertificateRef, SecIdentityRef, or CFDataRef (for a persistent
|
|
1007
|
+
item reference.) The items in the array must all be of the same
|
|
1008
|
+
type. When this attribute is provided, no keychains are searched.
|
|
1009
|
+
@constant kSecUseKeychain macOS only. Specifies a dictionary key whose value is a
|
|
1010
|
+
keychain reference. You use this key to specify a value of type
|
|
1011
|
+
SecKeychainRef to which SecItemAdd will add the provided item(s).
|
|
1012
|
+
@constant kSecUseOperationPrompt Specifies a dictionary key whose value
|
|
1013
|
+
is a CFStringRef that represents a user-visible string describing
|
|
1014
|
+
the operation for which the application is attempting to authenticate.
|
|
1015
|
+
The application is responsible for the text localization.
|
|
1016
|
+
@constant kSecUseNoAuthenticationUI Specifies a dictionary key whose value
|
|
1017
|
+
is a CFBooleanRef. If provided with a value of kCFBooleanTrue, the error
|
|
1018
|
+
errSecInteractionNotAllowed will be returned if the item is attempting
|
|
1019
|
+
to authenticate with UI. Note: on macOS, this attribute only applies to items stored
|
|
1020
|
+
in the Data Protection keychain. Legacy keychain items will still activate UI if needed.
|
|
1021
|
+
@constant kSecUseAuthenticationUI Specifies a dictionary key whose value
|
|
1022
|
+
is one of kSecUseAuthenticationUIAllow, kSecUseAuthenticationUIFail, kSecUseAuthenticationUISkip.
|
|
1023
|
+
@constant kSecUseAuthenticationContext Specifies a dictionary key whose value
|
|
1024
|
+
is LAContext to be used for keychain item authentication.
|
|
1025
|
+
* If the item requires authentication and this key is omitted, a new context
|
|
1026
|
+
will be created just for the purpose of the single call.
|
|
1027
|
+
* If the specified context has been previously authenticated, the operation
|
|
1028
|
+
will succeed without asking user for authentication.
|
|
1029
|
+
* If the specified context has not been previously authenticated, the new
|
|
1030
|
+
authentication will be started on this context, allowing caller to
|
|
1031
|
+
eventually reuse the successfully authenticated context in subsequent
|
|
1032
|
+
keychain operations.
|
|
1033
|
+
@constant kSecUseDataProtectionKeychain Specifies a dictionary key whose value
|
|
1034
|
+
is a CFBooleanRef. Set to kCFBooleanTrue to use kSecAttrAccessGroup and/or
|
|
1035
|
+
kSecAttrAccessible on macOS without requiring the item to be marked synchronizable.
|
|
1036
|
+
Note that when kSecUseDataProtectionKeychain is set to true, returning references is
|
|
1037
|
+
supported only for Certificate, Key or Identity items.
|
|
1038
|
+
@constant kSecUseUserIndependentKeychain Specifies a dctionary key whose value is a CFBooleanRef
|
|
1039
|
+
indicating whether the item is shared with other personas on the system.
|
|
1040
|
+
*/
|
|
1041
|
+
extern const CFStringRef kSecUseItemList
|
|
1042
|
+
API_AVAILABLE(macos(10.6))
|
|
1043
|
+
API_DEPRECATED("Not implemented on this platform", ios(2.0, 12.0), tvos(9.0, 12.0), watchos(1.0, 5.0), macCatalyst(13.0, 13.0))
|
|
1044
|
+
;
|
|
1045
|
+
extern const CFStringRef kSecUseKeychain
|
|
1046
|
+
API_AVAILABLE(macos(10.7), ios(NA));
|
|
1047
|
+
extern const CFStringRef kSecUseOperationPrompt
|
|
1048
|
+
API_DEPRECATED("Use kSecUseAuthenticationContext and set LAContext.localizedReason property", macos(10.10, 11.0), ios(8.0, 14.0));
|
|
1049
|
+
extern const CFStringRef kSecUseNoAuthenticationUI
|
|
1050
|
+
API_DEPRECATED("Use kSecUseAuthenticationUI instead.", macos(10.10, 10.11), ios(8.0, 9.0));
|
|
1051
|
+
extern const CFStringRef kSecUseAuthenticationUI
|
|
1052
|
+
API_AVAILABLE(macos(10.11), ios(9.0));
|
|
1053
|
+
extern const CFStringRef kSecUseAuthenticationContext
|
|
1054
|
+
API_AVAILABLE(macos(10.11), ios(9.0));
|
|
1055
|
+
extern const CFStringRef kSecUseDataProtectionKeychain
|
|
1056
|
+
API_AVAILABLE(macos(10.15), ios(13.0));
|
|
1057
|
+
extern const CFStringRef kSecUseUserIndependentKeychain
|
|
1058
|
+
API_AVAILABLE(tvos(16.0))
|
|
1059
|
+
API_UNAVAILABLE(macos, ios, watchos, macCatalyst);
|
|
1060
|
+
|
|
1061
|
+
/*!
|
|
1062
|
+
@enum kSecUseAuthenticationUI Value Constants
|
|
1063
|
+
@discussion Predefined item attribute constants used to get or set values
|
|
1064
|
+
in a dictionary. The kSecUseAuthenticationUI constant is the key and its
|
|
1065
|
+
value is one of the constants defined here.
|
|
1066
|
+
If the key kSecUseAuthenticationUI not provided then kSecUseAuthenticationUIAllow
|
|
1067
|
+
is used as default.
|
|
1068
|
+
@constant kSecUseAuthenticationUIAllow Specifies that authenticate UI can appear.
|
|
1069
|
+
@constant kSecUseAuthenticationUIFail Specifies that the error
|
|
1070
|
+
errSecInteractionNotAllowed will be returned if an item needs
|
|
1071
|
+
to authenticate with UI
|
|
1072
|
+
@constant kSecUseAuthenticationUISkip Specifies that all items which need
|
|
1073
|
+
to authenticate with UI will be silently skipped. This value can be used
|
|
1074
|
+
only with SecItemCopyMatching.
|
|
1075
|
+
*/
|
|
1076
|
+
extern const CFStringRef kSecUseAuthenticationUIAllow
|
|
1077
|
+
API_DEPRECATED("Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property", macos(10.11, 11.0), ios(9.0, 14.0));
|
|
1078
|
+
extern const CFStringRef kSecUseAuthenticationUIFail
|
|
1079
|
+
API_DEPRECATED("Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property", macos(10.11, 11.0), ios(9.0, 14.0));
|
|
1080
|
+
extern const CFStringRef kSecUseAuthenticationUISkip
|
|
1081
|
+
API_AVAILABLE(macos(10.11), ios(9.0));
|
|
1082
|
+
|
|
1083
|
+
/*!
|
|
1084
|
+
@enum kSecAttrTokenID Value Constants
|
|
1085
|
+
@discussion Predefined item attribute constant used to get or set values
|
|
1086
|
+
in a dictionary. The kSecAttrTokenID constant is the key and its value
|
|
1087
|
+
can be kSecAttrTokenIDSecureEnclave.
|
|
1088
|
+
@constant kSecAttrTokenIDSecureEnclave Specifies well-known identifier of the
|
|
1089
|
+
token implemented using device's Secure Enclave. The only keychain items
|
|
1090
|
+
supported by the Secure Enclave token are 256-bit elliptic curve keys
|
|
1091
|
+
(kSecAttrKeyTypeECSecPrimeRandom). Keys must be generated on the secure enclave using
|
|
1092
|
+
SecKeyGenerateKeyPair call with kSecAttrTokenID set to
|
|
1093
|
+
kSecAttrTokenIDSecureEnclave in the parameters dictionary, it is not
|
|
1094
|
+
possible to import pregenerated keys to kSecAttrTokenIDSecureEnclave token.
|
|
1095
|
+
*/
|
|
1096
|
+
extern const CFStringRef kSecAttrTokenIDSecureEnclave
|
|
1097
|
+
API_AVAILABLE(macos(10.12), ios(9.0));
|
|
1098
|
+
|
|
1099
|
+
/*!
|
|
1100
|
+
@enum kSecAttrAccessGroup Value Constants
|
|
1101
|
+
@constant kSecAttrAccessGroupToken Represents well-known access group
|
|
1102
|
+
which contains items provided by external token (typically smart card).
|
|
1103
|
+
This may be used as a value for kSecAttrAccessGroup attribute. Every
|
|
1104
|
+
application has access to this access group so it is not needed to
|
|
1105
|
+
explicitly list it in keychain-access-groups entitlement, but application
|
|
1106
|
+
must explicitly state this access group in keychain queries in order to
|
|
1107
|
+
be able to access items from external tokens.
|
|
1108
|
+
*/
|
|
1109
|
+
extern const CFStringRef kSecAttrAccessGroupToken
|
|
1110
|
+
API_AVAILABLE(macos(10.12), ios(10.0));
|
|
1111
|
+
|
|
1112
|
+
/*!
|
|
1113
|
+
@function SecItemCopyMatching
|
|
1114
|
+
@abstract Returns one or more items which match a search query.
|
|
1115
|
+
@param query A dictionary containing an item class specification and
|
|
1116
|
+
optional attributes for controlling the search. See the "Keychain
|
|
1117
|
+
Search Attributes" section for a description of currently defined
|
|
1118
|
+
search attributes.
|
|
1119
|
+
@param result On return, a CFTypeRef reference to the found item(s). The
|
|
1120
|
+
exact type of the result is based on the search attributes supplied
|
|
1121
|
+
in the query, as discussed below.
|
|
1122
|
+
@result A result code. See "Security Error Codes" (SecBase.h).
|
|
1123
|
+
@discussion Attributes defining a search are specified by adding key/value
|
|
1124
|
+
pairs to the query dictionary.
|
|
1125
|
+
|
|
1126
|
+
A typical query consists of:
|
|
1127
|
+
|
|
1128
|
+
* a kSecClass key, whose value is a constant from the Class
|
|
1129
|
+
Constants section that specifies the class of item(s) to be searched
|
|
1130
|
+
* one or more keys from the "Attribute Key Constants" section, whose value
|
|
1131
|
+
is the attribute data to be matched
|
|
1132
|
+
* one or more keys from the "Search Constants" section, whose value is
|
|
1133
|
+
used to further refine the search
|
|
1134
|
+
* a key from the "Return Type Key Constants" section, specifying the type of
|
|
1135
|
+
results desired
|
|
1136
|
+
|
|
1137
|
+
Result types are specified as follows:
|
|
1138
|
+
|
|
1139
|
+
* To obtain the data of a matching item (CFDataRef), specify
|
|
1140
|
+
kSecReturnData with a value of kCFBooleanTrue.
|
|
1141
|
+
* To obtain the attributes of a matching item (CFDictionaryRef), specify
|
|
1142
|
+
kSecReturnAttributes with a value of kCFBooleanTrue.
|
|
1143
|
+
* To obtain a reference to a matching item (SecKeychainItemRef,
|
|
1144
|
+
SecKeyRef, SecCertificateRef, or SecIdentityRef), specify kSecReturnRef
|
|
1145
|
+
with a value of kCFBooleanTrue. Note that returning references is
|
|
1146
|
+
supported only for Certificate, Key or Identity items on iOS, watchOS and
|
|
1147
|
+
tvOS. Similarly, returning references is supported only for Certificate, Key
|
|
1148
|
+
or Identity items on macOS when either kSecUseDataProtectionKeychain
|
|
1149
|
+
is set to true or kSecAttrSynchronizable is set to true.
|
|
1150
|
+
* To obtain a persistent reference to a matching item (CFDataRef),
|
|
1151
|
+
specify kSecReturnPersistentRef with a value of kCFBooleanTrue. Note
|
|
1152
|
+
that unlike normal references, a persistent reference may be stored
|
|
1153
|
+
on disk or passed between processes.
|
|
1154
|
+
* If more than one of these result types is specified, the result is
|
|
1155
|
+
returned as a CFDictionaryRef containing all the requested data.
|
|
1156
|
+
* If a result type is not specified, no results are returned.
|
|
1157
|
+
|
|
1158
|
+
By default, this function returns only the first match found. To obtain
|
|
1159
|
+
more than one matching item at a time, specify kSecMatchLimit with a value
|
|
1160
|
+
greater than 1. The result will be a CFArrayRef containing up to that
|
|
1161
|
+
number of matching items; the items' types are described above.
|
|
1162
|
+
|
|
1163
|
+
To filter a provided list of items down to those matching the query,
|
|
1164
|
+
specify a kSecMatchItemList whose value is a CFArray of SecKeychainItemRef,
|
|
1165
|
+
SecKeyRef, SecCertificateRef, or SecIdentityRef items. The objects in the
|
|
1166
|
+
provided array must be of the same type.
|
|
1167
|
+
|
|
1168
|
+
On iOS, to convert from a persistent item reference to a normal item reference,
|
|
1169
|
+
specify a kSecValuePersistentRef whose value a CFDataRef (the persistent
|
|
1170
|
+
reference), and a kSecReturnRef whose value is kCFBooleanTrue.
|
|
1171
|
+
|
|
1172
|
+
On macOS, to convert from persistent item references to normal item references,
|
|
1173
|
+
specify a kSecMatchItemList whose value is a CFArray containing one or
|
|
1174
|
+
more CFDataRef elements (the persistent reference), and a kSecReturnRef
|
|
1175
|
+
whose value is kCFBooleanTrue. The objects in the provided array must be
|
|
1176
|
+
of the same type.
|
|
1177
|
+
*/
|
|
1178
|
+
OSStatus SecItemCopyMatching(CFDictionaryRef query, CFTypeRef * __nullable CF_RETURNS_RETAINED result)
|
|
1179
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
1180
|
+
|
|
1181
|
+
/*!
|
|
1182
|
+
@function SecItemAdd
|
|
1183
|
+
@abstract Add one or more items to a keychain.
|
|
1184
|
+
@param attributes A dictionary containing an item class specification and
|
|
1185
|
+
optional entries specifying the item's attribute values. See the
|
|
1186
|
+
"Attribute Key Constants" section for a description of currently defined
|
|
1187
|
+
attributes.
|
|
1188
|
+
@param result On return, a CFTypeRef reference to the newly added item(s).
|
|
1189
|
+
The exact type of the result is based on the values supplied
|
|
1190
|
+
in attributes, as discussed below. Pass NULL if this result is not
|
|
1191
|
+
required.
|
|
1192
|
+
@result A result code. See "Security Error Codes" (SecBase.h).
|
|
1193
|
+
@discussion Attributes defining an item are specified by adding key/value
|
|
1194
|
+
pairs to the attributes dictionary. To add multiple items to a keychain
|
|
1195
|
+
at once use the kSecUseItemList key with an array of items as its value.
|
|
1196
|
+
This is currently only supported for non password items.
|
|
1197
|
+
|
|
1198
|
+
On macOS, to add an item to a particular keychain, supply kSecUseKeychain
|
|
1199
|
+
with a SecKeychainRef as its value.
|
|
1200
|
+
|
|
1201
|
+
On iOS, watchOS & tvOS, Certificate, Key, and Identity items may be
|
|
1202
|
+
added by reference, but neither Internet Passwords nor Generic Passwords
|
|
1203
|
+
may be. Similarly, on macOS with either kSecUseDataProtectionKeychain
|
|
1204
|
+
set to true or kSecAttrSynchronizable set to true, Certificate, Key, and Identity
|
|
1205
|
+
items may be added by reference, but neither Internet Passwords nor Generic
|
|
1206
|
+
Passwords may be.
|
|
1207
|
+
|
|
1208
|
+
Result types are specified as follows:
|
|
1209
|
+
|
|
1210
|
+
* To obtain the data of the added item (CFDataRef), specify
|
|
1211
|
+
kSecReturnData with a value of kCFBooleanTrue.
|
|
1212
|
+
* To obtain all the attributes of the added item (CFDictionaryRef),
|
|
1213
|
+
specify kSecReturnAttributes with a value of kCFBooleanTrue.
|
|
1214
|
+
* To obtain a reference to the added item (SecKeychainItemRef, SecKeyRef,
|
|
1215
|
+
SecCertificateRef, or SecIdentityRef), specify kSecReturnRef with a
|
|
1216
|
+
value of kCFBooleanTrue. See also note about kSecReturnRef and
|
|
1217
|
+
macOS.
|
|
1218
|
+
* To obtain a persistent reference to the added item (CFDataRef), specify
|
|
1219
|
+
kSecReturnPersistentRef with a value of kCFBooleanTrue. Note that
|
|
1220
|
+
unlike normal references, a persistent reference may be stored on disk
|
|
1221
|
+
or passed between processes.
|
|
1222
|
+
* If more than one of these result types is specified, the result is
|
|
1223
|
+
returned as a CFDictionaryRef containing all the requested data.
|
|
1224
|
+
* On iOS, if a result type is not specified, no results are returned.
|
|
1225
|
+
On macOS, the added item is returned.
|
|
1226
|
+
*/
|
|
1227
|
+
OSStatus SecItemAdd(CFDictionaryRef attributes, CFTypeRef * __nullable CF_RETURNS_RETAINED result)
|
|
1228
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
1229
|
+
|
|
1230
|
+
/*!
|
|
1231
|
+
@function SecItemUpdate
|
|
1232
|
+
@abstract Modify zero or more items which match a search query.
|
|
1233
|
+
@param query A dictionary containing an item class specification and
|
|
1234
|
+
optional attributes for controlling the search. See the "Attribute
|
|
1235
|
+
Constants" and "Search Constants" sections for a description of
|
|
1236
|
+
currently defined search attributes.
|
|
1237
|
+
@param attributesToUpdate A dictionary containing one or more attributes
|
|
1238
|
+
whose values should be set to the ones specified. Only real keychain
|
|
1239
|
+
attributes are permitted in this dictionary (no "meta" attributes are
|
|
1240
|
+
allowed.) See the "Attribute Key Constants" section for a description of
|
|
1241
|
+
currently defined value attributes.
|
|
1242
|
+
@result A result code. See "Security Error Codes" (SecBase.h).
|
|
1243
|
+
@discussion Attributes defining a search are specified by adding key/value
|
|
1244
|
+
pairs to the query dictionary.
|
|
1245
|
+
*/
|
|
1246
|
+
OSStatus SecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate)
|
|
1247
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
1248
|
+
|
|
1249
|
+
/*!
|
|
1250
|
+
@function SecItemDelete
|
|
1251
|
+
@abstract Delete zero or more items which match a search query.
|
|
1252
|
+
@param query A dictionary containing an item class specification and
|
|
1253
|
+
optional attributes for controlling the search. See the "Attribute
|
|
1254
|
+
Constants" and "Search Constants" sections for a description of
|
|
1255
|
+
currently defined search attributes.
|
|
1256
|
+
@result A result code. See "Security Error Codes" (SecBase.h).
|
|
1257
|
+
@discussion Attributes defining a search are specified by adding key/value
|
|
1258
|
+
pairs to the query dictionary.
|
|
1259
|
+
|
|
1260
|
+
By default, this function deletes all items matching the specified query.
|
|
1261
|
+
You can change this behavior by specifying one of the follow keys:
|
|
1262
|
+
|
|
1263
|
+
* To delete an item identified by a transient reference, on iOS, specify
|
|
1264
|
+
kSecValueRef with a item reference. On macOS, give a kSecMatchItemList
|
|
1265
|
+
containing an item reference.
|
|
1266
|
+
* To delete an item identified by a persistent reference, on iOS, specify
|
|
1267
|
+
kSecValuePersistentRef with a persistent reference returned by
|
|
1268
|
+
using the kSecReturnPersistentRef key to SecItemCopyMatching or
|
|
1269
|
+
SecItemAdd. On macOS, use kSecMatchItemList with a persistent reference
|
|
1270
|
+
returned by using the kSecReturnPersistentRef key with
|
|
1271
|
+
SecItemCopyMatching or SecItemAdd.
|
|
1272
|
+
* To delete multiple items specify kSecMatchItemList with an array
|
|
1273
|
+
of references.
|
|
1274
|
+
* If more than one of these result keys is specified, the behavior is
|
|
1275
|
+
undefined.
|
|
1276
|
+
*/
|
|
1277
|
+
OSStatus SecItemDelete(CFDictionaryRef query)
|
|
1278
|
+
API_AVAILABLE(macos(10.6), ios(2.0));
|
|
1279
|
+
|
|
1280
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
1281
|
+
CF_ASSUME_NONNULL_END
|
|
1282
|
+
|
|
1283
|
+
__END_DECLS
|
|
1284
|
+
|
|
1285
|
+
#endif /* !_SECURITY_SECITEM_H_ */
|