From dc1650ab3c8ff8732f2115f99e464763bd497e9d Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 11 Dec 2015 14:29:23 +0100 Subject: Add licensing headers. --- acme-slave | 18 ++++++++++++++++++ acme-webserver | 20 +++++++++++++++++++- letsencrypt | 18 +++++++++++++++++- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/acme-slave b/acme-slave index 5ff9834..5cf0139 100755 --- a/acme-slave +++ b/acme-slave @@ -1,5 +1,23 @@ #!/usr/bin/perl -T +#---------------------------------------------------------------------- +# Let's Encrypt ACME client +# Copyright © 2015 Guilhem Moulin +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#---------------------------------------------------------------------- + use strict; use warnings; diff --git a/acme-webserver b/acme-webserver index 57ea789..e5e040d 100755 --- a/acme-webserver +++ b/acme-webserver @@ -1,5 +1,23 @@ #!/usr/bin/perl -T +#---------------------------------------------------------------------- +# Let's Encrypt ACME client (minimal webserver for answering challenges) +# Copyright © 2015 Guilhem Moulin +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#---------------------------------------------------------------------- + use strict; use warnings; @@ -13,7 +31,7 @@ my $method = s/\A(GET|HEAD) // ? $1 : die "Error: Bad request\n"; while (defined (my $h = )) { last if $h eq "\r\n" }; my ($status_line, $content_type, $content); -if (/\A\Q$ROOT\E\/([A-Za-z0-9_-]+)\z/ and -f $1) { +if (/\A\Q$ROOT\E\/([A-Za-z0-9_\-]+)\z/ and -f $1) { if (open my $fh, '<', $1) { ($status_line, $content_type) = ('200 OK', 'application/jose+json'); $content = do { local $/ = undef; <$fh> }; diff --git a/letsencrypt b/letsencrypt index 3486265..bd67a8a 100755 --- a/letsencrypt +++ b/letsencrypt @@ -1,6 +1,22 @@ #!/bin/bash -# Dependencies nc(1), openssl(1), socat(1) +#---------------------------------------------------------------------- +# Tiny Let's Encrypt ACME client +# Copyright © 2015 Guilhem Moulin +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#---------------------------------------------------------------------- set -ue set -o pipefail -- cgit v1.2.3