Commit Graph
1476 Commits
Author SHA1 Message Date
Richard T Bonhomme 9a8bf39b75 Rename safe_set_var() to force_set_var()
force_set_var() is intended to deliberately over-write all prior values.

This also drops an unnecessary 'eval'.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-25 03:53:20 +00:00
Richard T Bonhomme 420c30a98c Merge branch 'TinCanTech-remove-unit-test-password'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-24 20:07:01 +00:00
Richard T Bonhomme 1639180272 Merge branch 'remove-unit-test-password' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-remove-unit-test-password
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-24 20:06:10 +00:00
Richard T Bonhomme 81ab139ebb Remove hard-coded unit-test password from build-ca
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-24 16:05:02 +00:00
Richard T Bonhomme 6fe973a548 Merge branch 'TinCanTech-update-ca-attributes'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-22 19:55:36 +00:00
Richard T Bonhomme 915d52c598 Merge branch 'update-ca-attributes' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-update-ca-attributes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-22 19:54:49 +00:00
Richard T Bonhomme c4eeff9201 build-ca: Write 'unique_subject = no' to index.txt.attr file
EasyRSA version 3.1x 'renew' command requires this attribute.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-22 19:20:24 +00:00
Richard T Bonhomme 81842810ef Merge branch 'TinCanTech-wrap-build-ca'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-22 19:12:44 +00:00
Richard T Bonhomme 6842fb2273 Merge branch 'wrap-build-ca' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-wrap-build-ca
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-22 19:12:00 +00:00
Richard T Bonhomme 91bcabeaf0 build_ca(): Wrap long lines
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-21 23:59:27 +00:00
Richard T Bonhomme bff759d48f Merge branch 'TinCanTech-reorder-output'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-20 21:14:10 +00:00
Richard T Bonhomme 0c0f5b019c Merge branch 'reorder-output' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-reorder-output
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-20 21:13:28 +00:00
Richard T Bonhomme 00d7a69788 sign_req(): Wrap long lines, improve error messages and comments
Add extra check for successfully moving of temp-file to certificate.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-20 17:21:52 +00:00
Richard T Bonhomme e6aa6f6393 gen_dh(): Wrap long lines
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-20 16:23:04 +00:00
Richard T Bonhomme b3e4c638bf Re-order output messages and subsequent newlines for aesthetics
Remove unused EASYRSA_ININE, satisfy shellcheck.

Wrap long lines.

Minor improvements to comments and error messages.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-20 15:48:28 +00:00
Richard T Bonhomme 689ec8b45c Merge branch 'TinCanTech-add-verify-cert-cmd'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-19 21:19:57 +00:00
Richard T Bonhomme 66d74a7126 Merge branch 'add-verify-cert-cmd' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-add-verify-cert-cmd
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-19 21:17:33 +00:00
Richard T Bonhomme ffd63b6cc4 Add 'verify-cert' command to current 'verify' command
This should have always been 'verify-cert' because it only verifies
to certificates. (Also change 'help' text)

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-19 02:14:39 +00:00
Richard T Bonhomme 3d45330551 Merge branch 'TinCanTech-new-date-functions'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-18 21:33:08 +00:00
Richard T Bonhomme ce16ee77a3 Merge branch 'new-date-functions' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-new-date-functions
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-18 21:32:22 +00:00
Richard T Bonhomme ae10aee413 Wrap long lines in "Main" function and verify_cert()
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-18 21:00:11 +00:00
Richard T Bonhomme 8afd07b20d Minor related improvements
safe_set_var(): Show offending input value in error output

Standardise similar functions:
* ssl_cert_serial()
* ssl_cert_not_before_date()
* ssl_cert_not_after_date

Wrap more long lines.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-15 23:01:21 +00:00
Richard T Bonhomme c83a26d8ac db_date_to_ff_date(): Return ff_date via safe_set_var()
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-15 22:13:32 +00:00
Richard T Bonhomme 587ba1aa41 ff_date_to_cert_date(): Return cert_type_date via safe_set_var()
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-15 21:53:26 +00:00
Richard T Bonhomme 159aa15cd4 offset_days_to_cert_date(): Return cert_type_date via safe_set_var()
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-15 21:21:57 +00:00
Richard T Bonhomme b0f3d8bf90 cert_date_to_timestamp_s(): Return timestamp_s via safe_set_var()
This only effects status_expire(), show-expire.

Add error detection for 'date' usage.

Wrap long lines.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-15 20:38:51 +00:00
Richard T Bonhomme 7492097110 fixed_cert_dates(): Remove subshell
fixed_cert_dates(): Replace capturing subshell-output
by setting variables via safe_set_var().

Add error detection for 'date' usage.

Wrap long lines.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-15 19:01:09 +00:00
Eric F Crist 354c20d82b update ChangeLog for release
Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2023-01-13 15:46:44 -06:00
Richard T Bonhomme caebd4b93a Merge branch 'TinCanTech-fix-offset-adjustment'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-13 17:47:22 +00:00
Richard T Bonhomme 8845462b54 Merge branch 'fix-offset-adjustment' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-fix-offset-adjustment
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-13 17:46:47 +00:00
Richard T Bonhomme 8dc2064880 Option --fix-offset: Adjust off-by-one day
The current code calculates --fix-offset=1 as January 2nd.

This decreases the input value by one, which results in
--fix-offset=1 being January 1st.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-13 17:15:18 +00:00
Eric F Crist 0d0daf549b upgrading openssl for windows to 3.0.7
Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2023-01-13 10:14:37 -06:00
Richard T Bonhomme 4184f547a6 Unit-test: Identify macOS
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-09 20:17:10 +00:00
Richard T Bonhomme 76f5840ce5 Merge branch 'TinCanTech-status-LC_TIME-C'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-05 13:45:42 +00:00
Richard T Bonhomme e029c178a6 Merge branch 'status-LC_TIME-C' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-status-LC_TIME-C
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-05 13:44:54 +00:00
Richard T Bonhomme 0699393324 Status Reports: Set 'LC_TIME=C.UTF-8', only used for reports
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-05 13:26:46 +00:00
Richard T Bonhomme 2fed2a7f1b Merge branch 'TinCanTech-prioritise-passout'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-04 17:08:51 +00:00
Richard T Bonhomme da33d03fc1 Merge branch 'prioritise-passout' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-prioritise-passout
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-04 17:08:05 +00:00
Richard T Bonhomme b7f8d9f79a Global option '--passout' always take priority ONLY
Option '--passout' MUST take priority over '--nopass' and 'nopass'.
Otherwise, the private key is unintentionally created unencrypted.

Option '--passin' must NOT take priority.
Otherwise, it is not possible to automatically create an entity
key without a password, if the CA key is created with a password.

Initialisation: Wrap long lines

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-04 02:34:04 +00:00
Richard T Bonhomme e27ab41dad Refactor manual CA passphrase input
This is a personal preference only. No functional change.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-04 00:28:50 +00:00
Richard T Bonhomme 7c9f18bfb8 Merge branch 'TinCanTech-always-enable-inline'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 22:39:51 +00:00
Richard T Bonhomme 79cbd1d494 Merge branch 'always-enable-inline' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-always-enable-inline
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 22:39:11 +00:00
Richard T Bonhomme 51a82a7fb5 build-full: Always enable inline file creation
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 21:56:58 +00:00
Richard T Bonhomme 866557a589 install_data_to_pki(): Wrap long lines, no functional changes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 20:23:50 +00:00
Richard T Bonhomme 5d59605365 init-pki: Add new inline directory (Wrap long lines)
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 19:19:30 +00:00
Richard T Bonhomme ae0020acdc Create new 'inline' directory as required
Require creation during init-pki, renew and rebuild.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 16:08:16 +00:00
Richard T Bonhomme a4f90d8c03 Unit-test: Update openssl to v3.0.7 (Linux only)
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-03 00:43:57 +00:00
Richard T Bonhomme a7f5044c0d Add new inline file to command 'rebuild' processes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-02 22:01:27 +00:00
Richard T Bonhomme 0072f5171c Add new inline file to command 'renew' processes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-02 21:38:39 +00:00
Richard T Bonhomme ef9b3b8192 Add new inline file to command 'revoke' processes
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-01-02 20:28:44 +00:00