store ed25519 key sig as well (forgot that previously)

This commit is contained in:
TLINDEN
2015-07-08 23:52:46 +02:00
parent cc47e63731
commit 775935a958
2 changed files with 17 additions and 0 deletions

View File

@@ -46,5 +46,7 @@ Buffer *pcp_keysig2blob(pcp_keysig_t *s);
/* fetch a keysig from a buffer, usually loaded from vault */
pcp_keysig_t *pcp_keysig_new(Buffer *blob);
/* debug print a keysig */
void pcp_dumpkeysig(pcp_keysig_t *s);
#endif /* _HAVE_PCP_KEYSIG_H */

View File

@@ -76,3 +76,18 @@ pcp_keysig_t *pcp_keysig_new(Buffer *blob) {
return sk;
}
void pcp_dumpkeysig(pcp_keysig_t *s) {
int i;
printf("Dumping pcp_sigkey_t raw values:\n");
printf(" type: 0x%02X\n", s->type);
printf(" size: %ld\n", (long int)s->size);
printf(" checksum: ");
for ( i = 0;i < 32;++i) printf("%02x",(unsigned int) s->checksum[i]);
printf("\n");
_dump(" blob:", s->blob, s->size);
}