summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcranix <cranix@hackerspace.pl>2017-02-27 22:48:56 +0100
committercranix <cranix@hackerspace.pl>2017-02-27 22:48:56 +0100
commitcc9a7a4ce2f7b238baa98e12e248a17b3f561a16 (patch)
tree6f81ecbb3f1a91dbce05897684ee409b4a0fe15e
parentb9b56d7a669b83bdee59465ff3eb5afb68af0469 (diff)
downloadkuvert-cc9a7a4ce2f7b238baa98e12e248a17b3f561a16.tar.gz
kuvert-cc9a7a4ce2f7b238baa98e12e248a17b3f561a16.tar.bz2
kuvert-cc9a7a4ce2f7b238baa98e12e248a17b3f561a16.tar.xz
kuvert-cc9a7a4ce2f7b238baa98e12e248a17b3f561a16.zip
Added handling of action 'encrypt' in read_config routine.
-rwxr-xr-xkuvert13
1 files changed, 7 insertions, 6 deletions
diff --git a/kuvert b/kuvert
index 81af897..49eefe8 100755
--- a/kuvert
+++ b/kuvert
@@ -395,6 +395,7 @@ sub crypt_send
# returns nothing if ok or @error msgs
sub process_file
{
+ dlogit("In processfile");
my ($fh,$file)=@_;
my $in_ent;
@@ -431,7 +432,7 @@ sub process_file
# extract and delete blanket instruction header
my $override;
if (lc($in_ent->head->get("x-kuvert"))=~
- /^\s*(none|fallback|fallback-all|signonly)\s*$/)
+ /^\s*(none|encrypt|fallback|fallback-all|signonly)\s*$/)
{
$override=$1;
}
@@ -857,12 +858,12 @@ The result has been left in $nf and likely needs to be adjusted
for ${progname}'s new features. Please do so and restart $progname
with the new config file in place.\n");
}
-
- if (/^\s+(\S+)\s+(fallback(-all)?(,(0x)?[a-fA-F0-9]+)?|signonly|none)\s*(\#.*)?$/)
+
+ if (/^\s+(\S+)\s+(fallback(-all)?(,(0x)?[a-fA-F0-9]+)?|signonly|none|encrypt)\s*(\#.*)?$/)
{
my ($who,$action)=($1,$2);
my $key;
- if ($action=~s/^(fallback(-all)?),((0x)?[a-fA-F0-9]+)/$1/)
+ if ($action=~s/^(encrypt|fallback(-all)?),((0x)?[a-fA-F0-9]+)/$1/)
{
$key=$3;
}
@@ -874,7 +875,7 @@ with the new config file in place.\n");
.($key?"key $key ":"")."for $who");
next;
}
-
+
if (/^\S/)
{
my ($key,$value)=split(/\s+/,$_,2);
@@ -934,7 +935,7 @@ with the new config file in place.\n");
elsif ($key eq "defaultaction")
{
bailout("bad value \"$value\" for key \"$key\"")
- if ($value!~/^(fallback|fallback-all|signonly|none)$/);
+ if ($value!~/^(fallback|fallback-all|signonly|none|encrypt)$/);
$options{$key}=$value;
}
elsif ($key eq "syslog")