Drop interpolated string replacement
Interpolated string is Bashism:
possible bashism in bin/tests/system/engine_pkcs11/setup.sh line 34 ($'...' should be "$(printf '...')"):
pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-engine_pkcs11" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id 2> pkcs11-tool.err.$zone.$id || return 1
possible bashism in bin/tests/system/engine_pkcs11/setup.sh line 34 (${parm/?/pat[/str]}):
pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-engine_pkcs11" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id 2> pkcs11-tool.err.$zone.$id || return 1
possible bashism in bin/tests/system/keyfromlabel/tests.sh line 27 ($'...' should be "$(printf '...')"):
pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1
possible bashism in bin/tests/system/keyfromlabel/tests.sh line 27 (${parm/?/pat[/str]}):
pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1
The replacement is actually not needed as $p11id holds only one line.
Also see https://www.shellcheck.net/wiki/SC3003 and
https://www.shellcheck.net/wiki/SC3060.
This commit is contained in:
@@ -24,7 +24,7 @@ keygen() {
|
||||
|
||||
label="${id}-${zone}"
|
||||
p11id=$(echo "${label}" | sha1sum - | awk '{print $1}')
|
||||
pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1
|
||||
pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1
|
||||
}
|
||||
|
||||
keyfromlabel() {
|
||||
|
||||
Reference in New Issue
Block a user