question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I tried almost all combinations but cant make it works.

// Comptue key authorization for dns-01
dnsChallenge = authz.Data.Challenges.First(c => c.Type == ChallengeTypes.Dns01);
keyAuthString = client.ComputeKeyAuthorization(dnsChallenge);

// Do something to fullfill the challenge,
// e.g. upload key auth string to well known path, or make changes to DNS

Let`s say i try to get certificate for “test.example.com” where “example.com” is registered domain.

I tried to create txt record with keyAuthString value in _acme-challenge.test.example.com but process is always failed.

Can you give example how does this works?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fszlincommented, Nov 4, 2016

Could you confirm you are using the SHA-256 digest of the key authorization for the DNS record?

You may get the DNS value using this:

    var keyAuthBytes = Encoding.UTF8.GetBytes(keyAuthString);
    var sha256 = new Sha256Digest();
    var hashed = new byte[sha256.GetDigestSize()];

    sha256.BlockUpdate(keyAuthBytes, 0, keyAuthBytes.Length);
    sha256.DoFinal(hashed, 0);

    var dnsValue = JwsConvert.ToBase64String(hashed);
0reactions
fszlincommented, Nov 4, 2016

Actually, you may just compile it for .NET 4.5 by using something like this in project.json:

"dependencies": {
  "Newtonsoft.Json": "9.0.1",
  "Portable.BouncyCastle": "1.8.1.1"
},
"frameworks": {
  "netstandard1.3": {
    "dependencies": {
      "System.Net.Http": "4.1.0",
      "System.Runtime.InteropServices": "4.1.0"
    }
  },
  "net45": {
    "frameworkAssemblies": {
      "System.Net.Http": ""
    }
  }
}

wrt the nuget package, contributions are welcome. 😛

Read more comments on GitHub >

github_iconTop Results From Across the Web

DNS validation - AWS Certificate Manager
Use a DNS record to validate your ownership of the domain for which you are requesting an ACM certificate.
Read more >
Domain DNS Validation - Free DNS Health Check Service
The domain DNS validation is performed by querying up the DNS records and verifying them against the established rules used for DNS in...
Read more >
DNS Check and DNS Report Tools
The DNS Check test will run a comprehensive DNS Report for your domain. A DNS lookup is done directly against the root servers...
Read more >
Domain DNS Validation & DNS Health Check
Domain DNS validation provides a free DNS health check service, which analyzes the DNS parameters to check if it meets the quality standards...
Read more >
DNS Validation
Issuing an ACME certificate using DNS validation ... cert-manager can be used to obtain certificates from a CA using the ACME protocol. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found