Commit Graph
1396 Commits
Author SHA1 Message Date
Richard T Bonhomme 6e2d139177 Add helpful Warnings to promote preferred use of PKI/vars
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-12 18:35:47 +01:00
Richard T Bonhomme 17ebec2a3e Merge branch 'TinCanTech-vars-single-quote'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-12 15:40:20 +01:00
Richard T Bonhomme bff4a486e2 Merge branch 'vars-single-quote' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-vars-single-quote
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-12 15:37:41 +01:00
Richard T Bonhomme 7d5185f52c easyrsa_openssl() - Minor syle changes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-12 14:01:42 +01:00
Richard T Bonhomme de7735115c Only warn if 'vars' is in PKI
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 23:32:17 +01:00
Richard T Bonhomme 4c4efbd6ae Change Error to Warning: Make (') in vars-file non-fatal
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 23:08:36 +01:00
Richard T Bonhomme e30bfd3773 Unit test: Improve output
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 21:58:11 +01:00
Richard T Bonhomme 3160cac48f Merge branch 'TinCanTech-easyrsa_openssl'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 21:54:19 +01:00
Richard T Bonhomme 7b4272f34d Merge branch 'easyrsa_openssl' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-easyrsa_openssl 2022-04-11 21:52:28 +01:00
Richard T Bonhomme 6745e0e58a Merge branch 'TinCanTech-win-git-bash'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 21:21:42 +01:00
Richard T Bonhomme f0a3047cec Merge branch 'win-git-bash' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-win-git-bash 2022-04-11 21:19:50 +01:00
Richard T Bonhomme 540c6ff5af Unit test: shellcheck easyrsa-unit-tests.sh
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 21:16:25 +01:00
Richard T Bonhomme 3e24a76d7e Allow saving test data and improve log output
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 19:38:44 +01:00
Richard T Bonhomme 1aeddd9fcf Unit tests: Enable shellcheck and OpenSSL v3 (*nix only)
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 16:13:04 +01:00
Richard T Bonhomme 50850f5ff3 op-test.sh - Set System SSL for Windows
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 16:07:26 +01:00
Richard T Bonhomme ea666d5b97 op-test.sh - exit with correct status
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 16:00:45 +01:00
Richard T Bonhomme f79b66aba7 op-test.sh - Total rewrite
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-11 15:36:30 +01:00
Richard T Bonhomme adc03b5a5d Enable unit test with OpenSSL version 3 on REMOTE-CI
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-09 22:40:22 +01:00
Richard T Bonhomme a482caa79b Unit test - Temporarily disable shellcheck
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-09 22:00:03 +01:00
Richard T Bonhomme 538f3eada6 Enable OpenSSL version 3 unit tests
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-09 21:44:51 +01:00
Richard T Bonhomme 4b75783375 Upgrade Linux based unit test to OpenSSL 3.0.2
- 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-09 21:40:44 +01:00
Richard T Bonhomme 484bc56acc Remove redundant Create $EASYRSA_SSL_CONF
The config file is unambiguously and previously created by
install_data_to_pki().

The config file location is exported in the previous command.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-09 19:28:18 +01:00
Richard T Bonhomme 057be57825 Remove EASYRSA_EXTRA_EXTS code injection inside 'sed' script.
This code injection 'attempted' to insert a temp-file created with
EASYRSA_EXTRA_EXTS data. The insertion would take place at the awk
script marker "^#%EXTRA_EXTS%". However, this marker has already
been replaced by gen_req(), thus the condition to insert the code
was never met and the code injection has never taken place.

Testing this, I created a new marker for this injection to key from
and, due to the file-name variable not having been quoted, the test
fails when the file name has a space in it.

General tidy-up of easyrsa_openssl()

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-09 17:52:42 +01:00
Richard T Bonhomme ccec36d3ea Fold vars_source_check() back into verify_pki_init()
vars_source_check() is ONLY used by verify_pki_init(),
remove the extra function.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 21:32:12 +01:00
Richard T Bonhomme 324aa4e660 Merge branch 'TinCanTech-cleanup-cleanup'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 21:17:11 +01:00
Richard T Bonhomme 1e7fb8243a Silence cleanup()
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 20:33:25 +01:00
Richard T Bonhomme 29eaa061c2 Simplify detecting Windows
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 20:14:46 +01:00
Richard T Bonhomme 1844ec10af Remove old comment for upgrade function
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 20:02:30 +01:00
Richard T Bonhomme 0db21c3dd4 Detect Windows and Git-for-Windows bash
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 19:47:27 +01:00
Richard T Bonhomme b4ab1713c1 Remove all use of single quote (') from vars.example
A step toward a solution to #364

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-08 02:11:17 +01:00
Richard T Bonhomme fe47eba2c0 Style improvements to vars_setup()
Make detecting all vars files more simple and robust.
Improve warning and error messages.

Favour PKI/vars, wiith bias.

* Minor changes to output format for warn() and notice()

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 22:09:50 +01:00
Richard T Bonhomme 75bc3d1ed5 Do not require/use Extended Regular Expression
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 18:02:31 +01:00
Richard T Bonhomme 48eee21d2a Disallow use of single quote (') in vars file
Using single quotes in the vars file does not work:
* Either the vars file syntax is corrupted by an unescaped single quote.
* Or the SSL library will drop the single quote from the signed certificate.

Changes:
* Sanitize vars.example - Remove all single quotes.
* Search vars for single quote before sourcing it.

Closes: #34

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 17:18:41 +01:00
Nikolaos Kakouros 21ddca1af9 Fixes export-p8 command help text 2022-04-07 11:51:14 +00:00
Nikolaos Kakouros 73aac163f8 Adds export-p1 command 2022-04-07 11:50:40 +00:00
Richard T Bonhomme f06871cf03 ChangeLog: ANNOUNCE Easy-RSA version 3.0.1 - Initial debute
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 03:50:37 +01:00
Richard T Bonhomme 7ae3ffd7d3 Remove left-over cruft
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 03:04:12 +01:00
Richard T Bonhomme 15386d4ee3 Improve shellcheck 2086 'Unquoted expansions' problem
Easy-RSA uses unquoted expansion.

Each instance of SC2086 has been vetted, accepted and ignored.

shellcheck will still find new exceptions.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 02:03:00 +01:00
Richard T Bonhomme 886043fe49 Remove cruft
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-07 00:26:52 +01:00
Richard T Bonhomme cb686a8be4 Simplify finding a vars file
1. Name All supported vars files
2. Search for each supported vars file
3. Only allow One (or None) supported vars file to exist.
4. Prefer PKI/vars file.
5. Warn for All other deprecated vars files, if they exist.
6. Warn for NO vars file found and prefer PKI/vars.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 23:49:11 +01:00
Richard T Bonhomme 223237ab7f Only assign a value to $vars if a 'vars' file is found
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 22:59:23 +01:00
Richard T Bonhomme 57487a3406 Assign 'vars' correctly - set_var() is not suitable
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 22:22:15 +01:00
Richard T Bonhomme 7d1b00813c Final improvements to vars_setup()
New standards introduced:
* Use '-e' to test for existence not '-f' file.
* Only use '-z' not '-n', more visually distinct.

Minor code improvement: Use 'if command' to test for success.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 19:42:34 +01:00
Richard T Bonhomme 678cac5072 Set shellcheck options: -s sh -S warning -x
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 19:02:09 +01:00
Richard T Bonhomme dfe8e6ffad Update ChangeLog
Add:
   * Prefer 'PKI/vars' over all other locations (#528)
   * Introduce 'init-pki soft'  option (#197)

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 18:39:06 +01:00
Richard T Bonhomme 3c216e8208 Tidy up commit cf6d9efcea
Tidy up comments.
Silence spurious warning about 'vars not found'.
Only show which vars are found if more than one exists.
Minor code improvements.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 18:33:28 +01:00
Richard T Bonhomme ed67df9578 Dispose of garbage
Easy-RSA does not distribute broken code.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 04:36:15 +01:00
Richard T Bonhomme 0597b844e8 ANNOUNCEMENT: EasyRSA will not distribute deliberately broken code
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-06 04:31:58 +01:00
Richard T Bonhomme cf6d9efcea Merge branch 'TinCanTech-new_vars_setup'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2022-04-05 23:20:52 +01:00
Richard T Bonhomme bd7f47ee61 Merge branch 'new_vars_setup' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-new_vars_setup 2022-04-05 23:19:47 +01:00