Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http01 Challenge #5

Open
Tondas opened this issue Feb 9, 2020 · 2 comments
Open

http01 Challenge #5

Tondas opened this issue Feb 9, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@Tondas
Copy link
Owner

Tondas commented Feb 9, 2020

Implement http01 challenge verification possibility

@Tondas Tondas added the enhancement New feature or request label Feb 9, 2020
@Tondas Tondas self-assigned this Feb 9, 2020
@Tondas Tondas added this to TODO in General via automation Feb 9, 2020
@f135ta
Copy link

f135ta commented May 31, 2022

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

@sensboston
Copy link

sensboston commented 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 😉 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
General
  
TODO
Development

No branches or pull requests

3 participants