Giter Site home page Giter Site logo

Comments (5)

QueuingKoala avatar QueuingKoala commented on July 30, 2024

Good point, thanks for the report.

I think the way to resolve this is to use the already-existing x509-types/ dir layout (which defaults to the currently supplied options in the .cnf file for the 'ca' type) and use the -extfile flag to the x509 command. The idea here is to make the CA signing process more like how sign_req() works currently, supporting both x509-types/ and env-var additions to the certificate extensions.

For sites that wish to use different options for a self-signed CA verses signing other sub-CA requests, the default 'ca' file under x509-types/ can be copied to a sub_ca extensions file, or the equivalent approach used with env-vars.

from easy-rsa.

TinCanTech avatar TinCanTech commented on July 30, 2024

This essentially boils down to build-ca supporting EASYRSA_EXTRA_EXTS.

Linking: #525

Solution:

  • add:nameConstraints=permitted;DNS:example.com to x509-types/ca
  • Pending #526

There is no env:vars solution, at this time.

from easy-rsa.

TinCanTech avatar TinCanTech commented on July 30, 2024

There is also another problem:

easy-rsa/easyrsa3/easyrsa

Lines 379 to 388 in 9970d62

easyrsa_openssl_conf=$(easyrsa_mktemp) || die "Failed to create temporary file"
easyrsa_extra_exts=
if [ -n "$EASYRSA_EXTRA_EXTS" ]; then
easyrsa_extra_exts=$(easyrsa_mktemp) || die "Failed to create temporary file"
cat >"$easyrsa_extra_exts" <<-EOF
req_extensions = req_extra
[ req_extra ]
$EASYRSA_EXTRA_EXTS
EOF
fi

req_extensions do not fly for CAs.

@luizluca EASYRSA_EXTRA_EXTS may not belong inside of easyrsa_openssl()

from easy-rsa.

TinCanTech avatar TinCanTech commented on July 30, 2024

The bottom_line is:

  • EASYRSA_EXTRA_EXTS is not the variable to use for CA extensions.

PRs welcome.

Easy fix..

    EASYRSA_CA_EXTRA_EXTS="$EASYRSA_EXTRA_EXTS"
    unset -v EASYRSA_EXTRA_EXTS

from easy-rsa.

TinCanTech avatar TinCanTech commented on July 30, 2024

Feedback welcome.

from easy-rsa.

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.