keyID="$1"
# set subkey defaults
- SUBKEY_TYPE=${KEY_TYPE:-RSA}
- SUBKEY_LENGTH=${KEY_LENGTH:-1024}
- SUBKEY_USAGE=${KEY_USAGE:-encrypt,auth}
+ SUBKEY_TYPE=${KEY_TYPE:-"RSA"}
+ SUBKEY_LENGTH=${KEY_LENGTH:-"1024"}
+ SUBKEY_USAGE=${KEY_USAGE:-"encrypt,auth"}
gpgOut=$(gpg --fixed-list-mode --list-keys --with-colons \
"$keyID" 2> /dev/null)
# generate server gpg key
gen_key() {
# set key defaults
- KEY_TYPE=${KEY_TYPE:-RSA}
- KEY_LENGTH=${KEY_LENGTH:-2048}
- KEY_USAGE=${KEY_USAGE:-encrypt,auth}
- SERVICE=${SERVICE:-ssh}
+ KEY_TYPE=${KEY_TYPE:-"RSA"}
+ KEY_LENGTH=${KEY_LENGTH:-"2048"}
+ KEY_USAGE=${KEY_USAGE:-"encrypt,auth"}
+ SERVICE=${SERVICE:-"ssh"}
HOSTNAME_FQDN=${HOSTNAME_FQDN:-$(hostname -f)}
USERID=${USERID:-"$SERVICE"://"$HOSTNAME_FQDN"}