]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cdsa_plugin/lib/ACabstractsession.cpp
Security-58286.270.3.0.1.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_plugin / lib / ACabstractsession.cpp
1 //
2 // AC plugin transition layer.
3 // This file was automatically generated. Do not edit on penalty of futility!
4 //
5 #include <security_cdsa_plugin/ACsession.h>
6 #include <security_cdsa_plugin/cssmplugin.h>
7 #include <security_cdsa_utilities/cssmbridge.h>
8 #include <Security/cssmaci.h>
9
10
11 ACAbstractPluginSession::~ACAbstractPluginSession()
12 { /* virtual */ }
13
14 static CSSM_RETURN CSSMACI cssm_AuthCompute(CSSM_AC_HANDLE ACHandle,
15 const CSSM_TUPLEGROUP *BaseAuthorizations,
16 const CSSM_TUPLEGROUP *Credentials,
17 uint32 NumberOfRequestors,
18 const CSSM_LIST *Requestors,
19 const CSSM_LIST *RequestedAuthorizationPeriod,
20 const CSSM_LIST *RequestedAuthorization,
21 CSSM_TUPLEGROUP_PTR AuthorizationResult)
22 {
23 BEGIN_API
24 findSession<ACPluginSession>(ACHandle).AuthCompute(Required(BaseAuthorizations),
25 Credentials,
26 NumberOfRequestors,
27 Required(Requestors),
28 RequestedAuthorizationPeriod,
29 Required(RequestedAuthorization),
30 Required(AuthorizationResult));
31 END_API(AC)
32 }
33
34 static CSSM_RETURN CSSMACI cssm_PassThrough(CSSM_AC_HANDLE ACHandle,
35 CSSM_TP_HANDLE TPHandle,
36 CSSM_CL_HANDLE CLHandle,
37 CSSM_CC_HANDLE CCHandle,
38 const CSSM_DL_DB_LIST *DBList,
39 uint32 PassThroughId,
40 const void *InputParams,
41 void **OutputParams)
42 {
43 BEGIN_API
44 findSession<ACPluginSession>(ACHandle).PassThrough(TPHandle,
45 CLHandle,
46 CCHandle,
47 Required(DBList),
48 PassThroughId,
49 InputParams,
50 OutputParams);
51 END_API(AC)
52 }
53
54
55 static const CSSM_SPI_AC_FUNCS ACFunctionStruct = {
56 cssm_AuthCompute,
57 cssm_PassThrough,
58 };
59
60 static CSSM_MODULE_FUNCS ACFunctionTable = {
61 CSSM_SERVICE_AC, // service type
62 2, // number of functions
63 (const CSSM_PROC_ADDR *)&ACFunctionStruct
64 };
65
66 CSSM_MODULE_FUNCS_PTR ACPluginSession::construct()
67 {
68 return &ACFunctionTable;
69 }