fix bad test for BITS defaulting

This commit is contained in:
do butterflies cry? 2026-01-21 16:00:07 +10:00
parent 0fa8372a34
commit 8ae7c44e06

View file

@ -99,7 +99,7 @@ fi
case "$TYPE" in case "$TYPE" in
ecdsa) ecdsa)
if [[ -n "$BITS" ]]; then if [[ -z "$BITS" ]]; then
BITS='521' BITS='521'
else else
# NOTE: ECDSA keys can only operate on elliptic curves # NOTE: ECDSA keys can only operate on elliptic curves
@ -116,12 +116,12 @@ case "$TYPE" in
ed25519) ed25519)
# NOTE: the value of BITS does not matter for Ed25519 # NOTE: the value of BITS does not matter for Ed25519
# NOTE: as it operates on a fixed size elliptic curve # NOTE: as it operates on a fixed size elliptic curve
if [[ -n "$BITS" ]]; then if [[ -z "$BITS" ]]; then
BITS='256' BITS='256'
fi fi
;; ;;
rsa) rsa)
if [[ -n "$BITS" ]]; then if [[ -z "$BITS" ]]; then
BITS='4096' BITS='4096'
else else
case "$BITS" in case "$BITS" in