annotate dstep/security/SecImportExport.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 19885b43130e
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.SecImportExport;
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.security.SecAccess;
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.SecKeychain;
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 //import dstep.stdint;
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 SecExternalFormat;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 alias uint SecExternalItemType;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 alias uint SecItemImportExportFlags;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 alias uint SecKeyImportExportFlags;
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 enum
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 kSecFormatUnknown = 0,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 kSecFormatOpenSSL,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 kSecFormatSSH,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 kSecFormatBSAFE,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 kSecFormatRawKey,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 kSecFormatWrappedPKCS8,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 kSecFormatWrappedOpenSSL,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 kSecFormatWrappedSSH,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 kSecFormatWrappedLSH,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 kSecFormatX509Cert,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 kSecFormatPEMSequence,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 kSecFormatPKCS7,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 kSecFormatPKCS12,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 kSecFormatNetscapeCertSequence,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 kSecFormatSSHv2
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 }
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 enum
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 kSecItemTypeUnknown,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 kSecItemTypePrivateKey,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 kSecItemTypePublicKey,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 kSecItemTypeSessionKey,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 kSecItemTypeCertificate,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 kSecItemTypeAggregate
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 }
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 enum
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 kSecItemPemArmour = 0x00000001
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 }
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 enum
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 kSecKeyImportOnlyOne = 0x00000001,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 kSecKeySecurePassphrase = 0x00000002,
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 kSecKeyNoAccessControl = 0x00000004
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
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 struct SecKeyImportExportParameters
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 {
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 uint version_;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 uint flags;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 CFTypeRef passphrase;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 CFStringRef alertTitle;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 CFStringRef alertPrompt;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 SecAccessRef accessRef;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 uint keyUsage;
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 uint keyAttributes;
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 extern (C)
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 SecKeychainItemExport (CFTypeRef keychainItemOrArray, uint outputFormat, uint flags, SecKeyImportExportParameters* keyParams, CFDataRef* exportedData);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 int SecKeychainItemImport (CFDataRef importedData, CFStringRef fileNameOrExtension, SecExternalFormat* inputFormat, SecExternalItemType* itemType, uint flags, SecKeyImportExportParameters* keyParams, SecKeychainRef importKeychain, CFArrayRef* outItems);
07194b026fa4 Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 }