Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opt. --subca-len: basicConstraints CA extension, Append 'pathlen:N' #706

Merged
merged 5 commits into from Sep 28, 2022

Commits on Sep 24, 2022

  1. Opt. --subca-len: basicConstraints CA extension, Append 'pathlen:N'

    When signing a request for an intermediate CA using --subca-len=N:
    
    For a Sub-CA, the current method to apply 'pathlen:N' to CA basicConstraints
    over-writes all user set basicConstraints.
    
    Replace that with an awk script which reads the current x509-types/ca file;
    selects the last occurence of 'basicConstraints' (As does OpenSSL) and then
    prints that line, with ", pathlen:$EASYRSA_SUBCA_LEN" appended, into the
    temporary x509-types/ca file.
    
    If no CA basicConstraint is found then exit with an error. Reason:
    
    Easy-RSA default CA basicConstrain will always be defined. If that is changed
    by the user, who then attempts to use Easy-RSA to append 'pathlen' then that
    is an error. Easy-RSA must not insert a default when the default has been
    deliberately removed.
    
    Closes: OpenVPN#691 - Original bug report.
    Closes: OpenVPN#692 - First use of awk as a solution. [Credit]
    
    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
    TinCanTech committed Sep 24, 2022
    Copy the full SHA
    4f9e32f View commit details
    Browse the repository at this point in the history
  2. typ0: Replace single TAB with SPACE

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
    TinCanTech committed Sep 24, 2022
    Copy the full SHA
    44d69ca View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2022

  1. Use correct input file x509-types/ca

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
    TinCanTech committed Sep 25, 2022
    Copy the full SHA
    14ebbe2 View commit details
    Browse the repository at this point in the history
  2. Move show_host() to cleanup() and move detect_host() after options

    Move show_host() to cleanup() and only call it when die() was called.
    This allows for confirm() Aborted to exit without extended error data.
    
    Move detect_host after options processing. Allows for use of options.
    eg: --verbose
    
    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
    TinCanTech committed Sep 25, 2022
    Copy the full SHA
    96b3d38 View commit details
    Browse the repository at this point in the history
  3. ChangeLog: Add resolution of --subca-len=N issue

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
    TinCanTech committed Sep 25, 2022
    Copy the full SHA
    43e5cb9 View commit details
    Browse the repository at this point in the history