Mercurial > projects > dstep
view dstep/security/CMSDecoder.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.CMSDecoder; import dstep.corefoundation.CoreFoundation; import dstep.security.Security; //import dstep.stdint; struct _CMSDecoder; alias _CMSDecoder* CMSDecoderRef; alias uint CMSSignerStatus; enum { kCMSSignerUnsigned = 0, kCMSSignerValid, kCMSSignerNeedsDetachedContent, kCMSSignerInvalidSignature, kCMSSignerInvalidCert, kCMSSignerInvalidIndex } extern (C) { uint CMSDecoderGetTypeID (); int CMSDecoderCreate (CMSDecoderRef* cmsDecoderOut); int CMSDecoderUpdateMessage (CMSDecoderRef cmsDecoder, void* msgBytes, uint msgBytesLen); int CMSDecoderFinalizeMessage (CMSDecoderRef cmsDecoder); int CMSDecoderSetDetachedContent (CMSDecoderRef cmsDecoder, CFDataRef detachedContent); int CMSDecoderCopyDetachedContent (CMSDecoderRef cmsDecoder, CFDataRef* detachedContentOut); int CMSDecoderSetSearchKeychain (CMSDecoderRef cmsDecoder, CFTypeRef keychainOrArray); int CMSDecoderGetNumSigners (CMSDecoderRef cmsDecoder, size_t* numSignersOut); int CMSDecoderCopySignerStatus (CMSDecoderRef cmsDecoder, uint signerIndex, CFTypeRef policyOrArray, ubyte evaluateSecTrust, CMSSignerStatus* signerStatusOut, SecTrustRef* secTrustOut, OSStatus* certVerifyResultCodeOut); int CMSDecoderCopySignerEmailAddress (CMSDecoderRef cmsDecoder, uint signerIndex, CFStringRef* signerEmailAddressOut); int CMSDecoderCopySignerCert (CMSDecoderRef cmsDecoder, uint signerIndex, SecCertificateRef* signerCertOut); int CMSDecoderIsContentEncrypted (CMSDecoderRef cmsDecoder, char* isEncryptedOut); int CMSDecoderCopyEncapsulatedContentType (CMSDecoderRef cmsDecoder, CFDataRef* eContentTypeOut); int CMSDecoderCopyAllCerts (CMSDecoderRef cmsDecoder, CFArrayRef* certsOut); int CMSDecoderCopyContent (CMSDecoderRef cmsDecoder, CFDataRef* contentOut); }