Lines Matching refs:ct

37   GWEN_CRYPT_TOKEN *ct;  in GWEN_LIST_FUNCTIONS()  local
41 GWEN_NEW_OBJECT(GWEN_CRYPT_TOKEN, ct); in GWEN_LIST_FUNCTIONS()
42 ct->refCount=1; in GWEN_LIST_FUNCTIONS()
43 GWEN_INHERIT_INIT(GWEN_CRYPT_TOKEN, ct); in GWEN_LIST_FUNCTIONS()
44 GWEN_LIST_INIT(GWEN_CRYPT_TOKEN, ct); in GWEN_LIST_FUNCTIONS()
46 ct->device=dev; in GWEN_LIST_FUNCTIONS()
47 ct->typeName=strdup(typeName); in GWEN_LIST_FUNCTIONS()
49 ct->tokenName=strdup(tokenName); in GWEN_LIST_FUNCTIONS()
51 return ct; in GWEN_LIST_FUNCTIONS()
56 void GWEN_Crypt_Token_free(GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_free() argument
58 if (ct) { in GWEN_Crypt_Token_free()
59 assert(ct->refCount); in GWEN_Crypt_Token_free()
60 if (ct->refCount==1) { in GWEN_Crypt_Token_free()
61 GWEN_LIST_FINI(GWEN_CRYPT_TOKEN, ct); in GWEN_Crypt_Token_free()
62 GWEN_INHERIT_FINI(GWEN_CRYPT_TOKEN, ct); in GWEN_Crypt_Token_free()
63 free(ct->tokenName); in GWEN_Crypt_Token_free()
64 free(ct->typeName); in GWEN_Crypt_Token_free()
65 ct->refCount=0; in GWEN_Crypt_Token_free()
66 GWEN_FREE_OBJECT(ct); in GWEN_Crypt_Token_free()
69 ct->refCount--; in GWEN_Crypt_Token_free()
76 GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_GetDevice(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_GetDevice() argument
78 assert(ct); in GWEN_Crypt_Token_GetDevice()
79 assert(ct->refCount); in GWEN_Crypt_Token_GetDevice()
81 return ct->device; in GWEN_Crypt_Token_GetDevice()
86 const char *GWEN_Crypt_Token_GetTypeName(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_GetTypeName() argument
88 assert(ct); in GWEN_Crypt_Token_GetTypeName()
89 assert(ct->refCount); in GWEN_Crypt_Token_GetTypeName()
91 return ct->typeName; in GWEN_Crypt_Token_GetTypeName()
96 const char *GWEN_Crypt_Token_GetTokenName(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_GetTokenName() argument
98 assert(ct); in GWEN_Crypt_Token_GetTokenName()
99 assert(ct->refCount); in GWEN_Crypt_Token_GetTokenName()
101 return ct->tokenName; in GWEN_Crypt_Token_GetTokenName()
106 void GWEN_Crypt_Token_SetTokenName(GWEN_CRYPT_TOKEN *ct, const char *s) in GWEN_Crypt_Token_SetTokenName() argument
108 assert(ct); in GWEN_Crypt_Token_SetTokenName()
109 assert(ct->refCount); in GWEN_Crypt_Token_SetTokenName()
113 free(ct->tokenName); in GWEN_Crypt_Token_SetTokenName()
114 ct->tokenName=strdup(s); in GWEN_Crypt_Token_SetTokenName()
119 const char *GWEN_Crypt_Token_GetFriendlyName(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_GetFriendlyName() argument
121 assert(ct); in GWEN_Crypt_Token_GetFriendlyName()
122 assert(ct->refCount); in GWEN_Crypt_Token_GetFriendlyName()
124 return ct->friendlyName; in GWEN_Crypt_Token_GetFriendlyName()
129 void GWEN_Crypt_Token_SetFriendlyName(GWEN_CRYPT_TOKEN *ct, const char *s) in GWEN_Crypt_Token_SetFriendlyName() argument
131 assert(ct); in GWEN_Crypt_Token_SetFriendlyName()
132 assert(ct->refCount); in GWEN_Crypt_Token_SetFriendlyName()
136 free(ct->friendlyName); in GWEN_Crypt_Token_SetFriendlyName()
137 ct->friendlyName=strdup(s); in GWEN_Crypt_Token_SetFriendlyName()
142 uint32_t GWEN_Crypt_Token_GetFlags(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_GetFlags() argument
144 assert(ct); in GWEN_Crypt_Token_GetFlags()
145 assert(ct->refCount); in GWEN_Crypt_Token_GetFlags()
147 return ct->flags; in GWEN_Crypt_Token_GetFlags()
152 void GWEN_Crypt_Token_SetFlags(GWEN_CRYPT_TOKEN *ct, uint32_t f) in GWEN_Crypt_Token_SetFlags() argument
154 assert(ct); in GWEN_Crypt_Token_SetFlags()
155 assert(ct->refCount); in GWEN_Crypt_Token_SetFlags()
157 ct->flags=f; in GWEN_Crypt_Token_SetFlags()
162 void GWEN_Crypt_Token_AddFlags(GWEN_CRYPT_TOKEN *ct, uint32_t f) in GWEN_Crypt_Token_AddFlags() argument
164 assert(ct); in GWEN_Crypt_Token_AddFlags()
165 assert(ct->refCount); in GWEN_Crypt_Token_AddFlags()
167 ct->flags|=f; in GWEN_Crypt_Token_AddFlags()
172 void GWEN_Crypt_Token_SubFlags(GWEN_CRYPT_TOKEN *ct, uint32_t f) in GWEN_Crypt_Token_SubFlags() argument
174 assert(ct); in GWEN_Crypt_Token_SubFlags()
175 assert(ct->refCount); in GWEN_Crypt_Token_SubFlags()
177 ct->flags&=~f; in GWEN_Crypt_Token_SubFlags()
182 uint32_t GWEN_Crypt_Token_GetModes(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_GetModes() argument
184 assert(ct); in GWEN_Crypt_Token_GetModes()
185 assert(ct->refCount); in GWEN_Crypt_Token_GetModes()
187 return ct->modes; in GWEN_Crypt_Token_GetModes()
192 void GWEN_Crypt_Token_SetModes(GWEN_CRYPT_TOKEN *ct, uint32_t f) in GWEN_Crypt_Token_SetModes() argument
194 assert(ct); in GWEN_Crypt_Token_SetModes()
195 assert(ct->refCount); in GWEN_Crypt_Token_SetModes()
197 ct->modes=f; in GWEN_Crypt_Token_SetModes()
202 void GWEN_Crypt_Token_AddModes(GWEN_CRYPT_TOKEN *ct, uint32_t f) in GWEN_Crypt_Token_AddModes() argument
204 assert(ct); in GWEN_Crypt_Token_AddModes()
205 assert(ct->refCount); in GWEN_Crypt_Token_AddModes()
207 ct->modes|=f; in GWEN_Crypt_Token_AddModes()
212 void GWEN_Crypt_Token_SubModes(GWEN_CRYPT_TOKEN *ct, uint32_t f) in GWEN_Crypt_Token_SubModes() argument
214 assert(ct); in GWEN_Crypt_Token_SubModes()
215 assert(ct->refCount); in GWEN_Crypt_Token_SubModes()
217 ct->modes&=~f; in GWEN_Crypt_Token_SubModes()
222 int GWEN_Crypt_Token_Open(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid) in GWEN_Crypt_Token_Open() argument
226 assert(ct); in GWEN_Crypt_Token_Open()
227 assert(ct->refCount); in GWEN_Crypt_Token_Open()
229 if (ct->openCount) { in GWEN_Crypt_Token_Open()
230 ct->openCount++; in GWEN_Crypt_Token_Open()
234 if (ct->openFn) in GWEN_Crypt_Token_Open()
235 rv=ct->openFn(ct, admin, gid); in GWEN_Crypt_Token_Open()
240 ct->openCount++; in GWEN_Crypt_Token_Open()
246 int GWEN_Crypt_Token_Create(GWEN_CRYPT_TOKEN *ct, uint32_t gid) in GWEN_Crypt_Token_Create() argument
250 assert(ct); in GWEN_Crypt_Token_Create()
251 assert(ct->refCount); in GWEN_Crypt_Token_Create()
253 if (ct->createFn) in GWEN_Crypt_Token_Create()
254 rv=ct->createFn(ct, gid); in GWEN_Crypt_Token_Create()
259 ct->openCount++; in GWEN_Crypt_Token_Create()
265 int GWEN_Crypt_Token_Close(GWEN_CRYPT_TOKEN *ct, int abandon, uint32_t gid) in GWEN_Crypt_Token_Close() argument
267 assert(ct); in GWEN_Crypt_Token_Close()
268 assert(ct->refCount); in GWEN_Crypt_Token_Close()
270 if (ct->openCount>1 && !abandon) { in GWEN_Crypt_Token_Close()
271 ct->openCount--; in GWEN_Crypt_Token_Close()
275 if (ct->closeFn) { in GWEN_Crypt_Token_Close()
278 rv=ct->closeFn(ct, abandon, gid); in GWEN_Crypt_Token_Close()
280 ct->openCount=0; in GWEN_Crypt_Token_Close()
282 ct->openCount--; in GWEN_Crypt_Token_Close()
291 int GWEN_Crypt_Token_IsOpen(const GWEN_CRYPT_TOKEN *ct) in GWEN_Crypt_Token_IsOpen() argument
293 assert(ct); in GWEN_Crypt_Token_IsOpen()
294 assert(ct->refCount); in GWEN_Crypt_Token_IsOpen()
296 return (ct->openCount!=0); in GWEN_Crypt_Token_IsOpen()
301 int GWEN_Crypt_Token_GetKeyIdList(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_GetKeyIdList() argument
306 assert(ct); in GWEN_Crypt_Token_GetKeyIdList()
307 assert(ct->refCount); in GWEN_Crypt_Token_GetKeyIdList()
309 if (ct->openCount<1) in GWEN_Crypt_Token_GetKeyIdList()
312 if (ct->getKeyIdListFn) in GWEN_Crypt_Token_GetKeyIdList()
313 return ct->getKeyIdListFn(ct, pIdList, pCount, gid); in GWEN_Crypt_Token_GetKeyIdList()
320 const GWEN_CRYPT_TOKEN_KEYINFO *GWEN_Crypt_Token_GetKeyInfo(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_GetKeyInfo() argument
325 assert(ct); in GWEN_Crypt_Token_GetKeyInfo()
326 assert(ct->refCount); in GWEN_Crypt_Token_GetKeyInfo()
328 if (ct->openCount<1) { in GWEN_Crypt_Token_GetKeyInfo()
333 if (ct->getKeyInfoFn) in GWEN_Crypt_Token_GetKeyInfo()
334 return ct->getKeyInfoFn(ct, id, flags, gid); in GWEN_Crypt_Token_GetKeyInfo()
341 int GWEN_Crypt_Token_SetKeyInfo(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetKeyInfo() argument
346 assert(ct); in GWEN_Crypt_Token_SetKeyInfo()
347 assert(ct->refCount); in GWEN_Crypt_Token_SetKeyInfo()
349 if (ct->openCount<1) in GWEN_Crypt_Token_SetKeyInfo()
352 if (ct->setKeyInfoFn) in GWEN_Crypt_Token_SetKeyInfo()
353 return ct->setKeyInfoFn(ct, id, ki, gid); in GWEN_Crypt_Token_SetKeyInfo()
360 int GWEN_Crypt_Token_GetContextIdList(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_GetContextIdList() argument
365 assert(ct); in GWEN_Crypt_Token_GetContextIdList()
366 assert(ct->refCount); in GWEN_Crypt_Token_GetContextIdList()
368 if (ct->openCount<1) in GWEN_Crypt_Token_GetContextIdList()
371 if (ct->getContextIdListFn) in GWEN_Crypt_Token_GetContextIdList()
372 return ct->getContextIdListFn(ct, pIdList, pCount, gid); in GWEN_Crypt_Token_GetContextIdList()
379 const GWEN_CRYPT_TOKEN_CONTEXT *GWEN_Crypt_Token_GetContext(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_GetContext() argument
383 assert(ct); in GWEN_Crypt_Token_GetContext()
384 assert(ct->refCount); in GWEN_Crypt_Token_GetContext()
386 if (ct->openCount<1) { in GWEN_Crypt_Token_GetContext()
391 if (ct->getContextFn) in GWEN_Crypt_Token_GetContext()
392 return ct->getContextFn(ct, id, gid); in GWEN_Crypt_Token_GetContext()
399 int GWEN_Crypt_Token_SetContext(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetContext() argument
404 assert(ct); in GWEN_Crypt_Token_SetContext()
405 assert(ct->refCount); in GWEN_Crypt_Token_SetContext()
407 if (ct->openCount<1) in GWEN_Crypt_Token_SetContext()
410 if (ct->setContextFn) in GWEN_Crypt_Token_SetContext()
411 return ct->setContextFn(ct, id, ctx, gid); in GWEN_Crypt_Token_SetContext()
418 int GWEN_Crypt_Token_Sign(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_Sign() argument
428 assert(ct); in GWEN_Crypt_Token_Sign()
429 assert(ct->refCount); in GWEN_Crypt_Token_Sign()
431 if (ct->openCount<1) in GWEN_Crypt_Token_Sign()
434 if (ct->signFn) in GWEN_Crypt_Token_Sign()
435 return ct->signFn(ct, keyId, a, pInData, inLen, pSignatureData, pSignatureLen, in GWEN_Crypt_Token_Sign()
443 int GWEN_Crypt_Token_Verify(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_Verify() argument
453 assert(ct); in GWEN_Crypt_Token_Verify()
454 assert(ct->refCount); in GWEN_Crypt_Token_Verify()
456 if (ct->openCount<1) in GWEN_Crypt_Token_Verify()
459 if (ct->verifyFn) in GWEN_Crypt_Token_Verify()
460 return ct->verifyFn(ct, keyId, a, pInData, inLen, pSignatureData, signatureLen, in GWEN_Crypt_Token_Verify()
468 int GWEN_Crypt_Token_Encipher(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_Encipher() argument
477 assert(ct); in GWEN_Crypt_Token_Encipher()
478 assert(ct->refCount); in GWEN_Crypt_Token_Encipher()
480 if (ct->openCount<1) in GWEN_Crypt_Token_Encipher()
483 if (ct->encipherFn) in GWEN_Crypt_Token_Encipher()
484 return ct->encipherFn(ct, keyId, a, pInData, inLen, pOutData, pOutLen, gid); in GWEN_Crypt_Token_Encipher()
491 int GWEN_Crypt_Token_Decipher(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_Decipher() argument
500 assert(ct); in GWEN_Crypt_Token_Decipher()
501 assert(ct->refCount); in GWEN_Crypt_Token_Decipher()
503 if (ct->openCount<1) in GWEN_Crypt_Token_Decipher()
506 if (ct->decipherFn) in GWEN_Crypt_Token_Decipher()
507 return ct->decipherFn(ct, keyId, a, pInData, inLen, pOutData, pOutLen, gid); in GWEN_Crypt_Token_Decipher()
515 int GWEN_Crypt_Token_GenerateKey(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_GenerateKey() argument
520 assert(ct); in GWEN_Crypt_Token_GenerateKey()
521 assert(ct->refCount); in GWEN_Crypt_Token_GenerateKey()
523 if (ct->openCount<1) in GWEN_Crypt_Token_GenerateKey()
526 if (ct->generateKeyFn) in GWEN_Crypt_Token_GenerateKey()
527 return ct->generateKeyFn(ct, keyId, a, gid); in GWEN_Crypt_Token_GenerateKey()
534 int GWEN_Crypt_Token_ChangePin(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid) in GWEN_Crypt_Token_ChangePin() argument
536 assert(ct); in GWEN_Crypt_Token_ChangePin()
537 assert(ct->refCount); in GWEN_Crypt_Token_ChangePin()
539 if (ct->openCount<1) in GWEN_Crypt_Token_ChangePin()
542 if (ct->changePinFn) in GWEN_Crypt_Token_ChangePin()
543 return ct->changePinFn(ct, admin, gid); in GWEN_Crypt_Token_ChangePin()
550 int GWEN_Crypt_Token_ActivateKey(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t gid) in GWEN_Crypt_Token_ActivateKey() argument
552 assert(ct); in GWEN_Crypt_Token_ActivateKey()
553 assert(ct->refCount); in GWEN_Crypt_Token_ActivateKey()
555 if (ct->openCount<1) in GWEN_Crypt_Token_ActivateKey()
558 if (ct->activateKeyFn) in GWEN_Crypt_Token_ActivateKey()
559 return ct->activateKeyFn(ct, id, gid); in GWEN_Crypt_Token_ActivateKey()
569 GWEN_CRYPT_TOKEN_OPEN_FN GWEN_Crypt_Token_SetOpenFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetOpenFn() argument
574 assert(ct); in GWEN_Crypt_Token_SetOpenFn()
575 assert(ct->refCount); in GWEN_Crypt_Token_SetOpenFn()
576 of=ct->openFn; in GWEN_Crypt_Token_SetOpenFn()
577 ct->openFn=f; in GWEN_Crypt_Token_SetOpenFn()
584 GWEN_CRYPT_TOKEN_CREATE_FN GWEN_Crypt_Token_SetCreateFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetCreateFn() argument
589 assert(ct); in GWEN_Crypt_Token_SetCreateFn()
590 assert(ct->refCount); in GWEN_Crypt_Token_SetCreateFn()
591 of=ct->createFn; in GWEN_Crypt_Token_SetCreateFn()
592 ct->createFn=f; in GWEN_Crypt_Token_SetCreateFn()
600 GWEN_CRYPT_TOKEN_CLOSE_FN GWEN_Crypt_Token_SetCloseFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetCloseFn() argument
605 assert(ct); in GWEN_Crypt_Token_SetCloseFn()
606 assert(ct->refCount); in GWEN_Crypt_Token_SetCloseFn()
607 of=ct->closeFn; in GWEN_Crypt_Token_SetCloseFn()
608 ct->closeFn=f; in GWEN_Crypt_Token_SetCloseFn()
615 GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN GWEN_Crypt_Token_SetGetKeyIdListFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetGetKeyIdListFn() argument
620 assert(ct); in GWEN_Crypt_Token_SetGetKeyIdListFn()
621 assert(ct->refCount); in GWEN_Crypt_Token_SetGetKeyIdListFn()
622 of=ct->getKeyIdListFn; in GWEN_Crypt_Token_SetGetKeyIdListFn()
623 ct->getKeyIdListFn=f; in GWEN_Crypt_Token_SetGetKeyIdListFn()
630 GWEN_CRYPT_TOKEN_GETKEYINFO_FN GWEN_Crypt_Token_SetGetKeyInfoFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetGetKeyInfoFn() argument
635 assert(ct); in GWEN_Crypt_Token_SetGetKeyInfoFn()
636 assert(ct->refCount); in GWEN_Crypt_Token_SetGetKeyInfoFn()
637 of=ct->getKeyInfoFn; in GWEN_Crypt_Token_SetGetKeyInfoFn()
638 ct->getKeyInfoFn=f; in GWEN_Crypt_Token_SetGetKeyInfoFn()
645 GWEN_CRYPT_TOKEN_SETKEYINFO_FN GWEN_Crypt_Token_SetSetKeyInfoFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetSetKeyInfoFn() argument
650 assert(ct); in GWEN_Crypt_Token_SetSetKeyInfoFn()
651 assert(ct->refCount); in GWEN_Crypt_Token_SetSetKeyInfoFn()
652 of=ct->setKeyInfoFn; in GWEN_Crypt_Token_SetSetKeyInfoFn()
653 ct->setKeyInfoFn=f; in GWEN_Crypt_Token_SetSetKeyInfoFn()
660 GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN GWEN_Crypt_Token_SetGetContextIdListFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetGetContextIdListFn() argument
665 assert(ct); in GWEN_Crypt_Token_SetGetContextIdListFn()
666 assert(ct->refCount); in GWEN_Crypt_Token_SetGetContextIdListFn()
667 of=ct->getContextIdListFn; in GWEN_Crypt_Token_SetGetContextIdListFn()
668 ct->getContextIdListFn=f; in GWEN_Crypt_Token_SetGetContextIdListFn()
675 GWEN_CRYPT_TOKEN_GETCONTEXT_FN GWEN_Crypt_Token_SetGetContextFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetGetContextFn() argument
680 assert(ct); in GWEN_Crypt_Token_SetGetContextFn()
681 assert(ct->refCount); in GWEN_Crypt_Token_SetGetContextFn()
682 of=ct->getContextFn; in GWEN_Crypt_Token_SetGetContextFn()
683 ct->getContextFn=f; in GWEN_Crypt_Token_SetGetContextFn()
690 GWEN_CRYPT_TOKEN_SETCONTEXT_FN GWEN_Crypt_Token_SetSetContextFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetSetContextFn() argument
695 assert(ct); in GWEN_Crypt_Token_SetSetContextFn()
696 assert(ct->refCount); in GWEN_Crypt_Token_SetSetContextFn()
697 of=ct->setContextFn; in GWEN_Crypt_Token_SetSetContextFn()
698 ct->setContextFn=f; in GWEN_Crypt_Token_SetSetContextFn()
705 GWEN_CRYPT_TOKEN_SIGN_FN GWEN_Crypt_Token_SetSignFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetSignFn() argument
710 assert(ct); in GWEN_Crypt_Token_SetSignFn()
711 assert(ct->refCount); in GWEN_Crypt_Token_SetSignFn()
712 of=ct->signFn; in GWEN_Crypt_Token_SetSignFn()
713 ct->signFn=f; in GWEN_Crypt_Token_SetSignFn()
720 GWEN_CRYPT_TOKEN_VERIFY_FN GWEN_Crypt_Token_SetVerifyFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetVerifyFn() argument
725 assert(ct); in GWEN_Crypt_Token_SetVerifyFn()
726 assert(ct->refCount); in GWEN_Crypt_Token_SetVerifyFn()
727 of=ct->verifyFn; in GWEN_Crypt_Token_SetVerifyFn()
728 ct->verifyFn=f; in GWEN_Crypt_Token_SetVerifyFn()
735 GWEN_CRYPT_TOKEN_ENCIPHER_FN GWEN_Crypt_Token_SetEncipherFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetEncipherFn() argument
740 assert(ct); in GWEN_Crypt_Token_SetEncipherFn()
741 assert(ct->refCount); in GWEN_Crypt_Token_SetEncipherFn()
742 of=ct->encipherFn; in GWEN_Crypt_Token_SetEncipherFn()
743 ct->encipherFn=f; in GWEN_Crypt_Token_SetEncipherFn()
750 GWEN_CRYPT_TOKEN_DECIPHER_FN GWEN_Crypt_Token_SetDecipherFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetDecipherFn() argument
755 assert(ct); in GWEN_Crypt_Token_SetDecipherFn()
756 assert(ct->refCount); in GWEN_Crypt_Token_SetDecipherFn()
757 of=ct->decipherFn; in GWEN_Crypt_Token_SetDecipherFn()
758 ct->decipherFn=f; in GWEN_Crypt_Token_SetDecipherFn()
765 GWEN_CRYPT_TOKEN_GENERATEKEY_FN GWEN_Crypt_Token_SetGenerateKeyFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetGenerateKeyFn() argument
770 assert(ct); in GWEN_Crypt_Token_SetGenerateKeyFn()
771 assert(ct->refCount); in GWEN_Crypt_Token_SetGenerateKeyFn()
772 of=ct->generateKeyFn; in GWEN_Crypt_Token_SetGenerateKeyFn()
773 ct->generateKeyFn=f; in GWEN_Crypt_Token_SetGenerateKeyFn()
780 GWEN_CRYPT_TOKEN_CHANGEPIN_FN GWEN_Crypt_Token_SetChangePinFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetChangePinFn() argument
785 assert(ct); in GWEN_Crypt_Token_SetChangePinFn()
786 assert(ct->refCount); in GWEN_Crypt_Token_SetChangePinFn()
787 of=ct->changePinFn; in GWEN_Crypt_Token_SetChangePinFn()
788 ct->changePinFn=f; in GWEN_Crypt_Token_SetChangePinFn()
795 GWEN_CRYPT_TOKEN_ACTIVATEKEY_FN GWEN_Crypt_Token_SetActivateKeyFn(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetActivateKeyFn() argument
800 assert(ct); in GWEN_Crypt_Token_SetActivateKeyFn()
801 assert(ct->refCount); in GWEN_Crypt_Token_SetActivateKeyFn()
802 of=ct->activateKeyFn; in GWEN_Crypt_Token_SetActivateKeyFn()
803 ct->activateKeyFn=f; in GWEN_Crypt_Token_SetActivateKeyFn()
812 int GWEN_Crypt_Token__CreatePasswordName(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token__CreatePasswordName() argument
819 tname=GWEN_Crypt_Token_GetTypeName(ct); in GWEN_Crypt_Token__CreatePasswordName()
821 dname=GWEN_Crypt_Token_GetTokenName(ct); in GWEN_Crypt_Token__CreatePasswordName()
839 int GWEN_Crypt_Token_GetPin(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_GetPin() argument
856 assert(ct); in GWEN_Crypt_Token_GetPin()
857 assert(ct->refCount); in GWEN_Crypt_Token_GetPin()
859 dname=GWEN_Crypt_Token_GetFriendlyName(ct); in GWEN_Crypt_Token_GetPin()
861 dname=GWEN_Crypt_Token_GetTokenName(ct); in GWEN_Crypt_Token_GetPin()
910 GWEN_Crypt_Token__CreatePasswordName(ct, pt, nameBuffer); in GWEN_Crypt_Token_GetPin()
945 int GWEN_Crypt_Token_SetPinStatus(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_SetPinStatus() argument
958 assert(ct); in GWEN_Crypt_Token_SetPinStatus()
959 assert(ct->refCount); in GWEN_Crypt_Token_SetPinStatus()
981 GWEN_Crypt_Token__CreatePasswordName(ct, pt, nameBuffer); in GWEN_Crypt_Token_SetPinStatus()
994 uint32_t GWEN_Crypt_Token_BeginEnterPin(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_BeginEnterPin() argument
1000 assert(ct); in GWEN_Crypt_Token_BeginEnterPin()
1001 assert(ct->refCount); in GWEN_Crypt_Token_BeginEnterPin()
1018 int GWEN_Crypt_Token_EndEnterPin(GWEN_CRYPT_TOKEN *ct, in GWEN_Crypt_Token_EndEnterPin() argument
1023 assert(ct); in GWEN_Crypt_Token_EndEnterPin()
1024 assert(ct->refCount); in GWEN_Crypt_Token_EndEnterPin()
1033 int GWEN_Crypt_Token_InsertToken(GWEN_CRYPT_TOKEN *ct, uint32_t gid) in GWEN_Crypt_Token_InsertToken() argument
1039 assert(ct); in GWEN_Crypt_Token_InsertToken()
1040 assert(ct->refCount); in GWEN_Crypt_Token_InsertToken()
1045 dname=GWEN_Crypt_Token_GetFriendlyName(ct); in GWEN_Crypt_Token_InsertToken()
1047 dname=GWEN_Crypt_Token_GetTokenName(ct); in GWEN_Crypt_Token_InsertToken()
1049 if (GWEN_Crypt_Token_GetDevice(ct)==GWEN_Crypt_Token_Device_File) in GWEN_Crypt_Token_InsertToken()
1089 int GWEN_Crypt_Token_InsertCorrectToken(GWEN_CRYPT_TOKEN *ct, uint32_t gid) in GWEN_Crypt_Token_InsertCorrectToken() argument
1095 assert(ct); in GWEN_Crypt_Token_InsertCorrectToken()
1096 assert(ct->refCount); in GWEN_Crypt_Token_InsertCorrectToken()
1101 dname=GWEN_Crypt_Token_GetFriendlyName(ct); in GWEN_Crypt_Token_InsertCorrectToken()
1103 dname=GWEN_Crypt_Token_GetTokenName(ct); in GWEN_Crypt_Token_InsertCorrectToken()
1105 if (GWEN_Crypt_Token_GetDevice(ct)==GWEN_Crypt_Token_Device_File) in GWEN_Crypt_Token_InsertCorrectToken()