2 // Copyright (c) 2004,2006-2007 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@
23 // ucsp.defs - Mach RPC interface between SecurityServer and its clients
25 #include <mach/std_types.defs>
26 #include <mach/mach_types.defs>
28 import <securityd_client/ss_types.h>;
34 type Data = array [] of char;
36 type Pointer = uint32_t;
37 type BasePointer = uint32_t;
40 type XMLBlobOut = Data;
45 type IPCHandle = uint32_t;
46 type IPCDbHandle = IPCHandle;
47 type IPCKeyHandle = IPCHandle;
48 type IPCRecordHandle = IPCHandle;
49 type IPCSearchHandle = IPCHandle;
50 type IPCGenericHandle = IPCHandle;
52 type DbHandle = uint32_t;
56 type CssmKeyBlob = Data
58 type CssmKeyPtr = BasePointer;
60 type AclEntryPrototypeBlob = Data
61 ctype: AclEntryPrototypePtr;
62 type AclEntryPrototypePtr = BasePointer;
64 type AclEntryInfoBlob = Data
65 ctype: AclEntryInfoPtr;
66 type AclEntryInfoPtr = BasePointer;
68 type AclEntryInputBlob = Data
69 ctype: AclEntryInputPtr;
70 type AclEntryInputPtr = BasePointer;
72 type AclOwnerPrototypeBlob = Data
73 ctype: AclOwnerPrototypePtr;
74 type AclOwnerPrototypePtr = BasePointer;
76 type AccessCredentialsBlob = Data
77 ctype: AccessCredentialsPtr;
78 type AccessCredentialsPtr = BasePointer;
80 type DLDbIdentBlob = Data
82 type DLDbIdentPtr = BasePointer;
84 type ParamInputBlob = Data
86 type ParamInputPtr = BasePointer;
88 type CssmDbRecordAttributeDataBlob = Data
89 ctype: CssmDbRecordAttributeDataPtr;
90 type CssmDbRecordAttributeDataPtr = BasePointer;
92 type CssmQueryBlob = Data
94 type CssmQueryPtr = BasePointer;
96 type CssmSubserviceUidBlob = Data
97 ctype: CssmSubserviceUidPtr;
98 type CssmSubserviceUidPtr = BasePointer;
100 type CssmDeriveDataBlob = Data
101 ctype: CssmDeriveDataPtr;
102 type CssmDeriveDataPtr = BasePointer;
104 type CSSM_DBINFOBlob = Data
105 ctype: CSSM_DBINFOPtr;
106 type CSSM_DBINFOPtr = BasePointer;
108 type CSSM_DB_SCHEMA_ATTRIBUTE_INFOBlob = Data
109 ctype: CSSM_DB_SCHEMA_ATTRIBUTE_INFOPtr;
110 type CSSM_DB_SCHEMA_ATTRIBUTE_INFOPtr = BasePointer;
112 type CSSM_DB_SCHEMA_INDEX_INFOBlob = Data
113 ctype: CSSM_DB_SCHEMA_INDEX_INFOPtr;
114 type CSSM_DB_SCHEMA_INDEX_INFOPtr = BasePointer;
116 type CSSM_NAME_LISTBlob = Data
117 ctype: CSSM_NAME_LISTPtr;
118 type CSSM_NAME_LISTPtr = BasePointer;
120 type CssmNetAddressBlob = Data
121 ctype: CssmNetAddressPtr;
122 type CssmNetAddressPtr = BasePointer;
124 type Guid = struct[4] of char
127 type SetupInfo = struct[8] of uint8_t // don't interpret!
128 ctype: ClientSetupInfo;
130 type Context = struct [9] of uint8_t
132 intran: Context inTrans(CSSM_CONTEXT);
133 type ContextAttributes = array [] of char
134 cservertype: ContextAttributesPointer;
136 type CssmKeyHeader = struct [23] of uint8_t;
138 type CssmKey = struct [23+2] of uint8_t
140 intran: CssmKey inTrans(CSSM_KEY)
141 outtran: CSSM_KEY outTrans(CssmKey);
143 type CSSM_KEY_SIZE = struct [2] of uint32_t
144 ctype: CSSM_KEY_SIZE;
146 type DBParameters = struct [2] of uint32_t;
148 type CSSM_CSP_OPERATIONAL_STATISTICS = struct [10] of uint32_t;
149 type CSPOperationalStatistics = CSSM_CSP_OPERATIONAL_STATISTICS;
151 type AuthorizationBlob = struct [8] of uint8_t; // 8 opaque bytes
152 type AuthorizationExternalForm = struct [32] of uint8_t; // 32 opaque bytes
154 type CssmString = c_string[*:64+4];
155 type AuthorizationString = c_string[*:1024];
156 type CSSM_RETURN = int32_t;
157 type OSStatus = int32_t;
158 type CSSM_ALGORITHMS = uint32_t;
159 type CSSM_ACL_EDIT_MODE = uint32_t;
160 type CSSM_ACL_HANDLE = uint32_t;
161 type AclKind = uint32_t;
162 type uint32 = uint32_t;
163 type SecuritySessionId = uint32_t;
164 type SessionAttributeBits = uint32_t;
165 type SessionCreationFlags = uint32_t;
166 type uid_t = uint32_t;
168 type KeyHandle = uint32_t;
169 type RecordHandle = uint32_t;
170 type SearchHandle = uint32_t;
171 type GenericHandle = uint32_t;
172 type CSSM_DB_RECORDTYPE = uint32_t;
173 type CSSM_DB_ACCESS_TYPE = uint32_t;
174 type CSSM_DB_MODIFY_MODE = uint32_t;
176 type FilePath = c_string[*:1024]; // PATH_MAX
177 type FilePathOut = c_string[*:1024]; // PATH_MAX
178 type RelationName = c_string[*:2048]; //@@@ a bit big, no?
179 type HashData = array[*:64] of char;
180 type HashDataOut = array [64] of char; // returning hash data, max. 512 bits
182 type pid_t = unsigned32;
184 type SecGuestRef = unsigned32;
185 type GuestChain = array [] of SecGuestRef;
189 // Common argument pattern macros.
190 // Watch for matching macros on the sending and receiving code sides.
192 #define IN_CONTEXT in context: Context; in contextBase: BasePointer; in attrs: ContextAttributes
193 #define IN_BLOB(name,type) in name: type##Blob; in name##Base: type##Ptr
194 #define OUT_BLOB(name,type) out name: type##Blob; out name##Base: type##Ptr