annotate dstep/security/SecKeychain.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.SecKeychain;
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.corefoundation.CFArray;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.corefoundation.CFBase;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.objc.bridge.TypeEncoding;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.security.SecBase;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.security.cssmapple;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 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
15
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 alias uint SecAuthenticationType;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 alias uint SecProtocolType;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 alias uint SecKeychainEvent;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 alias uint SecKeychainEventMask;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 extern (C)
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 alias int function (uint, SecKeychainCallbackInfo*, void*) SecKeychainCallback;
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
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 // This is needed otherwise the enums will fail compiling with gdc
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 version (GNU)
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 private
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 const __kSecProtocolTypeFTP = getOSType!("ftp ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 const __kSecProtocolTypeFTPAccount = getOSType!("ftpa");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 const __kSecProtocolTypeHTTP = getOSType!("http");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 const __kSecProtocolTypeIRC = getOSType!("irc ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 const __kSecProtocolTypeNNTP = getOSType!("nntp");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 const __kSecProtocolTypePOP3 = getOSType!("pop3");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 const __kSecProtocolTypeSMTP = getOSType!("smtp");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 const __kSecProtocolTypeSOCKS = getOSType!("sox ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 const __kSecProtocolTypeIMAP = getOSType!("imap");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 const __kSecProtocolTypeLDAP = getOSType!("ldap");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 const __kSecProtocolTypeAppleTalk = getOSType!("atlk");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 const __kSecProtocolTypeAFP = getOSType!("afp ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 const __kSecProtocolTypeTelnet = getOSType!("teln");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 const __kSecProtocolTypeSSH = getOSType!("ssh ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 const __kSecProtocolTypeFTPS = getOSType!("ftps");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 const __kSecProtocolTypeHTTPS = getOSType!("htps");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 const __kSecProtocolTypeHTTPProxy = getOSType!("htpx");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 const __kSecProtocolTypeHTTPSProxy = getOSType!("htsx");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 const __kSecProtocolTypeFTPProxy = getOSType!("ftpx");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 const __kSecProtocolTypeCIFS = getOSType!("cifs");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 const __kSecProtocolTypeSMB = getOSType!("smb ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 const __kSecProtocolTypeRTSP = getOSType!("rtsp");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 const __kSecProtocolTypeRTSPProxy = getOSType!("rtsx");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 const __kSecProtocolTypeDAAP = getOSType!("daap");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 const __kSecProtocolTypeEPPC = getOSType!("eppc");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 const __kSecProtocolTypeIPP = getOSType!("ipp ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 const __kSecProtocolTypeNNTPS = getOSType!("ntps");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 const __kSecProtocolTypeLDAPS = getOSType!("ldps");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 const __kSecProtocolTypeTelnetS = getOSType!("tels");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 const __kSecProtocolTypeIMAPS = getOSType!("imps");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 const __kSecProtocolTypeIRCS = getOSType!("ircs");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 const __kSecProtocolTypePOP3S = getOSType!("pops");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 const __kSecProtocolTypeCVSpserver = getOSType!("cvsp");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 const __kSecProtocolTypeSVN = getOSType!("svn ");
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 const __kSecAuthenticationTypeNTLM = ((getOSType!("ntlm") >> 24) | ((getOSType!("ntlm") >> 8) & 0xff00) | ((getOSType!("ntlm") << 8) & 0xff0000) | (getOSType!("ntlm") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 const __kSecAuthenticationTypeMSN = ((getOSType!("msna") >> 24) | ((getOSType!("msna") >> 8) & 0xff00) | ((getOSType!("msna") << 8) & 0xff0000) | (getOSType!("msna") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 const __kSecAuthenticationTypeDPA = ((getOSType!("dpaa") >> 24) | ((getOSType!("dpaa") >> 8) & 0xff00) | ((getOSType!("dpaa") << 8) & 0xff0000) | (getOSType!("dpaa") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 const __kSecAuthenticationTypeRPA = ((getOSType!("rpaa") >> 24) | ((getOSType!("rpaa") >> 8) & 0xff00) | ((getOSType!("rpaa") << 8) & 0xff0000) | (getOSType!("rpaa") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 const __kSecAuthenticationTypeHTTPBasic = ((getOSType!("http") >> 24) | ((getOSType!("http") >> 8) & 0xff00) | ((getOSType!("http") << 8) & 0xff0000) | (getOSType!("http") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 const __kSecAuthenticationTypeHTTPDigest = ((getOSType!("httd") >> 24) | ((getOSType!("httd") >> 8) & 0xff00) | ((getOSType!("httd") << 8) & 0xff0000) | (getOSType!("httd") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 const __kSecAuthenticationTypeHTMLForm = ((getOSType!("form") >> 24) | ((getOSType!("form") >> 8) & 0xff00) | ((getOSType!("form") << 8) & 0xff0000) | (getOSType!("form") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72 const __kSecAuthenticationTypeDefault = ((getOSType!("dflt") >> 24) | ((getOSType!("dflt") >> 8) & 0xff00) | ((getOSType!("dflt") << 8) & 0xff0000) | (getOSType!("dflt") & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73 const __kSecAuthenticationTypeAny = ((0 >> 24) | ((0 >> 8) & 0xff00) | ((0 << 8) & 0xff0000) | (0 & 0xff) << 24);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74 }
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
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 enum
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79 kSecUnlockStateStatus = 1,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80 kSecReadPermStatus = 2,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 kSecWritePermStatus = 4
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
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
84 enum
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
85 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
86 kSecAuthenticationTypeNTLM = ((getOSType!("ntlm") >> 24) | ((getOSType!("ntlm") >> 8) & 0xff00) | ((getOSType!("ntlm") << 8) & 0xff0000) | (getOSType!("ntlm") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
87 kSecAuthenticationTypeMSN = ((getOSType!("msna") >> 24) | ((getOSType!("msna") >> 8) & 0xff00) | ((getOSType!("msna") << 8) & 0xff0000) | (getOSType!("msna") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88 kSecAuthenticationTypeDPA = ((getOSType!("dpaa") >> 24) | ((getOSType!("dpaa") >> 8) & 0xff00) | ((getOSType!("dpaa") << 8) & 0xff0000) | (getOSType!("dpaa") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89 kSecAuthenticationTypeRPA = ((getOSType!("rpaa") >> 24) | ((getOSType!("rpaa") >> 8) & 0xff00) | ((getOSType!("rpaa") << 8) & 0xff0000) | (getOSType!("rpaa") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
90 kSecAuthenticationTypeHTTPBasic = ((getOSType!("http") >> 24) | ((getOSType!("http") >> 8) & 0xff00) | ((getOSType!("http") << 8) & 0xff0000) | (getOSType!("http") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91 kSecAuthenticationTypeHTTPDigest = ((getOSType!("httd") >> 24) | ((getOSType!("httd") >> 8) & 0xff00) | ((getOSType!("httd") << 8) & 0xff0000) | (getOSType!("httd") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
92 kSecAuthenticationTypeHTMLForm = ((getOSType!("form") >> 24) | ((getOSType!("form") >> 8) & 0xff00) | ((getOSType!("form") << 8) & 0xff0000) | (getOSType!("form") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
93 kSecAuthenticationTypeDefault = ((getOSType!("dflt") >> 24) | ((getOSType!("dflt") >> 8) & 0xff00) | ((getOSType!("dflt") << 8) & 0xff0000) | (getOSType!("dflt") & 0xff) << 24),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
94 kSecAuthenticationTypeAny = ((0 >> 24) | ((0 >> 8) & 0xff00) | ((0 << 8) & 0xff0000) | (0 & 0xff) << 24)
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
95 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
96
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
97 enum
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
98 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
99 kSecProtocolTypeFTP = getOSType!("ftp "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
100 kSecProtocolTypeFTPAccount = getOSType!("ftpa"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
101 kSecProtocolTypeHTTP = getOSType!("http"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
102 kSecProtocolTypeIRC = getOSType!("irc "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
103 kSecProtocolTypeNNTP = getOSType!("nntp"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
104 kSecProtocolTypePOP3 = getOSType!("pop3"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
105 kSecProtocolTypeSMTP = getOSType!("smtp"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
106 kSecProtocolTypeSOCKS = getOSType!("sox "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
107 kSecProtocolTypeIMAP = getOSType!("imap"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
108 kSecProtocolTypeLDAP = getOSType!("ldap"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
109 kSecProtocolTypeAppleTalk = getOSType!("atlk"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
110 kSecProtocolTypeAFP = getOSType!("afp "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
111 kSecProtocolTypeTelnet = getOSType!("teln"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
112 kSecProtocolTypeSSH = getOSType!("ssh "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
113 kSecProtocolTypeFTPS = getOSType!("ftps"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
114 kSecProtocolTypeHTTPS = getOSType!("htps"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
115 kSecProtocolTypeHTTPProxy = getOSType!("htpx"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
116 kSecProtocolTypeHTTPSProxy = getOSType!("htsx"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
117 kSecProtocolTypeFTPProxy = getOSType!("ftpx"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
118 kSecProtocolTypeCIFS = getOSType!("cifs"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
119 kSecProtocolTypeSMB = getOSType!("smb "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
120 kSecProtocolTypeRTSP = getOSType!("rtsp"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
121 kSecProtocolTypeRTSPProxy = getOSType!("rtsx"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
122 kSecProtocolTypeDAAP = getOSType!("daap"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
123 kSecProtocolTypeEPPC = getOSType!("eppc"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
124 kSecProtocolTypeIPP = getOSType!("ipp "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
125 kSecProtocolTypeNNTPS = getOSType!("ntps"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
126 kSecProtocolTypeLDAPS = getOSType!("ldps"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
127 kSecProtocolTypeTelnetS = getOSType!("tels"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
128 kSecProtocolTypeIMAPS = getOSType!("imps"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
129 kSecProtocolTypeIRCS = getOSType!("ircs"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
130 kSecProtocolTypePOP3S = getOSType!("pops"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
131 kSecProtocolTypeCVSpserver = getOSType!("cvsp"),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
132 kSecProtocolTypeSVN = getOSType!("svn "),
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
133 kSecProtocolTypeAny = 0
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
134 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
135
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
136 enum
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
137 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
138 kSecLockEvent = 1,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
139 kSecUnlockEvent = 2,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
140 kSecAddEvent = 3,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
141 kSecDeleteEvent = 4,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
142 kSecUpdateEvent = 5,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
143 kSecPasswordChangedEvent = 6,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
144 kSecDefaultChangedEvent = 9,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
145 kSecDataAccessEvent = 10,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
146 kSecKeychainListChangedEvent = 11,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
147 kSecTrustSettingsChangedEvent = 12
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
148 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
149
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
150 enum
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
151 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
152 kSecLockEventMask = 1 << kSecLockEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
153 kSecUnlockEventMask = 1 << kSecUnlockEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
154 kSecAddEventMask = 1 << kSecAddEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
155 kSecDeleteEventMask = 1 << kSecDeleteEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
156 kSecUpdateEventMask = 1 << kSecUpdateEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
157 kSecPasswordChangedEventMask = 1 << kSecPasswordChangedEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
158 kSecDefaultChangedEventMask = 1 << kSecDefaultChangedEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
159 kSecDataAccessEventMask = 1 << kSecDataAccessEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
160 kSecKeychainListChangedMask = 1 << kSecKeychainListChangedEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
161 kSecTrustSettingsChangedEventMask = 1 << kSecTrustSettingsChangedEvent,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
162 kSecEveryEventMask = 0xffffffff
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
163 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
164
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
165 enum SecPreferencesDomain
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
166 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
167 kSecPreferencesDomainUser,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
168 kSecPreferencesDomainSystem,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
169 kSecPreferencesDomainCommon,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
170 kSecPreferencesDomainDynamic
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
171 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
172
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
173 struct SecKeychainSettings
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
174 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
175 uint version_;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
176 ubyte lockOnSleep;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177 ubyte useLockInterval;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 uint lockInterval;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
181
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
182 struct SecKeychainCallbackInfo
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
183 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
184 uint version_;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
185 SecKeychainItemRef item;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
186 SecKeychainRef keychain;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
187 int pid;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
188 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
189
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
190 extern (C)
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
191 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
192 uint SecKeychainGetTypeID ();
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
193 int SecKeychainGetVersion (uint* returnVers);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
194 int SecKeychainOpen (char* pathName, SecKeychainRef* keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
195 int SecKeychainCreate (char* pathName, uint passwordLength, void* password, ubyte promptUser, SecAccessRef initialAccess, SecKeychainRef* keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
196 int SecKeychainDelete (SecKeychainRef keychainOrArray);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
197 int SecKeychainSetSettings (SecKeychainRef keychain, SecKeychainSettings* newSettings);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
198 int SecKeychainCopySettings (SecKeychainRef keychain, SecKeychainSettings* outSettings);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
199 int SecKeychainUnlock (SecKeychainRef keychain, uint passwordLength, void* password, ubyte usePassword);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
200 int SecKeychainLock (SecKeychainRef keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
201 int SecKeychainLockAll ();
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
202 int SecKeychainCopyDefault (SecKeychainRef* keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
203 int SecKeychainSetDefault (SecKeychainRef keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
204 int SecKeychainCopySearchList (CFArrayRef* searchList);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
205 int SecKeychainSetSearchList (CFArrayRef searchList);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
206 int SecKeychainCopyDomainDefault (int domain, SecKeychainRef* keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
207 int SecKeychainSetDomainDefault (int domain, SecKeychainRef keychain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
208 int SecKeychainCopyDomainSearchList (int domain, CFArrayRef* searchList);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
209 int SecKeychainSetDomainSearchList (int domain, CFArrayRef searchList);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
210 int SecKeychainSetPreferenceDomain (int domain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
211 int SecKeychainGetPreferenceDomain (SecPreferencesDomain* domain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
212 int SecKeychainGetStatus (SecKeychainRef keychain, SecKeychainStatus* keychainStatus);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
213 int SecKeychainGetPath (SecKeychainRef keychain, uint* ioPathLength, char* pathName);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
214 int SecKeychainAttributeInfoForItemID (SecKeychainRef keychain, uint itemID, SecKeychainAttributeInfo** info);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
215 int SecKeychainFreeAttributeInfo (SecKeychainAttributeInfo* info);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
216 int SecKeychainAddCallback (SecKeychainCallback callbackFunction, uint eventMask, void* userContext);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
217 int SecKeychainRemoveCallback (SecKeychainCallback callbackFunction);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
218 int SecKeychainAddInternetPassword (SecKeychainRef keychain, uint serverNameLength, char* serverName, uint securityDomainLength, char* securityDomain, uint accountNameLength, char* accountName, uint pathLength, char* path, ushort port, uint protocol, uint authenticationType, uint passwordLength, void* passwordData, SecKeychainItemRef* itemRef);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
219 int SecKeychainFindInternetPassword (CFTypeRef keychainOrArray, uint serverNameLength, char* serverName, uint securityDomainLength, char* securityDomain, uint accountNameLength, char* accountName, uint pathLength, char* path, ushort port, uint protocol, uint authenticationType, uint* passwordLength, void** passwordData, SecKeychainItemRef* itemRef);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
220 int SecKeychainAddGenericPassword (SecKeychainRef keychain, uint serviceNameLength, char* serviceName, uint accountNameLength, char* accountName, uint passwordLength, void* passwordData, SecKeychainItemRef* itemRef);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
221 int SecKeychainFindGenericPassword (CFTypeRef keychainOrArray, uint serviceNameLength, char* serviceName, uint accountNameLength, char* accountName, uint* passwordLength, void** passwordData, SecKeychainItemRef* itemRef);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
222 int SecKeychainSetUserInteractionAllowed (ubyte state);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
223 int SecKeychainGetUserInteractionAllowed (char* state);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
224 int SecKeychainGetCSPHandle (SecKeychainRef keychain, CSSM_CSP_HANDLE* cspHandle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
225 int SecKeychainGetDLDBHandle (SecKeychainRef keychain, CSSM_DL_DB_HANDLE* dldbHandle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
226 int SecKeychainCopyAccess (SecKeychainRef keychain, SecAccessRef* access);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
227 int SecKeychainSetAccess (SecKeychainRef keychain, SecAccessRef access);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
228 }