2 // CSP plugin transition layer.
3 // This file was automatically generated. Do not edit on penalty of futility!
5 #include <security_cdsa_plugin/CSPsession.h>
6 #include <security_cdsa_plugin/cssmplugin.h>
7 #include <security_cdsa_utilities/cssmbridge.h>
8 #include <Security/cssmcspi.h>
11 CSPAbstractPluginSession::~CSPAbstractPluginSession()
14 static CSSM_RETURN CSSMCSPI
cssm_ObtainPrivateKeyFromPublicKey(CSSM_CSP_HANDLE CSPHandle
,
15 const CSSM_KEY
*PublicKey
,
16 CSSM_KEY_PTR PrivateKey
)
19 findSession
<CSPPluginSession
>(CSPHandle
).ObtainPrivateKeyFromPublicKey(CssmKey::required(PublicKey
),
20 CssmKey::required(PrivateKey
));
24 static CSSM_RETURN CSSMCSPI
cssm_GetOperationalStatistics(CSSM_CSP_HANDLE CSPHandle
,
25 CSSM_CSP_OPERATIONAL_STATISTICS
*Statistics
)
28 findSession
<CSPPluginSession
>(CSPHandle
).GetOperationalStatistics(CSPOperationalStatistics::required(Statistics
));
32 static CSSM_RETURN CSSMCSPI
cssm_ChangeLoginOwner(CSSM_CSP_HANDLE CSPHandle
,
33 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
34 const CSSM_ACL_OWNER_PROTOTYPE
*NewOwner
)
37 findSession
<CSPPluginSession
>(CSPHandle
).ChangeLoginOwner(AccessCredentials::required(AccessCred
),
42 static CSSM_RETURN CSSMCSPI
cssm_EventNotify(CSSM_CSP_HANDLE CSPHandle
,
43 CSSM_CONTEXT_EVENT Event
,
44 CSSM_CC_HANDLE CCHandle
,
45 const CSSM_CONTEXT
*Context
)
48 findSession
<CSPPluginSession
>(CSPHandle
).EventNotify(Event
,
50 Context::required(Context
));
54 static CSSM_RETURN CSSMCSPI
cssm_DecryptDataInit(CSSM_CSP_HANDLE CSPHandle
,
55 CSSM_CC_HANDLE CCHandle
,
56 const CSSM_CONTEXT
*Context
,
57 CSSM_PRIVILEGE Privilege
)
60 findSession
<CSPPluginSession
>(CSPHandle
).DecryptDataInit(CCHandle
,
61 Context::required(Context
),
66 static CSSM_RETURN CSSMCSPI
cssm_SignDataInit(CSSM_CSP_HANDLE CSPHandle
,
67 CSSM_CC_HANDLE CCHandle
,
68 const CSSM_CONTEXT
*Context
)
71 findSession
<CSPPluginSession
>(CSPHandle
).SignDataInit(CCHandle
,
72 Context::required(Context
));
76 static CSSM_RETURN CSSMCSPI
cssm_DigestData(CSSM_CSP_HANDLE CSPHandle
,
77 CSSM_CC_HANDLE CCHandle
,
78 const CSSM_CONTEXT
*Context
,
79 const CSSM_DATA
*DataBufs
,
84 findSession
<CSPPluginSession
>(CSPHandle
).DigestData(CCHandle
,
85 Context::required(Context
),
86 &CssmData::required(DataBufs
),
88 CssmData::required(Digest
));
92 static CSSM_RETURN CSSMCSPI
cssm_GetKeyOwner(CSSM_CSP_HANDLE CSPHandle
,
94 CSSM_ACL_OWNER_PROTOTYPE_PTR Owner
)
97 findSession
<CSPPluginSession
>(CSPHandle
).GetKeyOwner(CssmKey::required(Key
),
102 static CSSM_RETURN CSSMCSPI
cssm_GetLoginAcl(CSSM_CSP_HANDLE CSPHandle
,
103 const CSSM_STRING
*SelectionTag
,
104 uint32
*NumberOfAclInfos
,
105 CSSM_ACL_ENTRY_INFO_PTR
*AclInfos
)
108 findSession
<CSPPluginSession
>(CSPHandle
).GetLoginAcl(SelectionTag
,
109 Required(NumberOfAclInfos
),
114 static CSSM_RETURN CSSMCSPI
cssm_VerifyMac(CSSM_CSP_HANDLE CSPHandle
,
115 CSSM_CC_HANDLE CCHandle
,
116 const CSSM_CONTEXT
*Context
,
117 const CSSM_DATA
*DataBufs
,
119 const CSSM_DATA
*Mac
)
122 findSession
<CSPPluginSession
>(CSPHandle
).VerifyMac(CCHandle
,
123 Context::required(Context
),
124 &CssmData::required(DataBufs
),
126 CssmData::required(Mac
));
130 static CSSM_RETURN CSSMCSPI
cssm_SignDataFinal(CSSM_CSP_HANDLE CSPHandle
,
131 CSSM_CC_HANDLE CCHandle
,
132 CSSM_DATA_PTR Signature
)
135 findSession
<CSPPluginSession
>(CSPHandle
).SignDataFinal(CCHandle
,
136 CssmData::required(Signature
));
140 static CSSM_RETURN CSSMCSPI
cssm_VerifyDataUpdate(CSSM_CSP_HANDLE CSPHandle
,
141 CSSM_CC_HANDLE CCHandle
,
142 const CSSM_DATA
*DataBufs
,
146 findSession
<CSPPluginSession
>(CSPHandle
).VerifyDataUpdate(CCHandle
,
147 &CssmData::required(DataBufs
),
152 static CSSM_RETURN CSSMCSPI
cssm_GenerateMac(CSSM_CSP_HANDLE CSPHandle
,
153 CSSM_CC_HANDLE CCHandle
,
154 const CSSM_CONTEXT
*Context
,
155 const CSSM_DATA
*DataBufs
,
160 findSession
<CSPPluginSession
>(CSPHandle
).GenerateMac(CCHandle
,
161 Context::required(Context
),
162 &CssmData::required(DataBufs
),
164 CssmData::required(Mac
));
168 static CSSM_RETURN CSSMCSPI
cssm_VerifyMacFinal(CSSM_CSP_HANDLE CSPHandle
,
169 CSSM_CC_HANDLE CCHandle
,
170 const CSSM_DATA
*Mac
)
173 findSession
<CSPPluginSession
>(CSPHandle
).VerifyMacFinal(CCHandle
,
174 CssmData::required(Mac
));
178 static CSSM_RETURN CSSMCSPI
cssm_GenerateRandom(CSSM_CSP_HANDLE CSPHandle
,
179 CSSM_CC_HANDLE CCHandle
,
180 const CSSM_CONTEXT
*Context
,
181 CSSM_DATA_PTR RandomNumber
)
184 findSession
<CSPPluginSession
>(CSPHandle
).GenerateRandom(CCHandle
,
185 Context::required(Context
),
186 CssmData::required(RandomNumber
));
190 static CSSM_RETURN CSSMCSPI
cssm_RetrieveUniqueId(CSSM_CSP_HANDLE CSPHandle
,
191 CSSM_DATA_PTR UniqueID
)
194 findSession
<CSPPluginSession
>(CSPHandle
).RetrieveUniqueId(CssmData::required(UniqueID
));
198 static CSSM_RETURN CSSMCSPI
cssm_UnwrapKey(CSSM_CSP_HANDLE CSPHandle
,
199 CSSM_CC_HANDLE CCHandle
,
200 const CSSM_CONTEXT
*Context
,
201 const CSSM_KEY
*PublicKey
,
202 const CSSM_WRAP_KEY
*WrappedKey
,
205 const CSSM_DATA
*KeyLabel
,
206 const CSSM_RESOURCE_CONTROL_CONTEXT
*CredAndAclEntry
,
207 CSSM_KEY_PTR UnwrappedKey
,
208 CSSM_DATA_PTR DescriptiveData
,
209 CSSM_PRIVILEGE Privilege
)
212 findSession
<CSPPluginSession
>(CSPHandle
).UnwrapKey(CCHandle
,
213 Context::required(Context
),
214 CssmKey::optional(PublicKey
),
215 CssmKey::required(WrappedKey
),
218 CssmData::optional(KeyLabel
),
220 CssmKey::required(UnwrappedKey
),
221 CssmData::required(DescriptiveData
),
226 static CSSM_RETURN CSSMCSPI
cssm_GenerateMacFinal(CSSM_CSP_HANDLE CSPHandle
,
227 CSSM_CC_HANDLE CCHandle
,
231 findSession
<CSPPluginSession
>(CSPHandle
).GenerateMacFinal(CCHandle
,
232 CssmData::required(Mac
));
236 static CSSM_RETURN CSSMCSPI
cssm_WrapKey(CSSM_CSP_HANDLE CSPHandle
,
237 CSSM_CC_HANDLE CCHandle
,
238 const CSSM_CONTEXT
*Context
,
239 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
241 const CSSM_DATA
*DescriptiveData
,
242 CSSM_WRAP_KEY_PTR WrappedKey
,
243 CSSM_PRIVILEGE Privilege
)
246 findSession
<CSPPluginSession
>(CSPHandle
).WrapKey(CCHandle
,
247 Context::required(Context
),
248 AccessCredentials::required(AccessCred
),
249 CssmKey::required(Key
),
250 CssmData::optional(DescriptiveData
),
251 CssmKey::required(WrappedKey
),
256 static CSSM_RETURN CSSMCSPI
cssm_DecryptDataFinal(CSSM_CSP_HANDLE CSPHandle
,
257 CSSM_CC_HANDLE CCHandle
,
258 CSSM_DATA_PTR RemData
)
261 findSession
<CSPPluginSession
>(CSPHandle
).DecryptDataFinal(CCHandle
,
262 CssmData::required(RemData
));
266 static CSSM_RETURN CSSMCSPI
cssm_SignData(CSSM_CSP_HANDLE CSPHandle
,
267 CSSM_CC_HANDLE CCHandle
,
268 const CSSM_CONTEXT
*Context
,
269 const CSSM_DATA
*DataBufs
,
271 CSSM_ALGORITHMS DigestAlgorithm
,
272 CSSM_DATA_PTR Signature
)
275 findSession
<CSPPluginSession
>(CSPHandle
).SignData(CCHandle
,
276 Context::required(Context
),
277 &CssmData::required(DataBufs
),
280 CssmData::required(Signature
));
284 static CSSM_RETURN CSSMCSPI
cssm_EncryptDataInit(CSSM_CSP_HANDLE CSPHandle
,
285 CSSM_CC_HANDLE CCHandle
,
286 const CSSM_CONTEXT
*Context
,
287 CSSM_PRIVILEGE Privilege
)
290 findSession
<CSPPluginSession
>(CSPHandle
).EncryptDataInit(CCHandle
,
291 Context::required(Context
),
296 static CSSM_RETURN CSSMCSPI
cssm_VerifyData(CSSM_CSP_HANDLE CSPHandle
,
297 CSSM_CC_HANDLE CCHandle
,
298 const CSSM_CONTEXT
*Context
,
299 const CSSM_DATA
*DataBufs
,
301 CSSM_ALGORITHMS DigestAlgorithm
,
302 const CSSM_DATA
*Signature
)
305 findSession
<CSPPluginSession
>(CSPHandle
).VerifyData(CCHandle
,
306 Context::required(Context
),
307 &CssmData::required(DataBufs
),
310 CssmData::required(Signature
));
314 static CSSM_RETURN CSSMCSPI
cssm_GenerateMacUpdate(CSSM_CSP_HANDLE CSPHandle
,
315 CSSM_CC_HANDLE CCHandle
,
316 const CSSM_DATA
*DataBufs
,
320 findSession
<CSPPluginSession
>(CSPHandle
).GenerateMacUpdate(CCHandle
,
321 &CssmData::required(DataBufs
),
326 static CSSM_RETURN CSSMCSPI
cssm_EncryptDataFinal(CSSM_CSP_HANDLE CSPHandle
,
327 CSSM_CC_HANDLE CCHandle
,
328 CSSM_DATA_PTR RemData
)
331 findSession
<CSPPluginSession
>(CSPHandle
).EncryptDataFinal(CCHandle
,
332 CssmData::required(RemData
));
336 static CSSM_RETURN CSSMCSPI
cssm_ChangeKeyOwner(CSSM_CSP_HANDLE CSPHandle
,
337 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
339 const CSSM_ACL_OWNER_PROTOTYPE
*NewOwner
)
342 findSession
<CSPPluginSession
>(CSPHandle
).ChangeKeyOwner(AccessCredentials::required(AccessCred
),
343 CssmKey::required(Key
),
348 static CSSM_RETURN CSSMCSPI
cssm_VerifyMacInit(CSSM_CSP_HANDLE CSPHandle
,
349 CSSM_CC_HANDLE CCHandle
,
350 const CSSM_CONTEXT
*Context
)
353 findSession
<CSPPluginSession
>(CSPHandle
).VerifyMacInit(CCHandle
,
354 Context::required(Context
));
358 static CSSM_RETURN CSSMCSPI
cssm_DigestDataClone(CSSM_CSP_HANDLE CSPHandle
,
359 CSSM_CC_HANDLE CCHandle
,
360 CSSM_CC_HANDLE ClonedCCHandle
)
363 findSession
<CSPPluginSession
>(CSPHandle
).DigestDataClone(CCHandle
,
368 static CSSM_RETURN CSSMCSPI
cssm_VerifyDataInit(CSSM_CSP_HANDLE CSPHandle
,
369 CSSM_CC_HANDLE CCHandle
,
370 const CSSM_CONTEXT
*Context
)
373 findSession
<CSPPluginSession
>(CSPHandle
).VerifyDataInit(CCHandle
,
374 Context::required(Context
));
378 static CSSM_RETURN CSSMCSPI
cssm_DecryptDataUpdate(CSSM_CSP_HANDLE CSPHandle
,
379 CSSM_CC_HANDLE CCHandle
,
380 const CSSM_DATA
*CipherBufs
,
381 uint32 CipherBufCount
,
382 CSSM_DATA_PTR ClearBufs
,
383 uint32 ClearBufCount
,
384 CSSM_SIZE
*bytesDecrypted
)
387 findSession
<CSPPluginSession
>(CSPHandle
).DecryptDataUpdate(CCHandle
,
388 &CssmData::required(CipherBufs
),
390 &CssmData::required(ClearBufs
),
392 Required(bytesDecrypted
));
396 static CSSM_RETURN CSSMCSPI
cssm_GenerateAlgorithmParams(CSSM_CSP_HANDLE CSPHandle
,
397 CSSM_CC_HANDLE CCHandle
,
398 const CSSM_CONTEXT
*Context
,
401 uint32
*NumberOfUpdatedAttibutes
,
402 CSSM_CONTEXT_ATTRIBUTE_PTR
*UpdatedAttributes
)
405 findSession
<CSPPluginSession
>(CSPHandle
).GenerateAlgorithmParams(CCHandle
,
406 Context::required(Context
),
408 CssmData::required(Param
),
409 Required(NumberOfUpdatedAttibutes
),
410 Required(UpdatedAttributes
));
414 static CSSM_RETURN CSSMCSPI
cssm_GetLoginOwner(CSSM_CSP_HANDLE CSPHandle
,
415 CSSM_ACL_OWNER_PROTOTYPE_PTR Owner
)
418 findSession
<CSPPluginSession
>(CSPHandle
).GetLoginOwner(Required(Owner
));
422 static CSSM_RETURN CSSMCSPI
cssm_GetKeyAcl(CSSM_CSP_HANDLE CSPHandle
,
424 const CSSM_STRING
*SelectionTag
,
425 uint32
*NumberOfAclInfos
,
426 CSSM_ACL_ENTRY_INFO_PTR
*AclInfos
)
429 findSession
<CSPPluginSession
>(CSPHandle
).GetKeyAcl(CssmKey::required(Key
),
431 Required(NumberOfAclInfos
),
436 static CSSM_RETURN CSSMCSPI
cssm_VerifyDevice(CSSM_CSP_HANDLE CSPHandle
,
437 const CSSM_DATA
*DeviceCert
)
440 findSession
<CSPPluginSession
>(CSPHandle
).VerifyDevice(CssmData::required(DeviceCert
));
444 static CSSM_RETURN CSSMCSPI
cssm_EncryptDataUpdate(CSSM_CSP_HANDLE CSPHandle
,
445 CSSM_CC_HANDLE CCHandle
,
446 const CSSM_DATA
*ClearBufs
,
447 uint32 ClearBufCount
,
448 CSSM_DATA_PTR CipherBufs
,
449 uint32 CipherBufCount
,
450 CSSM_SIZE
*bytesEncrypted
)
453 findSession
<CSPPluginSession
>(CSPHandle
).EncryptDataUpdate(CCHandle
,
454 &CssmData::required(ClearBufs
),
456 &CssmData::required(CipherBufs
),
458 Required(bytesEncrypted
));
462 static CSSM_RETURN CSSMCSPI
cssm_DigestDataFinal(CSSM_CSP_HANDLE CSPHandle
,
463 CSSM_CC_HANDLE CCHandle
,
464 CSSM_DATA_PTR Digest
)
467 findSession
<CSPPluginSession
>(CSPHandle
).DigestDataFinal(CCHandle
,
468 CssmData::required(Digest
));
472 static CSSM_RETURN CSSMCSPI
cssm_Login(CSSM_CSP_HANDLE CSPHandle
,
473 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
474 const CSSM_DATA
*LoginName
,
475 const void *Reserved
)
478 findSession
<CSPPluginSession
>(CSPHandle
).Login(AccessCredentials::required(AccessCred
),
479 CssmData::optional(LoginName
),
484 static CSSM_RETURN CSSMCSPI
cssm_ChangeKeyAcl(CSSM_CSP_HANDLE CSPHandle
,
485 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
486 const CSSM_ACL_EDIT
*AclEdit
,
490 findSession
<CSPPluginSession
>(CSPHandle
).ChangeKeyAcl(AccessCredentials::required(AccessCred
),
492 CssmKey::required(Key
));
496 static CSSM_RETURN CSSMCSPI
cssm_SignDataUpdate(CSSM_CSP_HANDLE CSPHandle
,
497 CSSM_CC_HANDLE CCHandle
,
498 const CSSM_DATA
*DataBufs
,
502 findSession
<CSPPluginSession
>(CSPHandle
).SignDataUpdate(CCHandle
,
503 &CssmData::required(DataBufs
),
508 static CSSM_RETURN CSSMCSPI
cssm_QueryKeySizeInBits(CSSM_CSP_HANDLE CSPHandle
,
509 CSSM_CC_HANDLE CCHandle
,
510 const CSSM_CONTEXT
*Context
,
512 CSSM_KEY_SIZE_PTR KeySize
)
515 findSession
<CSPPluginSession
>(CSPHandle
).QueryKeySizeInBits(CCHandle
,
516 Context::optional(Context
),
517 CssmKey::optional(Key
),
522 static CSSM_RETURN CSSMCSPI
cssm_Logout(CSSM_CSP_HANDLE CSPHandle
)
525 findSession
<CSPPluginSession
>(CSPHandle
).Logout();
529 static CSSM_RETURN CSSMCSPI
cssm_DecryptData(CSSM_CSP_HANDLE CSPHandle
,
530 CSSM_CC_HANDLE CCHandle
,
531 const CSSM_CONTEXT
*Context
,
532 const CSSM_DATA
*CipherBufs
,
533 uint32 CipherBufCount
,
534 CSSM_DATA_PTR ClearBufs
,
535 uint32 ClearBufCount
,
536 CSSM_SIZE
*bytesDecrypted
,
537 CSSM_DATA_PTR RemData
,
538 CSSM_PRIVILEGE Privilege
)
541 findSession
<CSPPluginSession
>(CSPHandle
).DecryptData(CCHandle
,
542 Context::required(Context
),
543 &CssmData::required(CipherBufs
),
545 &CssmData::required(ClearBufs
),
547 Required(bytesDecrypted
),
548 CssmData::required(RemData
),
553 static CSSM_RETURN CSSMCSPI
cssm_DigestDataInit(CSSM_CSP_HANDLE CSPHandle
,
554 CSSM_CC_HANDLE CCHandle
,
555 const CSSM_CONTEXT
*Context
)
558 findSession
<CSPPluginSession
>(CSPHandle
).DigestDataInit(CCHandle
,
559 Context::required(Context
));
563 static CSSM_RETURN CSSMCSPI
cssm_VerifyDataFinal(CSSM_CSP_HANDLE CSPHandle
,
564 CSSM_CC_HANDLE CCHandle
,
565 const CSSM_DATA
*Signature
)
568 findSession
<CSPPluginSession
>(CSPHandle
).VerifyDataFinal(CCHandle
,
569 CssmData::required(Signature
));
573 static CSSM_RETURN CSSMCSPI
cssm_GenerateKeyPair(CSSM_CSP_HANDLE CSPHandle
,
574 CSSM_CC_HANDLE CCHandle
,
575 const CSSM_CONTEXT
*Context
,
576 uint32 PublicKeyUsage
,
577 uint32 PublicKeyAttr
,
578 const CSSM_DATA
*PublicKeyLabel
,
579 CSSM_KEY_PTR PublicKey
,
580 uint32 PrivateKeyUsage
,
581 uint32 PrivateKeyAttr
,
582 const CSSM_DATA
*PrivateKeyLabel
,
583 const CSSM_RESOURCE_CONTROL_CONTEXT
*CredAndAclEntry
,
584 CSSM_KEY_PTR PrivateKey
,
585 CSSM_PRIVILEGE Privilege
)
588 findSession
<CSPPluginSession
>(CSPHandle
).GenerateKeyPair(CCHandle
,
589 Context::required(Context
),
592 CssmData::optional(PublicKeyLabel
),
593 CssmKey::required(PublicKey
),
596 CssmData::optional(PrivateKeyLabel
),
598 CssmKey::required(PrivateKey
),
603 static CSSM_RETURN CSSMCSPI
cssm_EncryptData(CSSM_CSP_HANDLE CSPHandle
,
604 CSSM_CC_HANDLE CCHandle
,
605 const CSSM_CONTEXT
*Context
,
606 const CSSM_DATA
*ClearBufs
,
607 uint32 ClearBufCount
,
608 CSSM_DATA_PTR CipherBufs
,
609 uint32 CipherBufCount
,
610 CSSM_SIZE
*bytesEncrypted
,
611 CSSM_DATA_PTR RemData
,
612 CSSM_PRIVILEGE Privilege
)
615 findSession
<CSPPluginSession
>(CSPHandle
).EncryptData(CCHandle
,
616 Context::required(Context
),
617 &CssmData::required(ClearBufs
),
619 &CssmData::required(CipherBufs
),
621 Required(bytesEncrypted
),
622 CssmData::required(RemData
),
627 static CSSM_RETURN CSSMCSPI
cssm_GetTimeValue(CSSM_CSP_HANDLE CSPHandle
,
628 CSSM_ALGORITHMS TimeAlgorithm
,
632 findSession
<CSPPluginSession
>(CSPHandle
).GetTimeValue(TimeAlgorithm
,
633 CssmData::required(TimeData
));
637 static CSSM_RETURN CSSMCSPI
cssm_DeriveKey(CSSM_CSP_HANDLE CSPHandle
,
638 CSSM_CC_HANDLE CCHandle
,
639 const CSSM_CONTEXT
*Context
,
643 const CSSM_DATA
*KeyLabel
,
644 const CSSM_RESOURCE_CONTROL_CONTEXT
*CredAndAclEntry
,
645 CSSM_KEY_PTR DerivedKey
)
648 findSession
<CSPPluginSession
>(CSPHandle
).DeriveKey(CCHandle
,
649 Context::required(Context
),
650 CssmData::required(Param
),
653 CssmData::optional(KeyLabel
),
655 CssmKey::required(DerivedKey
));
659 static CSSM_RETURN CSSMCSPI
cssm_GenerateKey(CSSM_CSP_HANDLE CSPHandle
,
660 CSSM_CC_HANDLE CCHandle
,
661 const CSSM_CONTEXT
*Context
,
664 const CSSM_DATA
*KeyLabel
,
665 const CSSM_RESOURCE_CONTROL_CONTEXT
*CredAndAclEntry
,
667 CSSM_PRIVILEGE Privilege
)
670 findSession
<CSPPluginSession
>(CSPHandle
).GenerateKey(CCHandle
,
671 Context::required(Context
),
674 CssmData::optional(KeyLabel
),
676 CssmKey::required(Key
),
681 static CSSM_RETURN CSSMCSPI
cssm_PassThrough(CSSM_CSP_HANDLE CSPHandle
,
682 CSSM_CC_HANDLE CCHandle
,
683 const CSSM_CONTEXT
*Context
,
684 uint32 PassThroughId
,
689 findSession
<CSPPluginSession
>(CSPHandle
).PassThrough(CCHandle
,
690 Context::required(Context
),
697 static CSSM_RETURN CSSMCSPI
cssm_VerifyMacUpdate(CSSM_CSP_HANDLE CSPHandle
,
698 CSSM_CC_HANDLE CCHandle
,
699 const CSSM_DATA
*DataBufs
,
703 findSession
<CSPPluginSession
>(CSPHandle
).VerifyMacUpdate(CCHandle
,
704 &CssmData::required(DataBufs
),
709 static CSSM_RETURN CSSMCSPI
cssm_FreeKey(CSSM_CSP_HANDLE CSPHandle
,
710 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
715 findSession
<CSPPluginSession
>(CSPHandle
).FreeKey(AccessCredentials::optional(AccessCred
),
716 CssmKey::required(KeyPtr
),
721 static CSSM_RETURN CSSMCSPI
cssm_GenerateMacInit(CSSM_CSP_HANDLE CSPHandle
,
722 CSSM_CC_HANDLE CCHandle
,
723 const CSSM_CONTEXT
*Context
)
726 findSession
<CSPPluginSession
>(CSPHandle
).GenerateMacInit(CCHandle
,
727 Context::required(Context
));
731 static CSSM_RETURN CSSMCSPI
cssm_RetrieveCounter(CSSM_CSP_HANDLE CSPHandle
,
732 CSSM_DATA_PTR Counter
)
735 findSession
<CSPPluginSession
>(CSPHandle
).RetrieveCounter(CssmData::required(Counter
));
739 static CSSM_RETURN CSSMCSPI
cssm_QuerySize(CSSM_CSP_HANDLE CSPHandle
,
740 CSSM_CC_HANDLE CCHandle
,
741 const CSSM_CONTEXT
*Context
,
743 uint32 QuerySizeCount
,
744 CSSM_QUERY_SIZE_DATA_PTR DataBlock
)
747 findSession
<CSPPluginSession
>(CSPHandle
).QuerySize(CCHandle
,
748 Context::required(Context
),
751 QuerySizeData::optional(DataBlock
));
755 static CSSM_RETURN CSSMCSPI
cssm_ChangeLoginAcl(CSSM_CSP_HANDLE CSPHandle
,
756 const CSSM_ACCESS_CREDENTIALS
*AccessCred
,
757 const CSSM_ACL_EDIT
*AclEdit
)
760 findSession
<CSPPluginSession
>(CSPHandle
).ChangeLoginAcl(AccessCredentials::required(AccessCred
),
765 static CSSM_RETURN CSSMCSPI
cssm_DigestDataUpdate(CSSM_CSP_HANDLE CSPHandle
,
766 CSSM_CC_HANDLE CCHandle
,
767 const CSSM_DATA
*DataBufs
,
771 findSession
<CSPPluginSession
>(CSPHandle
).DigestDataUpdate(CCHandle
,
772 &CssmData::required(DataBufs
),
778 static const CSSM_SPI_CSP_FUNCS CSPFunctionStruct
= {
787 cssm_VerifyDataUpdate
,
788 cssm_VerifyDataFinal
,
791 cssm_DigestDataUpdate
,
792 cssm_DigestDataClone
,
793 cssm_DigestDataFinal
,
795 cssm_GenerateMacInit
,
796 cssm_GenerateMacUpdate
,
797 cssm_GenerateMacFinal
,
800 cssm_VerifyMacUpdate
,
803 cssm_EncryptDataInit
,
804 cssm_EncryptDataUpdate
,
805 cssm_EncryptDataFinal
,
807 cssm_DecryptDataInit
,
808 cssm_DecryptDataUpdate
,
809 cssm_DecryptDataFinal
,
810 cssm_QueryKeySizeInBits
,
812 cssm_GenerateKeyPair
,
814 cssm_GenerateAlgorithmParams
,
823 cssm_ObtainPrivateKeyFromPublicKey
,
824 cssm_RetrieveUniqueId
,
825 cssm_RetrieveCounter
,
828 cssm_GetOperationalStatistics
,
835 cssm_ChangeLoginOwner
,
838 static CSSM_MODULE_FUNCS CSPFunctionTable
= {
839 CSSM_SERVICE_CSP
, // service type
840 57, // number of functions
841 (const CSSM_PROC_ADDR
*)&CSPFunctionStruct
844 CSSM_MODULE_FUNCS_PTR
CSPPluginSession::construct()
846 return &CSPFunctionTable
;