fixed use of derived key in signatures

This commit is contained in:
git@daemon.de
2013-11-11 08:24:05 +01:00
parent f51d753a3e
commit 79dc73d837
2 changed files with 6 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ void pcp_dumpkey(pcp_key_t *k) {
printf("\n");
printf("encrypted: ");
for ( i = 0;i < 48;++i) printf("%02x",(unsigned int) k->encrypted[i]);
for ( i = 0;i < 80;++i) printf("%02x",(unsigned int) k->encrypted[i]);
printf("\n");
printf(" owner: %s\n", k->owner);

View File

@@ -34,9 +34,7 @@ int pcpsign(char *infile, char *outfile, char *recipient, char *passwd) {
goto errs1;
}
if(recipient != NULL) {
secret = pcp_derive_pcpkey(secret, recipient);
}
if(infile == NULL)
in = stdin;
@@ -73,6 +71,10 @@ int pcpsign(char *infile, char *outfile, char *recipient, char *passwd) {
goto errs3;
}
if(recipient != NULL) {
secret = pcp_derive_pcpkey(secret, recipient);
}
unsigned char *input = NULL;
size_t inputBufSize = 0;
unsigned char byte[1];