mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
changed key format, now includes the ed25519 pubkey for signing.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "signature.h"
|
||||
#include "defines.h"
|
||||
|
||||
int pcpsign(char *infile, char *outfile, char *passwd) {
|
||||
int pcpsign(char *infile, char *outfile, char *recipient, char *passwd) {
|
||||
FILE *in = NULL;
|
||||
FILE *out = NULL;
|
||||
pcp_key_t *secret = NULL;
|
||||
@@ -33,6 +33,10 @@ int pcpsign(char *infile, char *outfile, char *passwd) {
|
||||
fatal("Could not find a secret key in vault %s!\n", vault->filename);
|
||||
goto errs1;
|
||||
}
|
||||
|
||||
if(recipient != NULL) {
|
||||
secret = pcp_derive_pcpkey(secret, recipient);
|
||||
}
|
||||
|
||||
if(infile == NULL)
|
||||
in = stdin;
|
||||
@@ -205,7 +209,6 @@ int pcpverify(char *infile, char *sigfile) {
|
||||
|
||||
free(decoded);
|
||||
free(encoded);
|
||||
free(sig);
|
||||
free(input);
|
||||
return 0;
|
||||
|
||||
@@ -214,7 +217,6 @@ int pcpverify(char *infile, char *sigfile) {
|
||||
|
||||
errv3:
|
||||
free(decoded);
|
||||
free(sig);
|
||||
|
||||
errv2:
|
||||
// free(encoded); why???
|
||||
|
||||
Reference in New Issue
Block a user