/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 02:39:56 UTC
  • mfrom: (257.1.2 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20090110023956-o7f5r8af28fmgahw
Fixed warnings on AMD64, thanks to Mooie <mooie@cow.se> for the patch.

* plugins.d/askpass-fifo.c (main): Cast value from TEMP_FAILURE_RETRY
                                   to int, the value the inner
                                   function returns.
* plugins.d/mandos-client.c (init_gpgme): - '' -
  (start_mandos_communication): New variable "ssize_t sret"; used to
                                store return value from
                                "gnutls_record_recv".  Also cast value
                                from TEMP_FAILURE_RETRY as above.
* plugins.d/usplash.c (usplash_write): New variable "ssize_t sret";
                                       used to store return value from
                                       "write".

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.8"
 
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