/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

* debian/mandos.dirs: Added "etc/dbus-1/system.d".

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.14"
25
25
 
26
26
KEYDIR="/etc/keys/mandos"
27
27
KEYTYPE=DSA
217
217
        %commit
218
218
        EOF
219
219
    
 
220
    if tty --quiet; then
 
221
        cat <<-EOF
 
222
        Note: Due to entropy requirements, key generation could take
 
223
        anything from a few minutes to SEVERAL HOURS.  Please be
 
224
        patient and/or supply the system with more entropy if needed.
 
225
        EOF
 
226
        echo -n "Started: "
 
227
        date
 
228
    fi
 
229
    
220
230
    # Generate a new key in the key rings
221
231
    gpg --quiet --batch --no-tty --no-options --enable-dsa2 \
222
232
        --homedir "$RINGDIR" --trust-model always \
223
233
        --gen-key "$BATCHFILE"
224
234
    rm --force "$BATCHFILE"
225
235
    
 
236
    if tty --quiet; then
 
237
        echo -n "Finished: "
 
238
        date
 
239
    fi
 
240
    
226
241
    # Backup any old key files
227
242
    if cp --backup=numbered --force "$SECKEYFILE" "$SECKEYFILE" \
228
243
        2>/dev/null; then
278
293
        stty -echo
279
294
        echo -n "Enter passphrase: " >&2
280
295
        first="$(head --lines=1 | tr --delete '\n')"
281
 
        echo -n -e "\nRepeat passphrase: " >&2
 
296
        echo >&2
 
297
        echo -n "Repeat passphrase: " >&2
282
298
        second="$(head --lines=1 | tr --delete '\n')"
283
299
        echo >&2
284
300
        stty echo
285
301
        if [ "$first" != "$second" ]; then
286
 
            echo -e "Passphrase mismatch" >&2
 
302
            echo "Passphrase mismatch" >&2
287
303
            touch "$RINGDIR"/mismatch
288
304
        else
289
305
            echo -n "$first"