Mercurial > projects > dstep
view dstep/security/eisl.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.eisl; import dstep.security.cssmconfig; alias void* ISL_ITERATOR_PTR; alias void* ISL_VERIFIED_SIGNATURE_ROOT_PTR; alias void* ISL_VERIFIED_CERTIFICATE_CHAIN_PTR; alias void* ISL_VERIFIED_CERTIFICATE_PTR; alias void* ISL_MANIFEST_SECTION_PTR; alias void* ISL_VERIFIED_MODULE_PTR; alias ISL_CONST_DATA* ISL_CONST_DATA_PTR; extern (C) { alias void function () ISL_FUNCTION_PTR; } enum isl_status { ISL_OK = 0, ISL_FAIL = -1 } struct ISL_DATA { uint Length; char* Data; } struct ISL_CONST_DATA { uint Length; char* Data; } extern (C) { ISL_VERIFIED_MODULE_PTR EISL_SelfCheck (); ISL_VERIFIED_MODULE_PTR EISL_VerifyAndLoadModuleAndCredentialData (ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA PublicKey); ISL_VERIFIED_MODULE_PTR EISL_VerifyAndLoadModuleAndCredentialDataWithCertificate (ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA Certificate); ISL_VERIFIED_MODULE_PTR EISL_VerifyAndLoadModuleAndCredentials (ISL_CONST_DATA Credentials, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA PublicKey); ISL_VERIFIED_MODULE_PTR EISL_VerifyAndLoadModuleAndCredentialsWithCertificate (ISL_CONST_DATA Credentials, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA Certificate); ISL_VERIFIED_MODULE_PTR EISL_VerifyLoadedModuleAndCredentialData (ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA PublicKey); ISL_VERIFIED_MODULE_PTR EISL_VerifyLoadedModuleAndCredentialDataWithCertificate (ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA Certificate); ISL_VERIFIED_MODULE_PTR EISL_VerifyLoadedModuleAndCredentials (ISL_CONST_DATA Credentials, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA PublicKey); ISL_VERIFIED_MODULE_PTR EISL_VerifyLoadedModuleAndCredentialsWithCertificate (ISL_CONST_DATA Credentials, ISL_CONST_DATA Name, ISL_CONST_DATA Signer, ISL_CONST_DATA Certificate); ISL_VERIFIED_CERTIFICATE_CHAIN_PTR EISL_GetCertificateChain (ISL_VERIFIED_MODULE_PTR Module); uint EISL_ContinueVerification (ISL_VERIFIED_MODULE_PTR Module, uint WorkFactor); ISL_VERIFIED_MODULE_PTR EISL_DuplicateVerifiedModulePtr (ISL_VERIFIED_MODULE_PTR Module); int EISL_RecycleVerifiedModuleCredentials (ISL_VERIFIED_MODULE_PTR Verification); ISL_VERIFIED_SIGNATURE_ROOT_PTR EISL_CreateVerifiedSignatureRootWithCredentialData (ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath, ISL_CONST_DATA Signer, ISL_CONST_DATA PublicKey); ISL_VERIFIED_SIGNATURE_ROOT_PTR EISL_CreateVerifiedSignatureRootWithCredentialDataAndCertificate (ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath, ISL_VERIFIED_CERTIFICATE_PTR Cert); ISL_VERIFIED_SIGNATURE_ROOT_PTR EISL_CreateVerfiedSignatureRoot (ISL_CONST_DATA Credentials, ISL_CONST_DATA Signer, ISL_CONST_DATA PublicKey); ISL_VERIFIED_SIGNATURE_ROOT_PTR EISL_CreateVerfiedSignatureRootWithCertificate (ISL_CONST_DATA Credentials, ISL_VERIFIED_CERTIFICATE_PTR Cert); ISL_MANIFEST_SECTION_PTR EISL_FindManifestSection (ISL_VERIFIED_SIGNATURE_ROOT_PTR Root, ISL_CONST_DATA Name); ISL_ITERATOR_PTR EISL_CreateManifestSectionEnumerator (ISL_VERIFIED_SIGNATURE_ROOT_PTR Root); ISL_MANIFEST_SECTION_PTR EISL_GetNextManifestSection (ISL_ITERATOR_PTR Iterator); int EISL_RecycleManifestSectionEnumerator (ISL_ITERATOR_PTR Iterator); int EISL_FindManifestAttribute (ISL_VERIFIED_SIGNATURE_ROOT_PTR Context, ISL_CONST_DATA Name, ISL_CONST_DATA_PTR Value); ISL_ITERATOR_PTR EISL_CreateManifestAttributeEnumerator (ISL_VERIFIED_SIGNATURE_ROOT_PTR Context); int EISL_FindSignerInfoAttribute (ISL_VERIFIED_SIGNATURE_ROOT_PTR Context, ISL_CONST_DATA Name, ISL_CONST_DATA_PTR Value); ISL_ITERATOR_PTR EISL_CreateSignerInfoAttributeEnumerator (ISL_VERIFIED_SIGNATURE_ROOT_PTR Context); int EISL_GetNextAttribute (ISL_ITERATOR_PTR Iterator, ISL_CONST_DATA_PTR Name, ISL_CONST_DATA_PTR Value); int EISL_RecycleAttributeEnumerator (ISL_ITERATOR_PTR Iterator); int EISL_FindSignatureAttribute (ISL_VERIFIED_SIGNATURE_ROOT_PTR Root, ISL_CONST_DATA Name, ISL_CONST_DATA_PTR Value); ISL_ITERATOR_PTR EISL_CreateSignatureAttributeEnumerator (ISL_VERIFIED_SIGNATURE_ROOT_PTR Root); int EISL_GetNextSignatureAttribute (ISL_ITERATOR_PTR Iterator, ISL_CONST_DATA_PTR Name, ISL_CONST_DATA_PTR Value); int EISL_RecycleSignatureAttributeEnumerator (ISL_ITERATOR_PTR Iterator); int EISL_RecycleVerifiedSignatureRoot (ISL_VERIFIED_SIGNATURE_ROOT_PTR Root); ISL_VERIFIED_CERTIFICATE_CHAIN_PTR EISL_CreateCertificateChainWithCredentialData (ISL_CONST_DATA RootIssuer, ISL_CONST_DATA PublicKey, ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath); ISL_VERIFIED_CERTIFICATE_CHAIN_PTR EISL_CreateCertificateChainWithCredentialDataAndCertificate (ISL_CONST_DATA Certificate, ISL_CONST_DATA CredentialsImage, ISL_CONST_DATA ModuleSearchPath); ISL_VERIFIED_CERTIFICATE_CHAIN_PTR EISL_CreateCertificateChain (ISL_CONST_DATA RootIssuer, ISL_CONST_DATA PublicKey, ISL_CONST_DATA Credential); ISL_VERIFIED_CERTIFICATE_CHAIN_PTR EISL_CreateCertificateChainWithCertificate (ISL_CONST_DATA Certificate, ISL_CONST_DATA Credential); uint EISL_CopyCertificateChain (ISL_VERIFIED_CERTIFICATE_CHAIN_PTR Verification, ISL_VERIFIED_CERTIFICATE_PTR* Certs, uint MaxCertificates); int EISL_RecycleVerifiedCertificateChain (ISL_VERIFIED_CERTIFICATE_CHAIN_PTR Chain); int EISL_FindCertificateAttribute (ISL_VERIFIED_CERTIFICATE_PTR Cert, ISL_CONST_DATA Name, ISL_CONST_DATA_PTR Value); ISL_ITERATOR_PTR EISL_CreateCertificateAttributeEnumerator (ISL_VERIFIED_CERTIFICATE_PTR Cert); int EISL_GetNextCertificateAttribute (ISL_ITERATOR_PTR CertIterator, ISL_CONST_DATA_PTR Name, ISL_CONST_DATA_PTR Value); int EISL_RecycleCertificateAttributeEnumerator (ISL_ITERATOR_PTR CertIterator); ISL_VERIFIED_SIGNATURE_ROOT_PTR EISL_GetManifestSignatureRoot (ISL_MANIFEST_SECTION_PTR Section); ISL_VERIFIED_MODULE_PTR EISL_VerifyAndLoadModule (ISL_MANIFEST_SECTION_PTR Section); ISL_VERIFIED_MODULE_PTR EISL_VerifyLoadedModule (ISL_MANIFEST_SECTION_PTR Section); int EISL_FindManifestSectionAttribute (ISL_MANIFEST_SECTION_PTR Section, ISL_CONST_DATA Name, ISL_CONST_DATA_PTR Value); ISL_ITERATOR_PTR EISL_CreateManifestSectionAttributeEnumerator (ISL_MANIFEST_SECTION_PTR Section); int EISL_GetNextManifestSectionAttribute (ISL_ITERATOR_PTR Iterator, ISL_CONST_DATA_PTR Name, ISL_CONST_DATA_PTR Value); int EISL_RecycleManifestSectionAttributeEnumerator (ISL_ITERATOR_PTR Iterator); ISL_MANIFEST_SECTION_PTR EISL_GetModuleManifestSection (ISL_VERIFIED_MODULE_PTR Module); ISL_FUNCTION_PTR EISL_LocateProcedureAddress (ISL_VERIFIED_MODULE_PTR Module, ISL_CONST_DATA Name); int EISL_CheckAddressWithinModule (ISL_VERIFIED_MODULE_PTR Verification, ISL_FUNCTION_PTR Address); int EISL_CheckDataAddressWithinModule (ISL_VERIFIED_MODULE_PTR Verification, void* Address); void* EISL_GetLibHandle (ISL_VERIFIED_MODULE_PTR Verification); }