1648 Commits

Author SHA1 Message Date
Eric F Crist
3fa9cd8c78
update changelog for release 2023-05-19 07:53:38 -05:00
Richard T Bonhomme
60b5c03541
Squashed commit of the following:
commit d3592f1b6ea69bb93559108ac78c869308a8e2f3
Merge: ec1d428 05d0213
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Thu May 11 23:06:20 2023 +0100

    Merge branch 'verify-cert-direct-openssl-call' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-verify-cert-direct-openssl-call

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

commit 05d0213d6dff4706d058442b6e9cddcad1124fbc
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Thu May 11 13:35:12 2023 +0100

    verify-cert: Call 'openssl' directly to capture error

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-11 23:07:07 +01:00
Eric F Crist
ec1d428c6a
Updating openssl for i686 to v3.0.8
Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2023-05-10 21:10:06 -05:00
Eric F Crist
6d79b24399
Updating x86_64 openssl to v3.0.8
Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
2023-05-10 21:01:39 -05:00
Richard T Bonhomme
c2afcb6b45
Remove stray space characters and correct comment about OpenSSL
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-10 21:47:21 +01:00
Richard T Bonhomme
4eb6cd6b5f
build-ca: Correct 'CA_key_pass' parameter expansion expression
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-10 01:14:34 +01:00
Richard T Bonhomme
ead015aab1
build-ca: Remove unnecessary 'shellcheck' directive
shellcheck is a great tool but it must still be used with respect.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-10 01:07:50 +01:00
Richard T Bonhomme
e5643386b8
build-ca: Rename 'out_key_pass' to 'CA_key_pass' (Disambiguation)
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-10 00:51:05 +01:00
Richard T Bonhomme
35def135be
build-ca: Clear password variables in a 'shellcheck' friendly manner
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-10 00:39:37 +01:00
Richard T Bonhomme
385b7b279d
build-ca: Unset crucial password variables
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-09 23:45:55 +01:00
Richard T Bonhomme
a6129e3416
upgrade: Do not create second secure_session and format output
Command 'upgrade' was configured to create a second secure_session,
this is not allowed, so remove.

Minor format changes for 'show-expire' and --verbose output.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-09 12:30:50 +01:00
Richard T Bonhomme
0244306956
build-ca: 'if/then/else' wrap file-descriptor commands
Aesthetics, no functional change.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-09 02:27:12 +01:00
Richard T Bonhomme
3d14095384
build-ca: Remove new key if moving new certificate fails
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-08 22:51:38 +01:00
Richard T Bonhomme
93d4f73140
Merge branch 'TinCanTech-remove-ca-pw-temp-files'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-08 14:07:05 +01:00
Richard T Bonhomme
0719f5496d
Merge branch 'remove-ca-pw-temp-files' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-remove-ca-pw-temp-files
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-08 14:06:20 +01:00
Richard T Bonhomme
57b91bed56
build-ca: Add option --ca-via-tf, use temp-files for CA password
This allows a fallback to use temp-files for CA password, in the event
that file-descriptor method fails.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-07 13:03:26 +01:00
Richard T Bonhomme
68ddeecf23
ChangeLog: build-ca: Replace password temp-files with file-descriptors
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 21:09:37 +01:00
Richard T Bonhomme
27870d695a
build-ca: Replace password temp-file method with file-descriptors
Until now, EasyRSA has used temp-files to store the CA password and
passed those temp-files to SSL to build a CA keypair, when building
a CA manually, with a password.

From now, EasyRSA will use an internal variable to contain the CA
password and pass the value of that variable via file-descriptors
to SSL, when building a CA keypair.

This file-descriptor method is only used when building a CA with a
password manually, when the user enters the password via keyboard.
All other build-ca methods remain unchanged.

Also, move keypair temp-files to output files or error out.

Also, minor improvements to comments and verbose messages.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 20:49:10 +01:00
Richard T Bonhomme
7b98f97a07
Merge branch 'TinCanTech-correct-default-algo-assign'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 20:20:56 +01:00
Richard T Bonhomme
7d310e421c
Merge branch 'correct-default-algo-assign' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-correct-default-algo-assign
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 20:20:19 +01:00
Richard T Bonhomme
9316a37417
easyrsa_openssl(): Move escape_hazaard() usage call
Move escape_hazard() to use the same control as easyrsa_rewrite_ssl_config().

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 20:04:53 +01:00
Richard T Bonhomme
7d6810ebb9
easyrsa_openssl(): Move saving SAFE SSL config name to correct place
Saving the name of the fully expanded Safe SSL config means that this
config file only has to be built once.

The assignment of working_safe_ssl_conf, which signifies that a Safe
SSL config has already been created, was set too late, which caused
it to be set even if the Safe SSL config had not been created.

Also, include a final check in verify_working_env() to ensure that
working_safe_ssl_conf has not been set prior to executing the issued
command, eg. build-ca.

Also, improve verbose messages and comments.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 15:50:26 +01:00
Richard T Bonhomme
601766bdaf
verify_algo_params(): Call SSL lib via EASYRSA_OPENSSL
verify_algo_params() expects errors when settings are not corrrect.
Therefore, is must not use easyrsa_openssl() meta-wrapper, which would
error out with a misleading error message.

Fixing this also ensures that the SAFE SSL config is not built prior
to EASYRSA_REQ_CN being set.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 15:44:38 +01:00
Richard T Bonhomme
e68a41c50f
vars_setup(): Always assign EASYRSA_KEY_SIZE
EASYRSA_KEY_SIZE is present in the SSL config file, therefore,
it MUST always be set, regardless of EASYRSA_ALGO in use.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-06 15:39:45 +01:00
Richard T Bonhomme
2141bfa245
Merge branch 'TinCanTech-mutual-exlusion-verbose-and-silent'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-03 00:41:21 +01:00
Richard T Bonhomme
114e548a99
Merge branch 'mutual-exlusion-verbose-and-silent' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-mutual-exlusion-verbose-and-silent
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-03 00:40:45 +01:00
Richard T Bonhomme
ba1b61f53c
mutual_exclusions(): Use of --silent and --verbose is unresolvable
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-02 22:13:48 +01:00
Richard T Bonhomme
604f8d9db2
Merge branch 'TinCanTech-make-safe-ssl-copy-temp-file'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-02 21:10:38 +01:00
Richard T Bonhomme
097d47d112
Merge branch 'make-safe-ssl-copy-temp-file' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-make-safe-ssl-copy-temp-file
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-02 21:09:10 +01:00
Richard T Bonhomme
906df2dcec
easyrsa_openssl(): makesafecnf - Copy temp-file do NOT move it
Command 'easyrsa_openssl makesafecnf' is used internally to create a safe
SSL config file. (By status reports, read_db())

Once the safe SSL config file has been named as a temp-file and created,
the script continues to use that temp-file as the master copy, it does not
recreate a safe SSL config file for subsequent calls to easyrsa_openssl().

Therefore, the temp-file MUST be copied to the standard safe SSL file not
moved. Otherwise, the named temp-file is removed.

Also, move the assignment of the safe SSL temp-file to the correct place.
This means that a new temp-file wiill only be assigned once.

Also, verify that the safe SSL temp-file exists when it is expected to.

Also, change use of '--no--safe-ssl' with LibreSSL to a FATAL error.

Other changes are for error and verbose messages.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-02 20:40:44 +01:00
Richard T Bonhomme
e254ee4451
gen-req: Standardise error message for old easyrsa-openssl.cnf
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 22:30:40 +01:00
Richard T Bonhomme
625dae2339
vars.example: Rename EASYRSA_CERT_EXPIRE to EASYRSA_PRE_EXPIRE_WINDOW
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 22:05:09 +01:00
Richard T Bonhomme
aa29f444f4
Merge branch 'TinCanTech-update-openssl-conf-warn'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 21:58:10 +01:00
Richard T Bonhomme
cbe3f9b70b
Merge branch 'update-openssl-conf-warn' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-update-openssl-conf-warn
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 21:57:29 +01:00
Richard T Bonhomme
55ee5fcfde
X509-types insert markers: Move and improve
X509-types insert markers are used by 'awk' to insert data at specific
points in the easyrsa-openssl.cnf file in use.

The checks are moved to below more important imput checks

For build-ca, the check is ONLY done if EASYRSA_EXTRA_EXTS is defined.
This is exceedingly unlikely, because EASYRSA_EXTRA_EXTS is not documented.

For sign-req, the check is only done if --copy-ext isused.

Also, remove an over-indent in "Confirm use of NS extestions"

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 21:38:35 +01:00
Richard T Bonhomme
a724ca91d1
sign-req: Require confirm use of deprecated Netscape extensions
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 21:17:48 +01:00
Richard T Bonhomme
4f1c16aa9f
sign_req(): Move generte-random-serial-number below input checks
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 20:59:19 +01:00
Richard T Bonhomme
f92fa738a9
gen-req, sign-req, build-full: Verify requirements correctly
* gen-req: Use verify_pki_init().
* sign-req: Use verify_ca_init().
* build-full: Defer requirements to functions above.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 20:32:49 +01:00
Richard T Bonhomme
8451adee6b
Merge branch 'TinCanTech-remove_secure_session-ROS'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 20:17:54 +01:00
Richard T Bonhomme
ddc87e9c0d
Merge branch 'remove_secure_session-ROS' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-remove_secure_session-ROS
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 20:17:14 +01:00
Richard T Bonhomme
aca34a051b
Merge branch 'TinCanTech-import-req-check-in-file'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 20:12:31 +01:00
Richard T Bonhomme
4c077a5b10
Merge branch 'import-req-check-in-file' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-import-req-check-in-file
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 20:11:37 +01:00
Richard T Bonhomme
b8455ad392
import-req: Check input file exists
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 19:58:40 +01:00
Richard T Bonhomme
a9192c1866
remove_secure_session(): Add missing 'fi' statement
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 14:04:30 +01:00
Richard T Bonhomme
a9bc2ee576
remove_secure_session(): Return-On-Success Only
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-05-01 13:59:31 +01:00
Richard T Bonhomme
15299444a4
Status reports: Use verbose(), remove easyrsa_debug()
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-04-20 14:22:23 +01:00
Richard T Bonhomme
8eae7213c8
Merge branch 'TinCanTech-expire_status-use-ssl-checkend'
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-04-18 23:48:41 +01:00
Richard T Bonhomme
25ba31ce0a
Merge branch 'expire_status-use-ssl-checkend' of ssh://github.com/TinCanTech/easy-rsa into TinCanTech-expire_status-use-ssl-checkend
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-04-18 23:46:53 +01:00
Richard T Bonhomme
86fb03c538
Correct typo in hash value
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-04-15 21:45:45 +01:00
Richard T Bonhomme
9c03bb9e94
Unit test: Update openssl hash
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
2023-04-15 21:38:47 +01:00