aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
authorrhatto <rhatto>2007-07-11 14:39:35 +0000
committerrhatto <rhatto>2007-07-11 14:39:35 +0000
commit21916f8c5887da7924ec0ecf67b57166a8e591cb (patch)
tree87cfc5ce960c2f710fb46751e48fbf19177d42d1 /firma
parentd8079a6919ee523a3fd03b83275ec1b10553bfd5 (diff)
downloadfirma-21916f8c5887da7924ec0ecf67b57166a8e591cb.tar.gz
firma-21916f8c5887da7924ec0ecf67b57166a8e591cb.tar.bz2
small fix
Diffstat (limited to 'firma')
-rwxr-xr-xfirma5
1 files changed, 2 insertions, 3 deletions
diff --git a/firma b/firma
index 69569e7..13d2112 100755
--- a/firma
+++ b/firma
@@ -96,8 +96,7 @@ function CheckPassphrase {
# depends on function(s): none
# returns: 0 if valid password, 1 if invalid
#-------------------------------------------------------------
- if [[ -z "$(grep -o "^PASSPHRASE='[^']*'$" $LIST_CONFIG_FILE)" || \
- -z "$PASSPHRASE" || \
+ if [[ -z "$PASSPHRASE" || \
"$(echo "$PASSPHRASE" | wc -c)" -lt "25" || \
-z "$(echo "$PASSPHRASE" | tr -dc '[[:lower:]]')" || \
-z "$(echo "$PASSPHRASE" | tr -dc '[[:upper:]]')" || \
@@ -184,7 +183,7 @@ function CheckListConfigFile {
if [[ ! -d "$LIST_HOMEDIR" || ! -f "$LIST_HOMEDIR/pubring.gpg" || ! -f "$LIST_HOMEDIR/secring.gpg" ]]; then
LogMessage "FATAL: $LIST_NAME: GPG home directory ("$LIST_HOMEDIR") or the GPG keyrings could not be found. Quitting."
return_code=1
- elif ! CheckPassphrase; then
+ if [[ -z "$(grep -o "^PASSPHRASE='[^']*'$" $LIST_CONFIG_FILE)" ]] || ! CheckPassphrase; then
LogMessage "FATAL: $LIST_NAME: List passphrase is empty or does not meet the minimum complexity requirements. Quitting."
return_code=1
elif [[ -z "$($GPG --list-secret-keys --with-colons --fixed-list-mode "<$LIST_ADDRESS>" 2> /dev/null)" ]]; then