aboutsummaryrefslogtreecommitdiffstats
path: root/lacme
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-02-18 01:14:23 +0100
committerGuilhem Moulin <guilhem@fripost.org>2021-02-20 20:16:34 +0100
commitad1856777bf108826008b60a1e70c1e3fbb94ec7 (patch)
tree1a13987984bd11a4fb01d655a3b8fa2a74dfae23 /lacme
parent1c4fc8c431e69780625600a4ee8526e1a3cbb3f4 (diff)
Deprecate setting 'privkey' in [accountd] section of the lacme(8) configuration file.
One need to use the lacme-accountd(1) configuration file for that instead.
Diffstat (limited to 'lacme')
-rwxr-xr-xlacme6
1 files changed, 4 insertions, 2 deletions
diff --git a/lacme b/lacme
index 7800429..87a44be 100755
--- a/lacme
+++ b/lacme
@@ -115,7 +115,7 @@ do {
group => '',
command => '@@bindir@@/lacme-accountd',
config => '',
- privkey => undef,
+ privkey => '',
quiet => 'Yes',
}
);
@@ -501,6 +501,8 @@ sub acme_client($@) {
my ($client, $cleanup);
my $conf = $CONFIG->{client};
if (defined (my $accountd = $CONFIG->{accountd})) {
+ warn "Setting 'privkey' in lacme.conf's [accountd] section is deprecated and will become an error in a future release! "
+ ."Set it in lacme-accountd.conf instead.\n" if $accountd->{privkey} ne '';
socketpair($client, my $s, AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair: $!";
my $pid = fork() // "fork: $!";
unless ($pid) {
@@ -512,7 +514,7 @@ sub acme_client($@) {
my ($cmd, @args) = split(/\s+/, $accountd->{command}) or die "Empty accountd command\n";
push @args, '--stdio';
push @args, '--config='.$accountd->{config} if $accountd->{config} ne '';
- push @args, '--privkey='.$accountd->{privkey} if defined $accountd->{privkey};
+ push @args, '--privkey='.$accountd->{privkey} if $accountd->{privkey} ne ''; # XXX deprecated in 0.8.0
push @args, '--quiet' unless lc $accountd->{quiet} eq 'no';
push @args, '--debug' if $OPTS{debug};
exec { $cmd } $cmd, @args or die;