annotate dstep/security/cssmkrapi.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Jul 22, 2009
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.security.cssmkrapi;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.security.cssmtype;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 alias uint CSSM_KRSP_HANDLE;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 alias uint CSSM_KR_POLICY_TYPE;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 alias uint CSSM_KR_POLICY_FLAGS;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 alias CSSM_KR_POLICY_INFO* CSSM_KR_POLICY_INFO_PTR;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 alias CSSM_KR_PROFILE* CSSM_KR_PROFILE_PTR;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 struct CSSM_KR_NAME
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 ubyte Type;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 ubyte Length;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 char* Name;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 struct CSSM_KR_PROFILE
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 CSSM_KR_NAME UserName;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 CSSM_CERTGROUP_PTR UserCertificate;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 CSSM_CERTGROUP_PTR KRSCertChain;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 ubyte LE_KRANum;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 CSSM_CERTGROUP_PTR LE_KRACertChainList;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 ubyte ENT_KRANum;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 CSSM_CERTGROUP_PTR ENT_KRACertChainList;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 ubyte INDIV_KRANum;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 CSSM_CERTGROUP_PTR INDIV_KRACertChainList;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 CSSM_DATA_PTR INDIV_AuthenticationInfo;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 uint KRSPFlags;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 CSSM_DATA_PTR KRSPExtensions;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 struct CSSM_KR_WRAPPEDPRODUCT_INFO
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 CSSM_VERSION StandardVersion;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 byte[68] StandardDescription;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 CSSM_VERSION ProductVersion;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 byte[68] ProductDescription;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 byte[68] ProductVendor;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 uint ProductFlags;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 struct CSSM_KRSUBSERVICE
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 uint SubServiceId;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 char* Description;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 CSSM_KR_WRAPPEDPRODUCT_INFO WrappedProduct;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 struct CSSM_KR_POLICY_LIST_ITEM
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 CSSM_KR_POLICY_LIST_ITEM* next;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 uint AlgorithmId;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 uint Mode;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 uint MaxKeyLength;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 uint MaxRounds;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 ubyte WorkFactor;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 uint PolicyFlags;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 uint AlgClass;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74 struct CSSM_KR_POLICY_INFO
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
75 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
76 int krbNotAllowed;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 uint numberOfEntries;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 CSSM_KR_POLICY_LIST_ITEM* policyEntry;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 extern (C)
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
82 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
83 int CSSM_KR_SetEnterpriseRecoveryPolicy (CSSM_DATA* RecoveryPolicyFileName, CSSM_ACCESS_CREDENTIALS* OldPassPhrase, CSSM_ACCESS_CREDENTIALS* NewPassPhrase);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
84 int CSSM_KR_CreateRecoveryRegistrationContext (uint KRSPHandle, CSSM_CC_HANDLE* NewContext);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
85 int CSSM_KR_CreateRecoveryEnablementContext (uint KRSPHandle, CSSM_KR_PROFILE* LocalProfile, CSSM_KR_PROFILE* RemoteProfile, CSSM_CC_HANDLE* NewContext);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
86 int CSSM_KR_CreateRecoveryRequestContext (uint KRSPHandle, CSSM_KR_PROFILE* LocalProfile, CSSM_CC_HANDLE* NewContext);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
87 int CSSM_KR_GetPolicyInfo (ulong CCHandle, CSSM_KR_POLICY_FLAGS* EncryptionProhibited, uint* WorkFactor);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88 int CSSM_KR_RegistrationRequest (ulong RecoveryRegistrationContext, CSSM_DATA* KRInData, CSSM_ACCESS_CREDENTIALS* AccessCredentials, uint KRFlags, int* EstimatedTime, CSSM_HANDLE_PTR ReferenceHandle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89 int CSSM_KR_RegistrationRetrieve (uint KRSPHandle, int ReferenceHandle, CSSM_ACCESS_CREDENTIALS* AccessCredentials, int* EstimatedTime, CSSM_KR_PROFILE_PTR KRProfile);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
90 int CSSM_KR_GenerateRecoveryFields (ulong KeyRecoveryContext, ulong CCHandle, CSSM_DATA* KRSPOptions, uint KRFlags, CSSM_DATA_PTR KRFields, CSSM_CC_HANDLE* NewCCHandle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91 int CSSM_KR_ProcessRecoveryFields (ulong KeyRecoveryContext, ulong CryptoContext, CSSM_DATA* KRSPOptions, uint KRFlags, CSSM_DATA* KRFields, CSSM_CC_HANDLE* NewCryptoContext);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
92 int CSSM_KR_RecoveryRequest (ulong RecoveryRequestContext, CSSM_DATA* KRInData, CSSM_ACCESS_CREDENTIALS* AccessCredentials, int* EstimatedTime, CSSM_HANDLE_PTR ReferenceHandle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
93 int CSSM_KR_RecoveryRetrieve (uint KRSPHandle, int ReferenceHandle, CSSM_ACCESS_CREDENTIALS* AccessCredentials, int* EstimatedTime, CSSM_HANDLE_PTR CacheHandle, uint* NumberOfRecoveredKeys);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
94 int CSSM_KR_GetRecoveredObject (uint KRSPHandle, int CacheHandle, uint IndexInResults, int CSPHandle, CSSM_RESOURCE_CONTROL_CONTEXT* CredAndAclEntry, uint Flags, CSSM_KEY_PTR RecoveredKey, CSSM_DATA_PTR OtherInfo);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
95 int CSSM_KR_RecoveryRequestAbort (uint KRSPHandle, int CacheHandle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
96 int CSSM_KR_QueryPolicyInfo (uint KRSPHandle, uint AlgorithmID, uint Mode, uint Class, CSSM_KR_POLICY_INFO_PTR* PolicyInfoData);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
97 int CSSM_KR_PassThrough (uint KRSPHandle, ulong KeyRecoveryContext, ulong CryptoContext, uint PassThroughId, void* InputParams, void** OutputParams);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
98 }