]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cdsa_plugin/lib/ACabstractsession.cpp
Security-59754.41.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 // The disclaimer up top used to be true but rdar://24426719 removed libsecurity_cdsa_plugin_generate
10 #include "LegacyAPICounts.h"
11
12 ACAbstractPluginSession::~ACAbstractPluginSession()
13 { /* virtual */ }
14
15 static CSSM_RETURN CSSMACI cssm_AuthCompute(CSSM_AC_HANDLE ACHandle,
16 const CSSM_TUPLEGROUP *BaseAuthorizations,
17 const CSSM_TUPLEGROUP *Credentials,
18 uint32 NumberOfRequestors,
19 const CSSM_LIST *Requestors,
20 const CSSM_LIST *RequestedAuthorizationPeriod,
21 const CSSM_LIST *RequestedAuthorization,
22 CSSM_TUPLEGROUP_PTR AuthorizationResult)
23 {
24 BEGIN_API
25 findSession<ACPluginSession>(ACHandle).AuthCompute(Required(BaseAuthorizations),
26 Credentials,
27 NumberOfRequestors,
28 Required(Requestors),
29 RequestedAuthorizationPeriod,
30 Required(RequestedAuthorization),
31 Required(AuthorizationResult));
32 END_API(AC)
33 }
34
35 static CSSM_RETURN CSSMACI cssm_PassThrough(CSSM_AC_HANDLE ACHandle,
36 CSSM_TP_HANDLE TPHandle,
37 CSSM_CL_HANDLE CLHandle,
38 CSSM_CC_HANDLE CCHandle,
39 const CSSM_DL_DB_LIST *DBList,
40 uint32 PassThroughId,
41 const void *InputParams,
42 void **OutputParams)
43 {
44 BEGIN_API
45 findSession<ACPluginSession>(ACHandle).PassThrough(TPHandle,
46 CLHandle,
47 CCHandle,
48 Required(DBList),
49 PassThroughId,
50 InputParams,
51 OutputParams);
52 END_API(AC)
53 }
54
55
56 static const CSSM_SPI_AC_FUNCS ACFunctionStruct = {
57 cssm_AuthCompute,
58 cssm_PassThrough,
59 };
60
61 static CSSM_MODULE_FUNCS ACFunctionTable = {
62 CSSM_SERVICE_AC, // service type
63 2, // number of functions
64 (const CSSM_PROC_ADDR *)&ACFunctionStruct
65 };
66
67 CSSM_MODULE_FUNCS_PTR ACPluginSession::construct()
68 {
69 return &ACFunctionTable;
70 }