Coder Social home page Coder Social logo

DNS validation about certes HOT 6 CLOSED

fszlin avatar fszlin commented on August 16, 2024
DNS validation

from certes.

Comments (6)

fszlin avatar fszlin commented on August 16, 2024 1

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);

from certes.

batooo avatar batooo commented on August 16, 2024

Yeah now its working. Few suggestions:

  • Add this into your documentation for future clients
  • Maybe make nuget package to be able to use this package outside .NET CORE

from certes.

batooo avatar batooo commented on August 16, 2024

Also in your usage example you try to add "CN" uppercase but in Closte.AcmeClient.Pkcs.AddName:

X509Name.DefaultLookup.Contains("CN") = false
X509Name.DefaultLookup.Contains("cn") = true

from certes.

fszlin avatar fszlin commented on August 16, 2024

The nuget package should work with .NET Framework 4.6+, as it is targeting netstandard1.3. Feel free to submit an issue if not.

I am not sure about Closte, but I think the symbols are uppercase in RFC2253 and RFC1779. And I think Org.BouncyCastle.Asn1.X509.X509Name.DefaultLookup using lowercase is merely for easier lookup.

from certes.

batooo avatar batooo commented on August 16, 2024

Its "Closte" since i rewrite it for my .net 4.5.2 project. At least in 4.5.2 they are all lowercase, that is what i saw in debugger.

from certes.

fszlin avatar fszlin commented on August 16, 2024

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. :P

from certes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.