protected override async Task <IDisposable> CreateChallengeHandler(IChallengeContext ch, string hostName, IKey accountKey) { var cnameQuery = await lookupClient.QueryAsync($"_acme-challenge.{hostName}", QueryType.CNAME).ConfigureAwait(true); var cnameRecord = cnameQuery.Answers.CnameRecords().Single(); var fullName = cnameRecord.CanonicalName.Value.TrimEnd('.'); Log.WriteVerboseLine("DNS CNAME target:"); Log.WriteVerboseLine(fullName); var txt = accountKey.DnsTxt(ch.Token); Log.WriteVerboseLine("DNS value:"); Log.WriteVerboseLine(txt); return(new TxtRecord(this, fullName, txt)); }