2 * Copyright (c) 2017 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
27 #include <Foundation/Foundation.h>
28 #include <utilities/debugging.h>
29 NS_ASSUME_NONNULL_BEGIN
31 extern NSString
* const OctagonEventAttributeZoneName
;
32 extern NSString
* const OctagonEventAttributeFailureReason
;
33 extern NSString
* const OctagonEventAttributeTimeSinceLastPostedFollowUp
;
35 extern NSString
* OTCKContainerName
;
36 extern NSString
* const CuttlefishTrustZone
;
37 extern NSString
* const CuttlefishErrorDomain
;
38 extern NSString
* const TrustedPeersHelperErrorDomain
;
43 OTErrorKeyGeneration
= 2,
44 OTErrorEmptySecret
= 3,
46 OTErrorNoIdentity
= 5,
47 OTErrorRestoreFailed
= 6,
48 OTErrorRestoredPeerEncryptionKeyFailure
= 7,
49 OTErrorRestoredPeerSigningKeyFailure
= 8,
50 OTErrorEntropyCreationFailure
= 9,
51 OTErrorDeserializationFailure
= 10,
52 OTErrorDecryptFailure
= 11,
53 OTErrorPrivateKeyFailure
= 12,
54 OTErrorEscrowSigningSPKI
= 13,
56 OTErrorOTLocalStore
= 15,
57 OTErrorOTCloudStore
= 16,
58 OTErrorEmptyEscrowRecordID
= 17,
59 OTErrorNoBottlePeerRecords
= 18,
60 OTErrorCoreFollowUp
= 19,
61 OTErrorFeatureNotEnabled
= 20,
62 OTErrorCKCallback
= 21,
64 OTErrorCKTimeOut
= 23,
65 OTErrorNoNetwork
= 24,
66 OTErrorNotSignedIn
= 25,
67 OTErrorRecordNotFound
= 26,
68 OTErrorNoEscrowKeys
= 27,
69 OTErrorBottleUpdate
= 28,
70 OTErrorNotSupported
= 29,
71 OTErrorUnexpectedStateTransition
= 30,
72 OTErrorNoSuchContext
= 31,
74 OTErrorMasterKey
= 33,
75 OTErrorNotTrusted
= 34,
76 OTErrorLimitedPeer
= 35,
77 OTErrorNoOctagonKeysInSOS
= 36,
78 OTErrorNeedsAuthentication
= 37,
79 OTErrorOctagonAdapter
= 38,
80 OTErrorSOSAdapter
= 39,
81 OctagonErrorNoAccount
= 40,
84 #define OTMasterSecretLength 72
87 OctagonSigningKey
= 1,
88 OctagonEncryptionKey
= 2
95 } OctagonBottleCheckState
;
97 typedef NS_ENUM(NSInteger
, TrustedPeersHelperErrorCode
) {
98 TrustedPeersHelperErrorNoPreparedIdentity
= 1,
99 TrustedPeersHelperErrorNoPeersPreapprovePreparedIdentity
= 14,
100 TrustedPeersHelperErrorCodeNotEnrolled
= 34,
103 typedef NS_ENUM(NSInteger
, CuttlefishErrorCode
) {
104 CuttlefishErrorResultGraphNotFullyReachable
= 1007,
105 CuttlefishErrorTransactionalFailure
= 1019,
106 CuttlefishErrorKeyHierarchyAlreadyExists
= 1033,
109 NS_ASSUME_NONNULL_END
111 #endif /* OTDefines_h */