Mercurial > projects > dstep
view dstep/security/CMSEncoder.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 |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Jul 22, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.security.CMSEncoder; import dstep.corefoundation.CoreFoundation; import dstep.security.Security; //import dstep.stdint; struct _CMSEncoder; alias _CMSEncoder* CMSEncoderRef; alias uint CMSSignedAttributes; alias uint CMSCertificateChainMode; enum { kCMSAttrNone = 0x0000, kCMSAttrSmimeCapabilities = 0x0001, kCMSAttrSmimeEncryptionKeyPrefs = 0x0002, kCMSAttrSmimeMSEncryptionKeyPrefs = 0x0004, kCMSAttrSigningTime = 0x0008 } enum { kCMSCertificateNone = 0, kCMSCertificateSignerOnly, kCMSCertificateChain, kCMSCertificateChainWithRoot } extern (C) { uint CMSEncoderGetTypeID (); int CMSEncoderCreate (CMSEncoderRef* cmsEncoderOut); int CMSEncoderAddSigners (CMSEncoderRef cmsEncoder, CFTypeRef signerOrArray); int CMSEncoderCopySigners (CMSEncoderRef cmsEncoder, CFArrayRef* signersOut); int CMSEncoderAddRecipients (CMSEncoderRef cmsEncoder, CFTypeRef recipientOrArray); int CMSEncoderCopyRecipients (CMSEncoderRef cmsEncoder, CFArrayRef* recipientsOut); int CMSEncoderSetHasDetachedContent (CMSEncoderRef cmsEncoder, ubyte detachedContent); int CMSEncoderGetHasDetachedContent (CMSEncoderRef cmsEncoder, char* detachedContentOut); int CMSEncoderSetEncapsulatedContentType (CMSEncoderRef cmsEncoder, CSSM_OID* eContentType); int CMSEncoderCopyEncapsulatedContentType (CMSEncoderRef cmsEncoder, CFDataRef* eContentTypeOut); int CMSEncoderAddSupportingCerts (CMSEncoderRef cmsEncoder, CFTypeRef certOrArray); int CMSEncoderCopySupportingCerts (CMSEncoderRef cmsEncoder, CFArrayRef* certsOut); int CMSEncoderAddSignedAttributes (CMSEncoderRef cmsEncoder, uint signedAttributes); int CMSEncoderSetCertificateChainMode (CMSEncoderRef cmsEncoder, uint chainMode); int CMSEncoderGetCertificateChainMode (CMSEncoderRef cmsEncoder, CMSCertificateChainMode* chainModeOut); int CMSEncoderUpdateContent (CMSEncoderRef cmsEncoder, void* content, uint contentLen); int CMSEncoderCopyEncodedContent (CMSEncoderRef cmsEncoder, CFDataRef* encodedContentOut); int CMSEncode (CFTypeRef signers, CFTypeRef recipients, CSSM_OID* eContentType, ubyte detachedContent, uint signedAttributes, void* content, uint contentLen, CFDataRef* encodedContentOut); }