]> Raphaël G. Git Repositories - acme/commitdiff
Remove "ISRG Root X1" certificate signed by expired certificate "DST Root CA X3"
authorRaphaël Gertz <git@rapsys.eu>
Mon, 15 Nov 2021 17:21:10 +0000 (18:21 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Mon, 19 Sep 2022 03:05:28 +0000 (05:05 +0200)
Cleanup certificate and not intermediate answer
Version 2.0.2

Acme.pm

diff --git a/Acme.pm b/Acme.pm
index 161fbc93ac2703893f2be92c85116898b8470adf..e8679c14834094c43840b045818891b5c5bd3f3d 100644 (file)
--- a/Acme.pm
+++ b/Acme.pm
@@ -97,7 +97,7 @@ use constant {
        ACME_PROD_DIR => 'https://acme-v02.api.letsencrypt.org/directory',
 
        # Version
-       VERSION => '2.0.0',
+       VERSION => '2.0.2',
 
        # Timeout
        TIMEOUT => 300
@@ -1059,16 +1059,19 @@ sub issue {
                # Set content
                $content = $res->content;
 
-               # Remove multi-line jump
-               $content =~ s/\n\n/\n/;
-
-               # Remove trailing line jump
-               chomp $content;
-
                # Write to file
                write_file($file, $content);
        }
 
+       # Remove first multi-line jump
+       $content =~ s/\n\n/\n/;
+
+       # Remove ISRG Root X1 certificate signed by DST Root CA X3 present after second multi-line jump
+       $content =~ s/\n\n.*//s;
+
+       # Remove trailing line jump
+       chomp $content;
+
        # Write to cert file
        write_file($self->{domain}{cert}, $content);