GithubHelp home page GithubHelp logo

Comments (6)

tobiasbrunner avatar tobiasbrunner commented on June 12, 2024

Thanks for the report. I recently noticed this myself. The name constraints validation is currently performed for each issuer/subject relation separately (this is basically how the cert_validator_t::validate() method is called), which means there is no context beyond the two certificates. I guess that's why the plugin enforces that name constraints are inherited (with narrowing/widening) through the complete chain so that the issuer of the end-entity certificate will provide all the relevant constraints (this is the first validation that will occur).

Instead, we'd technically have to maintain sets of allowed/disallowed names starting from the root and apply them to each level in the PKI and possibly modify them depending on the name constraints contained in the intermediate CA certificates. This could be similar to the policy constraints validation, which only occurs once the complete chain is available (basically the last call of validate() where anchor is set TRUE). Then we could build the chain and sets of name constraints from the root and properly validate them. I'll try to have a look at this soon.

from strongswan.

rc4 avatar rc4 commented on June 12, 2024

Wonderful, thank you so much! That sounds exactly like the approach I was thinking would be used.

Let me know if I can assist in testing in any way.

from strongswan.

tobiasbrunner avatar tobiasbrunner commented on June 12, 2024

I've pushed some changes to the 2114-name-constraints branch that fix several of the shortcomings of the previous code (see the commit message of the last commit for details).

The certificates generated by your script are correctly validated with these changes.

from strongswan.

rc4 avatar rc4 commented on June 12, 2024

That looks great, thanks! I have only now gotten it built from source so I'll give it a test. Appreciate it!

from strongswan.

rc4 avatar rc4 commented on June 12, 2024

Hey there, sorry for the delay, I had a busy week and forgot to finish testing!

I can confirm that this fixes my issue with my setup—thanks again so much for the blazing fast turnaround.

from strongswan.

tobiasbrunner avatar tobiasbrunner commented on June 12, 2024

Great, thanks for testing.

from strongswan.

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.