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

@@ -63,7 +63,7 @@ typedef unsigned int qbyte; // Quad byte = 32 bits
#define PCP_VAULT_VERSION 2
// sigs
#define PCP_SIG_VERSION 1
#define PCP_SIG_VERSION 2
char *PCP_ERR;
byte PCP_ERRSET;

View File

@@ -37,10 +37,10 @@ extern "C" {
#include "key.h"
struct _pcp_sig_t {
byte edsig[crypto_sign_BYTES];
char id[17];
long ctime;
uint64_t ctime;
uint32_t version;
byte edsig[crypto_hash_sha256_BYTES + crypto_sign_BYTES];
};
typedef struct _pcp_sig_t pcp_sig_t;
@@ -55,6 +55,8 @@ pcp_sig_t *sig2be(pcp_sig_t *k);
pcp_sig_t *pcp_ed_newsig(unsigned char *hash, char *id);
void pcp_dumpsig(pcp_sig_t *sig);
#ifdef __cplusplus
}
#endif