added pcptext_infile(), used with pcp1 -t -I $file, which determines filetype

by content. minor debugging changes.
This commit is contained in:
git@daemon.de
2013-11-12 16:58:59 +01:00
parent 91c9a12641
commit a76ff60d7a
8 changed files with 216 additions and 28 deletions

View File

@@ -234,7 +234,7 @@ int main (int argc, char **argv) {
if(vault != NULL) {
switch (mode) {
case PCP_MODE_KEYGEN:
pcp_keygen(xpass);
pcp_keygen(xpass, outfile);
if(xpass != NULL)
free(xpass);
break;
@@ -309,9 +309,12 @@ int main (int argc, char **argv) {
break;
case PCP_MODE_TEXT:
if(! useid) {
if(! useid && infile == NULL) {
pcptext_vault(vault);
}
else if(infile != NULL) {
pcptext_infile(infile);
}
else {
id = pcp_normalize_id(keyid);
if(id != NULL) {