/mandos/release

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

« back to all changes in this revision

Viewing changes to mandos-keygen

  • Committer: Teddy Hogeborn
  • Date: 2009-01-23 16:49:50 UTC
  • mfrom: (237.2.44 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20090123164950-o9xpip46ib4i6n23
Merge from trunk; miscellaneous small fixes.  Major points: A lintian
warning (long line in plugin-runner manual page) eliminated as
requested by sponsor, one bug fixed (bashism in mandos-keygen), and
one small inconsistency fixed (server is now started after install).

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
            false
 
287
            touch "$RINGDIR"/mismatch
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
 
    status="${PIPESTATUS[0]}"
296
 
    if [ "$status" -ne 0 ]; then
297
 
        exit "$status"
 
295
    if [ -e "$RINGDIR"/mismatch ]; then
 
296
        rm --force "$RINGDIR"/mismatch
 
297
        exit 1
298
298
    fi
299
299
    
300
300
    cat <<-EOF