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

Inline v2 #1201

Merged
merged 31 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
823f70f
Introduce inline_file(): Rewrite and simplify inlining routine
TinCanTech Aug 5, 2024
6a0ebb8
sign-req: Use inline_file() - build_full: Do not use inline_creds()
TinCanTech Aug 5, 2024
b62986c
Remove inline_creds(), replaced by inline_file()
TinCanTech Aug 5, 2024
de0c796
Select inline_file() for command 'inline'
TinCanTech Aug 5, 2024
17a759b
inline: Disable EASYRSA_SILENT, no longer required
TinCanTech Aug 5, 2024
6f366e6
inline_file(): Provide full header details
TinCanTech Aug 6, 2024
853f172
ChangeLog: Move auto-inline from build_full() to sign_req()
TinCanTech Aug 6, 2024
52022d9
Inline self-sign certificate: Use new inline_file() function
TinCanTech Aug 6, 2024
6833d83
inline: Update help
TinCanTech Aug 6, 2024
6ab98c9
revoke_move(): Simplify and use '-f' for file existence check
TinCanTech Aug 6, 2024
b71028d
expire_cert(): Use '-f' for file existence check
TinCanTech Aug 6, 2024
321a2c0
locate_support_files(): Use '-d' and '-f'
TinCanTech Aug 6, 2024
42feab3
build_ca(): Simplify use of easyrsa_mkdir
TinCanTech Aug 6, 2024
1c53ca0
self_sign(): Simplify and use '-f' for file existence
TinCanTech Aug 6, 2024
24dcd55
gen_dh(): Use '-f' for file existence and correct indentation
TinCanTech Aug 6, 2024
9f6cf24
sign_req(): Simplify and use '-f' for file exitence
TinCanTech Aug 6, 2024
41e87dd
build_full(): Use '-f' for file existence and drop existing inline check
TinCanTech Aug 6, 2024
8882eba
inline_file(): Use '-f' for file existence
TinCanTech Aug 6, 2024
86f1208
revoke(): Use '-f' for file existence and remove excess '{}' braces
TinCanTech Aug 6, 2024
9dddda9
import_req(): Use '-f' for file existence
TinCanTech Aug 6, 2024
962c68f
set_pass(): Use '-f' for file existence
TinCanTech Aug 6, 2024
272200f
export_pkcs(): Use '-f' for file existence
TinCanTech Aug 6, 2024
54866a1
verify_cert(): Use '-f' for file existence
TinCanTech Aug 6, 2024
45b42fd
show() and show_ca(): Use '-f' for file existence
TinCanTech Aug 6, 2024
d9c9312
select_vars() and source_vars(): Use '-f' for file existence
TinCanTech Aug 6, 2024
12aadda
Command parser: Use '-f' for file existence
TinCanTech Aug 6, 2024
4ad4cef
easyrsa_mktemp(): Use '-f' for file existence
TinCanTech Aug 6, 2024
7a0839b
cleanup(): Add comment to explain use of '-e' for object existence
TinCanTech Aug 6, 2024
a2d57f5
init_pki(): Use '-d' for directory existence; sign_req(): Use '-f'
TinCanTech Aug 6, 2024
a02f545
easyrsa-tools.lib: Use '-f' for file existence
TinCanTech Aug 6, 2024
2190110
ChangeLog: Switch to '-f' for file existence
TinCanTech Aug 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Easy-RSA 3 ChangeLog

3.2.1 (TBD)

* Switch to '-f' for file existence (6ab98c9..a02f545) (#1201)
* inline: Move auto-inline from build_full() to sign_req() (823f70f) (#1201)
* gen-crl: Create additional CRL in DER format (69df0d8) (#1198)
* self-sign: Allow Edwards Curve based keys (81b749b) (#1197)
* Re-enable command 'renew' (version 2): Requires EasyRSA Tools (30fe311) (#1195)
Expand Down
14 changes: 7 additions & 7 deletions dev/easyrsa-tools.lib
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ expire_status() {

# The certificate for CN should exist but may not
unset -v expire_status_cert_exists
if [ -e "$cert_issued" ]; then
if [ -f "$cert_issued" ]; then

verbose "expire_status: cert exists"
expire_status_cert_exists=1
Expand Down Expand Up @@ -829,13 +829,13 @@ renew_status() {
cert_file_in cert_is_issued cert_is_serial renew_is_old

# Find renewed/issued/CN
if [ -e "$cert_r_issued" ]; then
if [ -f "$cert_r_issued" ]; then
cert_file_in="$cert_r_issued"
cert_is_issued=1
fi

# Find renewed/cert_by_serial/SN
if [ -e "$cert_r_by_sno" ]; then
if [ -f "$cert_r_by_sno" ]; then
cert_file_in="$cert_r_by_sno"
cert_is_serial=1
renew_is_old=1
Expand Down Expand Up @@ -969,7 +969,7 @@ Missing certificate file:
fi

# Verify request
if [ -e "$req_in" ]; then
if [ -f "$req_in" ]; then
verify_file req "$req_in" || user_error "\
Input file is not a valid request:
* $req_in"
Expand Down Expand Up @@ -1010,7 +1010,7 @@ Missing request file:
deny_msg="\
Cannot renew this certificate, a conflicting file exists:
*"
[ -e "$crt_out" ] && \
[ -f "$crt_out" ] && \
user_error "$deny_msg certificate: $crt_out"
unset -v deny_msg

Expand Down Expand Up @@ -1179,14 +1179,14 @@ renew_move() {
done

# remove credentials file
if [ -e "$creds_in" ]; then
if [ -f "$creds_in" ]; then
rm "$creds_in" || warn "\
Failed to remove credentials file:
* $creds_in"
fi

# remove inline file
if [ -e "$inline_in" ]; then
if [ -f "$inline_in" ]; then
rm "$inline_in" || warn "\
Failed to remove inline file:
* $inline_in"
Expand Down
Loading