OpenVPN / easy-rsa

easy-rsa - Simple shell based CA utility
Other
4k stars 1.19k forks source link

Global option `--copy-ext` is not included in UT #1094

Closed TinCanTech closed 5 months ago

TinCanTech commented 5 months ago

While deconstructing the awk/grep/sed soup, I found that --copy-ext is not tested. This means a lot of hairy code has gone untested for some time. Manual testing shows that --copy-ext does work correctly .. to some degree.

--copy-ext, $EASYRSA_EXTRA_EXTS, --san and --req-cn are all intrinsically linked, in unexpected ways. Commands gen-req and sign-req have contradictory results.

Unit testing --copy-ext will help. (This is a reminder - Fixed below)

In particular, I think that openssl-easyrsa.cnf should replace:

# A placeholder to handle the --copy-ext feature:
#%COPY_EXTS%    # Do NOT remove or change this line as --copy-ext support requires it

with

copy_extensions = copy

And remove copy_extensions = copy as required and/or when requested.

This is because: easy-rsa - Simple shell based CA utility.

Simplify ..

The priorities are:

You are welcome to help resolve this.

TinCanTech commented 5 months ago

Merged Add --copy-ext test, which addresses the Unit test.

Linked-to: #1093