X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/ce3c8656732c924baf7e88df75eab50891bdc471..fa7225c82381bac4432a6edf16f53b5370238d85:/OSX/libsecurity_cdsa_plugin/lib/ACabstractsession.cpp diff --git a/OSX/libsecurity_cdsa_plugin/lib/ACabstractsession.cpp b/OSX/libsecurity_cdsa_plugin/lib/ACabstractsession.cpp new file mode 100644 index 00000000..6caef051 --- /dev/null +++ b/OSX/libsecurity_cdsa_plugin/lib/ACabstractsession.cpp @@ -0,0 +1,69 @@ +// +// AC plugin transition layer. +// This file was automatically generated. Do not edit on penalty of futility! +// +#include +#include +#include +#include + + +ACAbstractPluginSession::~ACAbstractPluginSession() +{ /* virtual */ } + +static CSSM_RETURN CSSMACI cssm_AuthCompute(CSSM_AC_HANDLE ACHandle, + const CSSM_TUPLEGROUP *BaseAuthorizations, + const CSSM_TUPLEGROUP *Credentials, + uint32 NumberOfRequestors, + const CSSM_LIST *Requestors, + const CSSM_LIST *RequestedAuthorizationPeriod, + const CSSM_LIST *RequestedAuthorization, + CSSM_TUPLEGROUP_PTR AuthorizationResult) +{ + BEGIN_API + findSession(ACHandle).AuthCompute(Required(BaseAuthorizations), + Credentials, + NumberOfRequestors, + Required(Requestors), + RequestedAuthorizationPeriod, + Required(RequestedAuthorization), + Required(AuthorizationResult)); + END_API(AC) +} + +static CSSM_RETURN CSSMACI cssm_PassThrough(CSSM_AC_HANDLE ACHandle, + CSSM_TP_HANDLE TPHandle, + CSSM_CL_HANDLE CLHandle, + CSSM_CC_HANDLE CCHandle, + const CSSM_DL_DB_LIST *DBList, + uint32 PassThroughId, + const void *InputParams, + void **OutputParams) +{ + BEGIN_API + findSession(ACHandle).PassThrough(TPHandle, + CLHandle, + CCHandle, + Required(DBList), + PassThroughId, + InputParams, + OutputParams); + END_API(AC) +} + + +static const CSSM_SPI_AC_FUNCS ACFunctionStruct = { + cssm_AuthCompute, + cssm_PassThrough, +}; + +static CSSM_MODULE_FUNCS ACFunctionTable = { + CSSM_SERVICE_AC, // service type + 2, // number of functions + (const CSSM_PROC_ADDR *)&ACFunctionStruct +}; + +CSSM_MODULE_FUNCS_PTR ACPluginSession::construct() +{ + return &ACFunctionTable; +}