mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
added own file type for crypt+sign, now signing the encrypted result, not the clear message.
using 64bit integers for time vars in key ex/im_ports
This commit is contained in:
@@ -76,7 +76,7 @@ int pcpdecrypt(char *id, int useid, char *infile, char *outfile, char *passwd, i
|
||||
symkey = pcp_scrypt(ptx, passphrase, strlen(passphrase), salt, 90);
|
||||
free(salt);
|
||||
}
|
||||
else {
|
||||
else if(head == PCP_ASYM_CIPHER || head == PCP_ASYM_CIPHER_SIG) {
|
||||
/* asymetric mode */
|
||||
if(useid) {
|
||||
secret = pcphash_keyexists(ptx, id);
|
||||
@@ -108,11 +108,18 @@ int pcpdecrypt(char *id, int useid, char *infile, char *outfile, char *passwd, i
|
||||
secret = pcpkey_decrypt(ptx, secret, passphrase);
|
||||
if(secret == NULL)
|
||||
goto errde3;
|
||||
|
||||
if(head == PCP_ASYM_CIPHER_SIG)
|
||||
verify = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fatal(ptx, "Could not determine input file type (got: %02x)\n", head);
|
||||
goto errde3;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fatal(ptx, "Could not determine input file type\n");
|
||||
fatal(ptx, "Failed to read from file!\n");
|
||||
goto errde3;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user