15 #define DISABLE_DEBUGLOG
18 #include "sigtail_p.h"
20 #include <gwenhywfar/misc.h>
21 #include <gwenhywfar/debug.h>
22 #include <gwenhywfar/tag16.h>
43 if (st->pSignature && st->lSignature)
68 const char *subtagPtr;
80 if (subtagLen && subtagPtr) {
82 case GWEN_SIGTAIL_TLV_SIGNATURE:
83 st->pSignature=(uint8_t*)malloc(subtagLen);
84 memmove(st->pSignature, subtagPtr, subtagLen);
85 st->lSignature=subtagLen;
88 case GWEN_SIGTAIL_TLV_SIGNUM:
89 if (sscanf(subtagPtr,
"%d", &i)==1)
90 st->signatureNumber=i;
120 if (st->pSignature && st->lSignature)
122 (
const char*)st->pSignature,
126 snprintf(numbuf,
sizeof(numbuf),
"%d", st->signatureNumber);
142 return st->pSignature;
149 return st->lSignature;
156 if (st->pSignature && st->lSignature)
157 free(st->pSignature);
159 st->pSignature=(uint8_t*)malloc(l);
160 memmove(st->pSignature, p, l);
173 return st->signatureNumber;
180 st->signatureNumber=i;