[GH-ISSUE #5] http01 Challenge #6

Open
opened 2026-02-28 01:19:00 +03:00 by kerem · 2 comments
Owner

Originally created by @Tondas on GitHub (Feb 9, 2020).
Original GitHub issue: https://github.com/Tondas/LetsEncrypt/issues/5

Originally assigned to: @Tondas on GitHub.

Implement http01 challenge verification possibility

Originally created by @Tondas on GitHub (Feb 9, 2020). Original GitHub issue: https://github.com/Tondas/LetsEncrypt/issues/5 Originally assigned to: @Tondas on GitHub. Implement http01 challenge verification possibility
Author
Owner

@f135ta commented on GitHub (May 31, 2022):

Any news on this? I prefer the Http01 challenges rather than the DNS ones

<!-- gh-comment-id:1142310844 --> @f135ta commented on GitHub (May 31, 2022): Any news on this? I prefer the Http01 challenges rather than the DNS ones
Author
Owner

@sensboston commented on GitHub (Jan 24, 2023):

If you guys still interesting, I found solution but with the different client: https://github.com/PKISharp/ACMESharpCore/tree/master/src/examples/ACMECLI
Add package FluentFTP to ACMECLI, and insert small code snippet below to procedure ProcessHttp01:

            Console.WriteLine($"        HTTP Resource Content-Type....: {httpCd.HttpResourceContentType}");

            // Create and upload required file using ftp client
            var challengeFileName = Path.GetFileNameWithoutExtension(httpCd.HttpResourcePath);
            File.WriteAllText(challengeFileName, httpCd.HttpResourceValue);

            var ftp_domain = FtpDomain;
            var ftp_user = FtpUser;
            var ftp_password = FtpPassword;
            int ftp_port = 21;
            int.TryParse(FtpPort, out ftp_port);

            if (!(string.IsNullOrEmpty(ftp_domain) && string.IsNullOrEmpty(ftp_user) && string.IsNullOrEmpty(ftp_password)))
            {
                var token = new CancellationToken();
                using (var ftp = new AsyncFtpClient(ftp_domain, ftp_user, ftp_password, ftp_port))
                {
                    await ftp.Connect(token);
                    await ftp.UploadFile(challengeFileName, $"/.well-known/acme-challenge/{challengeFileName}", token: token);
                }
            }
            if (chlng.Status != Constants.PendingStatus)

FtpDomain, FtpUser etc. are options and should be introduced like the other options at the beginning of program, i.e.

        [Option(ShortName = "", Description = "FTP domain to create challenges")]
        public string FtpDomain { get; }
        [Option(ShortName = "", Description = "FTP user")]
        public string FtpUser { get; }
        [Option(ShortName = "", Description = "Password for FTP user")]
        public string FtpPassword { get; }
        [Option(ShortName = "", Description = "FTP port")]
        public string FtpPort { get; }

README.md has perfect examples of command line setting usage; adding automatic file publishing via FTP protocol, will make ACMECLI fully automated tool for certificate creation. Publishing new certificate depends of your host/provider (I'm on fxdomains, so I thinking to automate certificate installing too 😉 )

<!-- gh-comment-id:1401457741 --> @sensboston commented on GitHub (Jan 24, 2023): If you guys still interesting, I found solution but with the different client: https://github.com/PKISharp/ACMESharpCore/tree/master/src/examples/ACMECLI Add package FluentFTP to ACMECLI, and insert small code snippet below to procedure **ProcessHttp01**: ``` Console.WriteLine($" HTTP Resource Content-Type....: {httpCd.HttpResourceContentType}"); // Create and upload required file using ftp client var challengeFileName = Path.GetFileNameWithoutExtension(httpCd.HttpResourcePath); File.WriteAllText(challengeFileName, httpCd.HttpResourceValue); var ftp_domain = FtpDomain; var ftp_user = FtpUser; var ftp_password = FtpPassword; int ftp_port = 21; int.TryParse(FtpPort, out ftp_port); if (!(string.IsNullOrEmpty(ftp_domain) && string.IsNullOrEmpty(ftp_user) && string.IsNullOrEmpty(ftp_password))) { var token = new CancellationToken(); using (var ftp = new AsyncFtpClient(ftp_domain, ftp_user, ftp_password, ftp_port)) { await ftp.Connect(token); await ftp.UploadFile(challengeFileName, $"/.well-known/acme-challenge/{challengeFileName}", token: token); } } if (chlng.Status != Constants.PendingStatus) ``` FtpDomain, FtpUser etc. are options and should be introduced like the other options at the beginning of program, i.e. ``` [Option(ShortName = "", Description = "FTP domain to create challenges")] public string FtpDomain { get; } [Option(ShortName = "", Description = "FTP user")] public string FtpUser { get; } [Option(ShortName = "", Description = "Password for FTP user")] public string FtpPassword { get; } [Option(ShortName = "", Description = "FTP port")] public string FtpPort { get; } ``` [README.md](https://github.com/PKISharp/ACMESharpCore/blob/master/src/examples/ACMECLI/README.md) has perfect examples of command line setting usage; adding automatic file publishing via FTP protocol, will make ACMECLI fully automated tool for certificate creation. Publishing new certificate depends of your host/provider (I'm on fxdomains, so I thinking to automate certificate installing too 😉 )
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LetsEncrypt#6
No description provided.