From 775935a958a11013c0a357ddfc89e383e8ea02bb Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Wed, 8 Jul 2015 23:52:46 +0200 Subject: [PATCH] store ed25519 key sig as well (forgot that previously) --- include/pcp/keysig.h | 2 ++ libpcp/keysig.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/pcp/keysig.h b/include/pcp/keysig.h index 5b9ef19..cad753e 100644 --- a/include/pcp/keysig.h +++ b/include/pcp/keysig.h @@ -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 */ diff --git a/libpcp/keysig.c b/libpcp/keysig.c index ab4104d..d7d8bb1 100644 --- a/libpcp/keysig.c +++ b/libpcp/keysig.c @@ -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); +}