diff --git a/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandler.cs b/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandler.cs index 925fc418..7a069850 100644 --- a/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandler.cs +++ b/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandler.cs @@ -25,7 +25,7 @@ public bool IsDisposed public void CleanUp(Challenge c) { var dnsChallenge = (DnsChallenge)c; - var domainDetails = getDomainId(dnsChallenge); + var domainDetails = GetDomainId(dnsChallenge); var records = managedPath + domainDetails.DomainId + "/records"; CleanUp(dnsChallenge, domainDetails, records); @@ -33,11 +33,11 @@ public void CleanUp(Challenge c) private void CleanUp(DnsChallenge dnsChallenge, DomainDetails domainDetails, string records) { - string recordId = getRecordId(dnsChallenge, domainDetails, records); + string recordId = GetRecordId(dnsChallenge, domainDetails, records); if (!string.IsNullOrEmpty(recordId)) { - var wr = createRequest(records + "/" + recordId); + var wr = CreateRequest(records + "/" + recordId); wr.Method = "DELETE"; using (var response = wr.GetResponse()) @@ -45,9 +45,9 @@ private void CleanUp(DnsChallenge dnsChallenge, DomainDetails domainDetails, str } } - private string getRecordId(DnsChallenge dnsChallenge, DomainDetails domainDetails, string records) + private string GetRecordId(DnsChallenge dnsChallenge, DomainDetails domainDetails, string records) { - var wr = createRequest(records); + var wr = CreateRequest(records); wr.Method = "GET"; var recordNameToFind = dnsChallenge.RecordName.Replace("." + domainDetails.DomainName, string.Empty); @@ -77,7 +77,7 @@ public void Dispose() public void Handle(Challenge c) { var dnsChallenge = (DnsChallenge)c; - var domainDetails = getDomainId(dnsChallenge); + var domainDetails = GetDomainId(dnsChallenge); var records = managedPath + domainDetails.DomainId + "/records"; @@ -85,7 +85,7 @@ public void Handle(Challenge c) var recordNameToAdd = dnsChallenge.RecordName.Replace("." + domainDetails.DomainName, string.Empty); - var wr = createRequest(records); + var wr = CreateRequest(records); wr.Method = "POST"; using (var request = new StreamWriter(wr.GetRequestStream())) @@ -115,20 +115,20 @@ public void Handle(Challenge c) } } - DomainDetails getDomainId(DnsChallenge dnsChallenge) + DomainDetails GetDomainId(DnsChallenge dnsChallenge) { var startIndex = dnsChallenge.RecordName.IndexOf(".") + 1; - return getDomainId(dnsChallenge, startIndex); + return GetDomainId(dnsChallenge, startIndex); } - DomainDetails getDomainId(DnsChallenge dnsChallenge, int startIndex) + DomainDetails GetDomainId(DnsChallenge dnsChallenge, int startIndex) { try { var domainName = dnsChallenge.RecordName.Substring(startIndex); - var wr = createRequest(managedPath + nameQuery + domainName); + var wr = CreateRequest(managedPath + nameQuery + domainName); using (var response = wr.GetResponse()) { using (var content = new StreamReader(response.GetResponseStream())) @@ -141,7 +141,7 @@ DomainDetails getDomainId(DnsChallenge dnsChallenge, int startIndex) catch (WebException wex) { startIndex = dnsChallenge.RecordName.IndexOf(".", startIndex) + 1; - return getDomainId(dnsChallenge, startIndex); + return GetDomainId(dnsChallenge, startIndex); } } @@ -169,7 +169,7 @@ class DomainRequest : DomainResponse public string value { get; set; } } - WebRequest createRequest(string url) + WebRequest CreateRequest(string url) { if (Staging) url = "https://api.sandbox.dnsmadeeasy.com/V2.0/" + url; diff --git a/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandlerProvider.cs b/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandlerProvider.cs index 1f220611..2a0acc75 100644 --- a/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandlerProvider.cs +++ b/ACMESharp/ACMESharp/ACME/Providers/DnsMadeEasyChallengeHandlerProvider.cs @@ -8,21 +8,20 @@ namespace ACMESharp.ACME.Providers { /// - /// Provider for a Challenge Handler that outputs the manual steps - /// needed to be completed by the operator. + /// Provider for a Challenge Handler that updates the TXT records on a + /// DNS Made Easy account. /// /// - /// When the output resolves to a file and that file already exists, - /// unless either the Append or Overwrite parameters are specified - /// as true, an exception will be raised. + /// The staging environment is available as an option, but Let's Encrypt + /// won't be able to read these values, so this is for debugging only /// [ChallengeHandlerProvider("dnsme", ChallengeTypeKind.DNS, Label = "DNSMadeEasy Provider", - Description = "A microsoft dns provider for handling Challenges." + + Description = "A DNS Made Easy provider for handling Challenges." + " This provider supports the DNS" + " Challenge type and computes all the necessary" + - " response values. It will create DNS entries.")] + " response values. It will create DNS entries in your account.")] public class DnsMadeEasyChallengeHandlerProvider : IChallengeHandlerProvider { public static readonly ParameterDetail API_KEY = new ParameterDetail(