fixed z85 encoding overflow bug, fixed signature code on big-endian systems.

This commit is contained in:
TLINDEN
2013-11-19 17:17:30 +01:00
parent 314dbde0b9
commit 80ec5014a8
17 changed files with 203 additions and 153 deletions

View File

@@ -97,6 +97,10 @@ int pcpsign(char *infile, char *outfile, char *recipient, char *passwd) {
size_t zlen;
pcp_sig_t *signature = pcp_ed_sign(input, inputBufSize, secret);
// scip
//printf("sigsize: %d\n", (int)sizeof(pcp_sig_t));
//pcp_dumpsig(signature);
if(signature == NULL)
goto errs5;
@@ -226,3 +230,15 @@ int pcpverify(char *infile, char *sigfile) {
errv1:
return 1;
}
void pcp_dumpsig(pcp_sig_t *sig) {
printf(" ed: ");
pcpprint_bin(stdout, sig->edsig, crypto_sign_BYTES);printf("\n");
printf(" id: %s\n", sig->id);
printf(" ctime: %ld\n", sig->ctime);
printf("version: %04x\n", sig->version);
}