annotate dstep/security/SecTrust.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents 07194b026fa4
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.SecTrust;
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.CoreFoundation;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.coreservices.carboncore.MacTypes : OSStatus;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 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
12 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
13 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
14
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 alias int SecTrustUserSetting;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 alias OpaqueSecTrustRef* SecTrustRef;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 enum SecTrustResultType
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 kSecTrustResultInvalid,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 kSecTrustResultProceed,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 kSecTrustResultConfirm,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 kSecTrustResultDeny,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 kSecTrustResultUnspecified,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 kSecTrustResultRecoverableTrustFailure,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 kSecTrustResultFatalTrustFailure,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 kSecTrustResultOtherError
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
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 extern (C)
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 uint SecTrustGetTypeID ();
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 int SecTrustCreateWithCertificates (CFArrayRef certificates, CFTypeRef policies, SecTrustRef* trustRef);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 int SecTrustSetPolicies (SecTrustRef trust, CFTypeRef policies);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 int SecTrustSetParameters (SecTrustRef trustRef, uint action, CFDataRef actionData);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 int SecTrustSetAnchorCertificates (SecTrustRef trust, CFArrayRef anchorCertificates);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 int SecTrustSetKeychains (SecTrustRef trust, CFTypeRef keychainOrArray);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 int SecTrustSetVerifyDate (SecTrustRef trust, CFDateRef verifyDate);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 int SecTrustEvaluate (SecTrustRef trust, SecTrustResultType* result);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 int SecTrustGetResult (SecTrustRef trustRef, SecTrustResultType* result, CFArrayRef* certChain, CSSM_TP_APPLE_EVIDENCE_INFO** statusChain);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 int SecTrustGetCssmResult (SecTrustRef trust, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR* result);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 int SecTrustGetCssmResultCode (SecTrustRef trust, OSStatus* resultCode);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 int SecTrustGetTPHandle (SecTrustRef trust, CSSM_TP_HANDLE* handle);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 int SecTrustCopyPolicies (SecTrustRef trust, CFArrayRef* policies);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 int SecTrustCopyCustomAnchorCertificates (SecTrustRef trust, CFArrayRef* anchors);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 int SecTrustCopyAnchorCertificates (CFArrayRef* anchors);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 int SecTrustGetCSSMAnchorCertificates (CSSM_DATA** cssmAnchors, uint* cssmAnchorCount);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 int SecTrustGetUserTrust (SecCertificateRef certificate, SecPolicyRef policy, SecTrustUserSetting* trustSetting);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 int SecTrustSetUserTrust (SecCertificateRef certificate, SecPolicyRef policy, int trustSetting);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 }