Closed TinCanTech closed 2 years ago
The variable cmd_opts found here: https://github.com/TinCanTech/easy-tls/blob/bf6dcb4e0d7295f345f7e1243b62759dc6aa7895/easytls#L3574 must be used unquoted, otherwise the elements are passed as one.
cmd_opts
Rework this so that, cmd_opts is only processed from command line and not internally. When inline_xyz() calls inline_base() the elements of cmd_opts should only be set by the caller.
inline_xyz()
inline_base()
So inline_tls_auth() would setup variables for:
inline_tls_auth()
no-key) no_x509_key=1 ;; add-dh) inline_dh_file=1 ;;
And not pass this: inline_base "${name}" ${cmd_opts} || die "Failed to create inline base file"
inline_base "${name}" ${cmd_opts} || die "Failed to create inline base file"
But instead pass this: inline_base "${name}" || die "Failed to create inline base file"
inline_base "${name}" || die "Failed to create inline base file"
inline_base() does not have to re-interpret cmd_opts.
This could also allow to expose inline_base() for user use, by having inline_base() have two caller methods;
Closed via https://github.com/TinCanTech/easy-tls/commit/e50c132309677ccd1d4fcaab02c7d353fd88de02
The variable
cmd_opts
found here: https://github.com/TinCanTech/easy-tls/blob/bf6dcb4e0d7295f345f7e1243b62759dc6aa7895/easytls#L3574 must be used unquoted, otherwise the elements are passed as one.Rework this so that,
cmd_opts
is only processed from command line and not internally. Wheninline_xyz()
callsinline_base()
the elements ofcmd_opts
should only be set by the caller.So
inline_tls_auth()
would setup variables for:And not pass this:
inline_base "${name}" ${cmd_opts} || die "Failed to create inline base file"
But instead pass this:
inline_base "${name}" || die "Failed to create inline base file"
inline_base()
does not have to re-interpretcmd_opts
.This could also allow to expose
inline_base()
for user use, by havinginline_base()
have two caller methods;