/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-keygen

  • Committer: Teddy Hogeborn
  • Date: 2009-01-10 06:00:50 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090110060050-6v5y342fit0233pg
* plugins.d/askpass-fifo.c: Fix name in header.
* plugins.d/mandos-client.c: - '' -
* plugins.d/password-prompt.c: - '' -
* plugins.d/splashy.c: - '' -
* plugins.d/usplash.c: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# Contact the authors at <mandos@fukt.bsnet.se>.
22
22
23
23
 
24
 
VERSION="1.0.5"
 
24
VERSION="1.0.3"
25
25
 
26
26
KEYDIR="/etc/keys/mandos"
27
27
KEYTYPE=DSA
147
147
        echo "Invalid key length" >&2
148
148
        exit 1
149
149
    fi
150
 
    
 
150
 
151
151
    if [ -z "$KEYEXPIRE" ]; then
152
152
        echo "Empty key expiration" >&2
153
153
        exit 1
172
172
    if [ -n "$KEYEMAIL" ]; then
173
173
        KEYEMAILLINE="Name-Email: $KEYEMAIL"
174
174
    fi
175
 
    
 
175
 
176
176
    # Create temporary gpg batch file
177
177
    BATCHFILE="`mktemp -t mandos-keygen-batch.XXXXXXXXXX`"
178
178
fi
284
284
        stty echo
285
285
        if [ "$first" != "$second" ]; then
286
286
            echo -e "Passphrase mismatch" >&2
287
 
            touch "$RINGDIR"/mismatch
 
287
            false
288
288
        else
289
289
            echo -n "$first"
290
290
        fi
292
292
        --homedir "$RINGDIR" --trust-model always --armor --encrypt \
293
293
        --sign --recipient "$FINGERPRINT" --comment "$FILECOMMENT" \
294
294
        > "$SECFILE"
295
 
    if [ -e "$RINGDIR"/mismatch ]; then
296
 
        rm --force "$RINGDIR"/mismatch
297
 
        exit 1
 
295
    status="${PIPESTATUS[0]}"
 
296
    if [ "$status" -ne 0 ]; then
 
297
        exit "$status"
298
298
    fi
299
299
    
300
300
    cat <<-EOF