12 #include "ct_context_p.h"
14 #include <gwenhywfar/misc.h>
15 #include <gwenhywfar/debug.h>
27 GWEN_CRYPT_TOKEN_CONTEXT *p_struct;
30 p_struct->_refCount = 1;
35 p_struct->signKeyId = 0;
36 p_struct->verifyKeyId = 0;
37 p_struct->encipherKeyId = 0;
38 p_struct->decipherKeyId = 0;
39 p_struct->authSignKeyId = 0;
40 p_struct->authVerifyKeyId = 0;
41 p_struct->tempSignKeyId = 0;
42 p_struct->keyHashNum = 0;
43 p_struct->keyHashVer = 0;
44 p_struct->keyHashAlgo = 0;
45 p_struct->keyHash.pointer =
NULL;
46 p_struct->keyHash.length = 0;
47 p_struct->keyStatus = 0;
48 p_struct->protocolVersion = 0;
50 p_struct->serviceId =
NULL;
51 p_struct->userId =
NULL;
52 p_struct->customerId =
NULL;
53 p_struct->userName =
NULL;
54 p_struct->peerId =
NULL;
55 p_struct->peerName =
NULL;
56 p_struct->address =
NULL;
58 p_struct->systemId =
NULL;
67 assert(p_struct->_refCount);
68 if (p_struct->_refCount == 1) {
72 if (p_struct->keyHash.length && p_struct->keyHash.pointer) {
73 free(p_struct->keyHash.pointer);
75 p_struct->keyHash.pointer =
NULL;
76 p_struct->keyHash.length = 0;
79 free(p_struct->serviceId);
80 p_struct->serviceId =
NULL;
81 free(p_struct->userId);
82 p_struct->userId =
NULL;
83 free(p_struct->customerId);
84 p_struct->customerId =
NULL;
85 free(p_struct->userName);
86 p_struct->userName =
NULL;
87 free(p_struct->peerId);
88 p_struct->peerId =
NULL;
89 free(p_struct->peerName);
90 p_struct->peerName =
NULL;
91 free(p_struct->address);
92 p_struct->address =
NULL;
93 free(p_struct->systemId);
94 p_struct->systemId =
NULL;
95 p_struct->_refCount = 0;
98 p_struct->_refCount--;
105 assert(p_struct->_refCount);
106 p_struct->_refCount++;
116 p_struct->id = p_src->id;
119 p_struct->signKeyId = p_src->signKeyId;
122 p_struct->verifyKeyId = p_src->verifyKeyId;
125 p_struct->encipherKeyId = p_src->encipherKeyId;
128 p_struct->decipherKeyId = p_src->decipherKeyId;
131 p_struct->authSignKeyId = p_src->authSignKeyId;
134 p_struct->authVerifyKeyId = p_src->authVerifyKeyId;
137 p_struct->tempSignKeyId = p_src->tempSignKeyId;
140 p_struct->keyHashNum = p_src->keyHashNum;
143 p_struct->keyHashVer = p_src->keyHashVer;
146 p_struct->keyHashAlgo = p_src->keyHashAlgo;
149 if (p_src->keyHash.length && p_src->keyHash.pointer) {
150 p_struct->keyHash.pointer = (uint8_t*) malloc(p_src->keyHash.length);
151 if (p_struct->keyHash.pointer) {
152 p_struct->keyHash.length = p_src->keyHash.length;
153 memmove(p_struct->keyHash.pointer, p_src->keyHash.pointer, p_src->keyHash.length);
155 p_struct->keyHash.pointer =
NULL;
156 p_struct->keyHash.length = 0;
159 p_struct->keyHash.pointer =
NULL;
160 p_struct->keyHash.length = 0;
164 p_struct->keyStatus = p_src->keyStatus;
167 p_struct->protocolVersion = p_src->protocolVersion;
172 p_struct->cid =
NULL;
173 p_struct->cid =
NULL;
176 p_struct->cid = strdup(p_src->cid);
180 if (p_struct->serviceId) {
181 free(p_struct->serviceId);
182 p_struct->serviceId =
NULL;
183 p_struct->serviceId =
NULL;
185 if (p_src->serviceId) {
186 p_struct->serviceId = strdup(p_src->serviceId);
190 if (p_struct->userId) {
191 free(p_struct->userId);
192 p_struct->userId =
NULL;
193 p_struct->userId =
NULL;
196 p_struct->userId = strdup(p_src->userId);
200 if (p_struct->customerId) {
201 free(p_struct->customerId);
202 p_struct->customerId =
NULL;
203 p_struct->customerId =
NULL;
205 if (p_src->customerId) {
206 p_struct->customerId = strdup(p_src->customerId);
210 if (p_struct->userName) {
211 free(p_struct->userName);
212 p_struct->userName =
NULL;
213 p_struct->userName =
NULL;
215 if (p_src->userName) {
216 p_struct->userName = strdup(p_src->userName);
220 if (p_struct->peerId) {
221 free(p_struct->peerId);
222 p_struct->peerId =
NULL;
223 p_struct->peerId =
NULL;
226 p_struct->peerId = strdup(p_src->peerId);
230 if (p_struct->peerName) {
231 free(p_struct->peerName);
232 p_struct->peerName =
NULL;
233 p_struct->peerName =
NULL;
235 if (p_src->peerName) {
236 p_struct->peerName = strdup(p_src->peerName);
240 if (p_struct->address) {
241 free(p_struct->address);
242 p_struct->address =
NULL;
243 p_struct->address =
NULL;
245 if (p_src->address) {
246 p_struct->address = strdup(p_src->address);
250 p_struct->port = p_src->port;
253 if (p_struct->systemId) {
254 free(p_struct->systemId);
255 p_struct->systemId =
NULL;
256 p_struct->systemId =
NULL;
258 if (p_src->systemId) {
259 p_struct->systemId = strdup(p_src->systemId);
270 p_struct->id = p_src->id;
273 p_struct->signKeyId = p_src->signKeyId;
276 p_struct->verifyKeyId = p_src->verifyKeyId;
279 p_struct->encipherKeyId = p_src->encipherKeyId;
282 p_struct->decipherKeyId = p_src->decipherKeyId;
285 p_struct->authSignKeyId = p_src->authSignKeyId;
288 p_struct->authVerifyKeyId = p_src->authVerifyKeyId;
291 p_struct->tempSignKeyId = p_src->tempSignKeyId;
294 p_struct->keyHashNum = p_src->keyHashNum;
297 p_struct->keyHashVer = p_src->keyHashVer;
300 p_struct->keyHashAlgo = p_src->keyHashAlgo;
303 if (p_src->keyHash.length && p_src->keyHash.pointer) {
304 p_struct->keyHash.pointer = (uint8_t*) malloc(p_src->keyHash.length);
305 if (p_struct->keyHash.pointer) {
306 p_struct->keyHash.length = p_src->keyHash.length;
307 memmove(p_struct->keyHash.pointer, p_src->keyHash.pointer, p_src->keyHash.length);
309 p_struct->keyHash.pointer =
NULL;
310 p_struct->keyHash.length = 0;
313 p_struct->keyHash.pointer =
NULL;
314 p_struct->keyHash.length = 0;
318 p_struct->keyStatus = p_src->keyStatus;
321 p_struct->protocolVersion = p_src->protocolVersion;
326 p_struct->cid =
NULL;
327 p_struct->cid =
NULL;
330 p_struct->cid = strdup(p_src->cid);
334 if (p_struct->serviceId) {
335 free(p_struct->serviceId);
336 p_struct->serviceId =
NULL;
337 p_struct->serviceId =
NULL;
339 if (p_src->serviceId) {
340 p_struct->serviceId = strdup(p_src->serviceId);
344 if (p_struct->userId) {
345 free(p_struct->userId);
346 p_struct->userId =
NULL;
347 p_struct->userId =
NULL;
350 p_struct->userId = strdup(p_src->userId);
354 if (p_struct->customerId) {
355 free(p_struct->customerId);
356 p_struct->customerId =
NULL;
357 p_struct->customerId =
NULL;
359 if (p_src->customerId) {
360 p_struct->customerId = strdup(p_src->customerId);
364 if (p_struct->userName) {
365 free(p_struct->userName);
366 p_struct->userName =
NULL;
367 p_struct->userName =
NULL;
369 if (p_src->userName) {
370 p_struct->userName = strdup(p_src->userName);
374 if (p_struct->peerId) {
375 free(p_struct->peerId);
376 p_struct->peerId =
NULL;
377 p_struct->peerId =
NULL;
380 p_struct->peerId = strdup(p_src->peerId);
384 if (p_struct->peerName) {
385 free(p_struct->peerName);
386 p_struct->peerName =
NULL;
387 p_struct->peerName =
NULL;
389 if (p_src->peerName) {
390 p_struct->peerName = strdup(p_src->peerName);
394 if (p_struct->address) {
395 free(p_struct->address);
396 p_struct->address =
NULL;
397 p_struct->address =
NULL;
399 if (p_src->address) {
400 p_struct->address = strdup(p_src->address);
404 p_struct->port = p_src->port;
407 if (p_struct->systemId) {
408 free(p_struct->systemId);
409 p_struct->systemId =
NULL;
410 p_struct->systemId =
NULL;
412 if (p_src->systemId) {
413 p_struct->systemId = strdup(p_src->systemId);
428 return p_struct->signKeyId;
434 return p_struct->verifyKeyId;
440 return p_struct->encipherKeyId;
446 return p_struct->decipherKeyId;
452 return p_struct->authSignKeyId;
458 return p_struct->authVerifyKeyId;
464 return p_struct->tempSignKeyId;
470 return p_struct->keyHashNum;
476 return p_struct->keyHashVer;
482 return p_struct->keyHashAlgo;
488 return p_struct->keyStatus;
494 return p_struct->protocolVersion;
500 return p_struct->cid;
506 return p_struct->serviceId;
512 return p_struct->userId;
518 return p_struct->customerId;
524 return p_struct->userName;
530 return p_struct->peerId;
536 return p_struct->peerName;
542 return p_struct->address;
548 return p_struct->port;
554 return p_struct->systemId;
560 p_struct->id = p_src;
566 p_struct->signKeyId = p_src;
572 p_struct->verifyKeyId = p_src;
578 p_struct->encipherKeyId = p_src;
584 p_struct->decipherKeyId = p_src;
590 p_struct->authSignKeyId = p_src;
596 p_struct->authVerifyKeyId = p_src;
602 p_struct->tempSignKeyId = p_src;
608 p_struct->keyHashNum = p_src;
614 p_struct->keyHashVer = p_src;
620 p_struct->keyHashAlgo = p_src;
626 p_struct->keyStatus = p_src;
632 p_struct->protocolVersion = p_src;
640 p_struct->cid =
NULL;
643 p_struct->cid = strdup(p_src);
645 p_struct->cid =
NULL;
652 if (p_struct->serviceId) {
653 free(p_struct->serviceId);
654 p_struct->serviceId =
NULL;
657 p_struct->serviceId = strdup(p_src);
659 p_struct->serviceId =
NULL;
666 if (p_struct->userId) {
667 free(p_struct->userId);
668 p_struct->userId =
NULL;
671 p_struct->userId = strdup(p_src);
673 p_struct->userId =
NULL;
680 if (p_struct->customerId) {
681 free(p_struct->customerId);
682 p_struct->customerId =
NULL;
685 p_struct->customerId = strdup(p_src);
687 p_struct->customerId =
NULL;
694 if (p_struct->userName) {
695 free(p_struct->userName);
696 p_struct->userName =
NULL;
699 p_struct->userName = strdup(p_src);
701 p_struct->userName =
NULL;
708 if (p_struct->peerId) {
709 free(p_struct->peerId);
710 p_struct->peerId =
NULL;
713 p_struct->peerId = strdup(p_src);
715 p_struct->peerId =
NULL;
722 if (p_struct->peerName) {
723 free(p_struct->peerName);
724 p_struct->peerName =
NULL;
727 p_struct->peerName = strdup(p_src);
729 p_struct->peerName =
NULL;
736 if (p_struct->address) {
737 free(p_struct->address);
738 p_struct->address =
NULL;
741 p_struct->address = strdup(p_src);
743 p_struct->address =
NULL;
750 p_struct->port = p_src;
756 if (p_struct->systemId) {
757 free(p_struct->systemId);
758 p_struct->systemId =
NULL;
761 p_struct->systemId = strdup(p_src);
763 p_struct->systemId =
NULL;
830 dest = (uint8_t*) malloc(vlen);
831 memmove(dest, v, vlen);
832 p_struct->keyHash.pointer = dest;
833 p_struct->keyHash.length = vlen;
846 p_struct->cid =
NULL;
851 if (s) p_struct->cid = strdup(s);
853 if (p_struct->cid ==
NULL) {
854 p_struct->cid =
NULL;
858 if (p_struct->serviceId) {
859 free(p_struct->serviceId);
860 p_struct->serviceId =
NULL;
865 if (s) p_struct->serviceId = strdup(s);
867 if (p_struct->serviceId ==
NULL) {
868 p_struct->serviceId =
NULL;
872 if (p_struct->userId) {
873 free(p_struct->userId);
874 p_struct->userId =
NULL;
879 if (s) p_struct->userId = strdup(s);
881 if (p_struct->userId ==
NULL) {
882 p_struct->userId =
NULL;
886 if (p_struct->customerId) {
887 free(p_struct->customerId);
888 p_struct->customerId =
NULL;
893 if (s) p_struct->customerId = strdup(s);
895 if (p_struct->customerId ==
NULL) {
896 p_struct->customerId =
NULL;
900 if (p_struct->userName) {
901 free(p_struct->userName);
902 p_struct->userName =
NULL;
907 if (s) p_struct->userName = strdup(s);
909 if (p_struct->userName ==
NULL) {
910 p_struct->userName =
NULL;
914 if (p_struct->peerId) {
915 free(p_struct->peerId);
916 p_struct->peerId =
NULL;
921 if (s) p_struct->peerId = strdup(s);
923 if (p_struct->peerId ==
NULL) {
924 p_struct->peerId =
NULL;
928 if (p_struct->peerName) {
929 free(p_struct->peerName);
930 p_struct->peerName =
NULL;
935 if (s) p_struct->peerName = strdup(s);
937 if (p_struct->peerName ==
NULL) {
938 p_struct->peerName =
NULL;
942 if (p_struct->address) {
943 free(p_struct->address);
944 p_struct->address =
NULL;
949 if (s) p_struct->address = strdup(s);
951 if (p_struct->address ==
NULL) {
952 p_struct->address =
NULL;
959 if (p_struct->systemId) {
960 free(p_struct->systemId);
961 p_struct->systemId =
NULL;
966 if (s) p_struct->systemId = strdup(s);
968 if (p_struct->systemId ==
NULL) {
969 p_struct->systemId =
NULL;
1058 if (p_struct->keyHash.length && p_struct->keyHash.pointer) {
1260 dest = (uint8_t*) malloc(len);
1261 memmove(dest, t, len);
1262 p_struct->keyHash.pointer = dest;
1263 p_struct->keyHash.length = len;
1265 p_struct->keyHash.pointer = (uint8_t*) t;
1266 p_struct->keyHash.length = len;
1280 if (p_struct->cid) {
1281 free(p_struct->cid);
1282 p_struct->cid =
NULL;
1287 if (s) p_struct->cid = strdup(s);
1289 if (p_struct->cid ==
NULL) {
1290 p_struct->cid =
NULL;
1294 if (p_struct->serviceId) {
1295 free(p_struct->serviceId);
1296 p_struct->serviceId =
NULL;
1301 if (s) p_struct->serviceId = strdup(s);
1303 if (p_struct->serviceId ==
NULL) {
1304 p_struct->serviceId =
NULL;
1308 if (p_struct->userId) {
1309 free(p_struct->userId);
1310 p_struct->userId =
NULL;
1315 if (s) p_struct->userId = strdup(s);
1317 if (p_struct->userId ==
NULL) {
1318 p_struct->userId =
NULL;
1322 if (p_struct->customerId) {
1323 free(p_struct->customerId);
1324 p_struct->customerId =
NULL;
1329 if (s) p_struct->customerId = strdup(s);
1331 if (p_struct->customerId ==
NULL) {
1332 p_struct->customerId =
NULL;
1336 if (p_struct->userName) {
1337 free(p_struct->userName);
1338 p_struct->userName =
NULL;
1343 if (s) p_struct->userName = strdup(s);
1345 if (p_struct->userName ==
NULL) {
1346 p_struct->userName =
NULL;
1350 if (p_struct->peerId) {
1351 free(p_struct->peerId);
1352 p_struct->peerId =
NULL;
1357 if (s) p_struct->peerId = strdup(s);
1359 if (p_struct->peerId ==
NULL) {
1360 p_struct->peerId =
NULL;
1364 if (p_struct->peerName) {
1365 free(p_struct->peerName);
1366 p_struct->peerName =
NULL;
1371 if (s) p_struct->peerName = strdup(s);
1373 if (p_struct->peerName ==
NULL) {
1374 p_struct->peerName =
NULL;
1378 if (p_struct->address) {
1379 free(p_struct->address);
1380 p_struct->address =
NULL;
1385 if (s) p_struct->address = strdup(s);
1387 if (p_struct->address ==
NULL) {
1388 p_struct->address =
NULL;
1395 if (p_struct->systemId) {
1396 free(p_struct->systemId);
1397 p_struct->systemId =
NULL;
1402 if (s) p_struct->systemId = strdup(s);
1404 if (p_struct->systemId ==
NULL) {
1405 p_struct->systemId =
NULL;
1448 if (p_struct->keyHash.length && p_struct->keyHash.pointer) {
1452 rv =
GWEN_Base64_Encode((
const unsigned char*) p_struct->keyHash.pointer, p_struct->keyHash.length, tbuf, 80);
1522 if (p_struct->id == p_cmp) p_rv = 0;
1523 else if (p_cmp < p_struct->
id) p_rv = -1;
1535 if (st->keyHash.length && st->keyHash.pointer) free(st->keyHash.pointer);
1537 st->keyHash.pointer = (uint8_t*) malloc(len);
1538 if (st->keyHash.pointer) {
1539 st->keyHash.length = len;
1540 memmove(st->keyHash.pointer, p, len);
1542 st->keyHash.pointer =
NULL;
1543 st->keyHash.length = 0;
1546 st->keyHash.length = 0;
1547 st->keyHash.pointer =
NULL;
1553 return st->keyHash.pointer;
1558 return st->keyHash.length;
void GWEN_Crypt_Token_Context_SetVerifyKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
const char * GWEN_Crypt_Token_Context_GetServiceId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetServiceId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
void GWEN_Crypt_Token_Context_List_Add(GWEN_CRYPT_TOKEN_CONTEXT *element, GWEN_CRYPT_TOKEN_CONTEXT_LIST *list)
char * GWEN_Buffer_GetStart(const GWEN_BUFFER *bf)
#define GWEN_DB_FLAGS_OVERWRITE_VARS
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_copy(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const GWEN_CRYPT_TOKEN_CONTEXT *p_src)
void GWEN_Crypt_Token_Context_SetProtocolVersion(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
struct GWEN_DB_NODE GWEN_DB_NODE
#define GWEN_INHERIT_FINI(t, element)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_fromDb(GWEN_DB_NODE *p_db)
uint32_t GWEN_Buffer_GetUsedBytes(const GWEN_BUFFER *bf)
uint32_t GWEN_Crypt_Token_Context_GetSignKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetKeyStatus(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
const char * GWEN_Crypt_Token_Context_GetUserId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
const char * GWEN_Crypt_Token_Context_GetUserName(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
const uint8_t * GWEN_Crypt_Token_Context_GetKeyHashPtr(const GWEN_CRYPT_TOKEN_CONTEXT *st)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_new(void)
uint32_t GWEN_Crypt_Token_Context_GetTempSignKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_List_GetById(const GWEN_CRYPT_TOKEN_CONTEXT_LIST *p_list, uint32_t p_cmp)
void GWEN_Crypt_Token_Context_ReadDb(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, GWEN_DB_NODE *p_db)
#define GWEN_FREE_OBJECT(varname)
const char * GWEN_Crypt_Token_Context_GetAddress(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
uint32_t GWEN_Crypt_Token_Context_GetEncipherKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetEncipherKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
void GWEN_Crypt_Token_Context_SetSystemId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
uint32_t GWEN_Crypt_Token_Context_GetVerifyKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
int GWEN_Crypt_Token_Context_GetPort(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetCid(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
int GWEN_Base64_Decode(const unsigned char *src, unsigned int size, GWEN_BUFFER *dst)
void GWEN_Crypt_Token_Context_SetAuthSignKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
const char * GWEN_Crypt_Token_Context_GetSystemId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_dup(const GWEN_CRYPT_TOKEN_CONTEXT *p_src)
void GWEN_Crypt_Token_Context_SetUserName(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
void GWEN_XMLNode_SetCharValue(GWEN_XMLNODE *n, const char *name, const char *value)
int GWEN_Base64_Encode(const unsigned char *src, unsigned int size, GWEN_BUFFER *dst, unsigned int maxLineLength)
void GWEN_Crypt_Token_Context_SetPeerName(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
void GWEN_Crypt_Token_Context_free(GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
uint32_t GWEN_Crypt_Token_Context_GetId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
GWEN_BUFFER * GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_List_Next(const GWEN_CRYPT_TOKEN_CONTEXT *element)
int GWEN_XMLNode_GetIntValue(const GWEN_XMLNODE *n, const char *name, int defValue)
void GWEN_Crypt_Token_Context_ReadXml(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, GWEN_XMLNODE *p_db)
uint32_t GWEN_Crypt_Token_Context_GetKeyHashLen(const GWEN_CRYPT_TOKEN_CONTEXT *st)
const char * GWEN_Crypt_Token_Context_GetCid(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetSignKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
uint32_t GWEN_Crypt_Token_Context_GetKeyHashNum(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
int GWEN_DB_SetBinValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, const void *val, unsigned int valSize)
#define GWEN_NEW_OBJECT(typ, varname)
const char * GWEN_XMLNode_GetCharValue(const GWEN_XMLNODE *n, const char *name, const char *defValue)
uint32_t GWEN_Crypt_Token_Context_GetKeyStatus(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetKeyHashNum(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
void GWEN_Crypt_Token_Context_SetKeyHashVer(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_fromXml(GWEN_XMLNODE *p_db)
void GWEN_Crypt_Token_Context_SetCustomerId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
const void * GWEN_DB_GetBinValue(GWEN_DB_NODE *n, const char *path, int idx, const void *defVal, unsigned int defValSize, unsigned int *returnValueSize)
int GWEN_Crypt_Token_Context_WriteDb(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct, GWEN_DB_NODE *p_db)
const char * GWEN_DB_GetCharValue(GWEN_DB_NODE *n, const char *path, int idx, const char *defVal)
#define GWEN_INHERIT_INIT(t, element)
int GWEN_Buffer_Relinquish(GWEN_BUFFER *bf)
void GWEN_Buffer_free(GWEN_BUFFER *bf)
int GWEN_DB_DeleteVar(GWEN_DB_NODE *n, const char *path)
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
const char * GWEN_Crypt_Token_Context_GetPeerId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
uint32_t GWEN_Crypt_Token_Context_GetAuthVerifyKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
GWEN_LIST2_FUNCTIONS(TYPEMAKER2_TYPE, Typemaker2_Type)
uint32_t GWEN_Crypt_Token_Context_GetKeyHashAlgo(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetKeyHashAlgo(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
void GWEN_Crypt_Token_Context_WriteXml(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct, GWEN_XMLNODE *p_db)
uint32_t GWEN_Crypt_Token_Context_GetAuthSignKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
struct GWEN_CRYPT_TOKEN_CONTEXT GWEN_CRYPT_TOKEN_CONTEXT
void GWEN_Crypt_Token_Context_SetKeyHash(GWEN_CRYPT_TOKEN_CONTEXT *st, const uint8_t *p, uint32_t len)
uint32_t GWEN_Crypt_Token_Context_GetDecipherKeyId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
GWEN_CRYPT_TOKEN_CONTEXT_LIST * GWEN_Crypt_Token_Context_List_dup(const GWEN_CRYPT_TOKEN_CONTEXT_LIST *p_src)
void GWEN_Crypt_Token_Context_SetAddress(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
int GWEN_DB_SetCharValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, const char *val)
GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_Token_Context_List_First(const GWEN_CRYPT_TOKEN_CONTEXT_LIST *l)
void GWEN_Crypt_Token_Context_SetUserId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
void GWEN_Crypt_Token_Context_SetTempSignKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
#define DBG_INFO(dbg_logger, format, args...)
const char * GWEN_Crypt_Token_Context_GetPeerName(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
int GWEN_Crypt_Token_Context_toDb(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct, GWEN_DB_NODE *p_db)
#define GWEN_LIST_INIT(t, element)
int GWEN_DB_GetIntValue(GWEN_DB_NODE *n, const char *path, int idx, int defVal)
uint32_t GWEN_Crypt_Token_Context_GetKeyHashVer(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
uint32_t GWEN_Crypt_Token_Context_GetProtocolVersion(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
void GWEN_Crypt_Token_Context_SetDecipherKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
const char * GWEN_Crypt_Token_Context_GetCustomerId(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
int GWEN_DB_SetIntValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, int val)
#define GWEN_LIST_FUNCTIONS(t, pr)
void GWEN_Crypt_Token_Context_SetId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
GWEN_CRYPT_TOKEN_CONTEXT_LIST * GWEN_Crypt_Token_Context_List_new()
void GWEN_Crypt_Token_Context_toXml(const GWEN_CRYPT_TOKEN_CONTEXT *p_struct, GWEN_XMLNODE *p_db)
void GWEN_Crypt_Token_Context_SetPeerId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, const char *p_src)
#define GWEN_LIST_FINI(t, element)
#define GWEN_INHERIT_FUNCTIONS(t)
void GWEN_Crypt_Token_Context_Attach(GWEN_CRYPT_TOKEN_CONTEXT *p_struct)
struct GWEN__XMLNODE GWEN_XMLNODE
void GWEN_Crypt_Token_Context_SetAuthVerifyKeyId(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, uint32_t p_src)
void GWEN_Crypt_Token_Context_SetPort(GWEN_CRYPT_TOKEN_CONTEXT *p_struct, int p_src)
void GWEN_XMLNode_SetIntValue(GWEN_XMLNODE *n, const char *name, int value)