]> git.saurik.com Git - apple/security.git/blob - keychain/ot/OTDefines.h
Security-58286.51.6.tar.gz
[apple/security.git] / keychain / ot / OTDefines.h
1 /*
2 * Copyright (c) 2017 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 #ifndef OTDefines_h
25 #define OTDefines_h
26 #if OCTAGON
27 #include <Foundation/Foundation.h>
28 #include <utilities/debugging.h>
29 NS_ASSUME_NONNULL_BEGIN
30
31 static NSString* const octagonErrorDomain = @"com.apple.security.octagon";
32 static NSString* const OctagonEventAttributeZoneName = @"OTBottledPeer";
33 static NSString* const OctagonEventAttributeFailureReason = @"OTFailureReason";
34 static NSString* const OctagonEventAttributeTimeSinceLastPostedFollowUp = @"TimeSinceLastPostedFollowUp";
35
36
37 /* Octagon Errors */
38 #define OTErrorNoColumn 1
39 #define OTErrorKeyGeneration 2
40 #define OTErrorEmptySecret 3
41 #define OTErrorEmptyDSID 4
42 #define OTErrorNoIdentity 5
43 #define OTErrorRestoreFailed 6
44 #define OTErrorRestoredPeerEncryptionKeyFailure 7
45 #define OTErrorRestoredPeerSigningKeyFailure 8
46 #define OTErrorEntropyCreationFailure 9
47 #define OTErrorDeserializationFailure 10
48 #define OTErrorDecryptFailure 11
49 #define OTErrorPrivateKeyFailure 12
50 #define OTErrorEscrowSigningSPKI 13
51 #define OTErrorBottleID 14
52 #define OTErrorOTLocalStore 15
53 #define OTErrorOTCloudStore 16
54 #define OTErrorEmptyEscrowRecordID 17
55 #define OTErrorNoBottlePeerRecords 18
56 #define OTErrorCoreFollowUp 19
57 #define OTErrorFeatureNotEnabled 20
58 #define OTErrorCKCallback 21
59 #define OTErrorRampInit 22
60 #define OTErrorCKTimeOut 23
61 #define OTErrorNoNetwork 24
62 #define OTErrorNotSignedIn 25
63 #define OTErrorRecordNotFound 26
64
65 #define OTMasterSecretLength 72
66
67 typedef enum {
68 OctagonSigningKey = 1,
69 OctagonEncryptionKey = 2
70 } OctagonKeyType;
71
72 typedef enum {
73 UNCLEAR = 0,
74 BOTTLE = 1,
75 NOBOTTLE = 2
76 } OctagonBottleCheckState;
77
78 NS_ASSUME_NONNULL_END
79 #endif
80 #endif /* OTDefines_h */