/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-02-13 05:38:21 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090213053821-03e696gckk4nbjps
Support not using IPv6 in server:

* mandos (AvahiService.__init__): Take new "protocol" parameter.  All
                                  callers changed.
  (IPv6_TCPServer.__init__): Take new "use_ipv6" parameter.  All
                             callers changed.
  (IPv6_TCPServer.server_bind): Create IPv4 socket if not using IPv6.
  (main): New "--no-ipv6" command line option.  New "use_ipv6" config
          option.
* mandos-options.xml ([@id="address"]): Document conditional IPv4
                                        address support.
  ([@id="ipv6"]): New paragraph.
* mandos.conf (use_ipv6): New config option.
* mandos.conf.xml (OPTIONS): Document new "use_dbus" option.
  (EXAMPLE): Changed to use IPv6 link-local address.  Added "use_ipv6"
             option.
* mandos.xml (SYNOPSIS): New "--no-ipv6" option.
  (OPTIONS): Document new "--no-ipv6" option.

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.14"
 
24
VERSION="1.0.5"
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
 
    
230
220
    # Generate a new key in the key rings
231
221
    gpg --quiet --batch --no-tty --no-options --enable-dsa2 \
232
222
        --homedir "$RINGDIR" --trust-model always \
233
223
        --gen-key "$BATCHFILE"
234
224
    rm --force "$BATCHFILE"
235
225
    
236
 
    if tty --quiet; then
237
 
        echo -n "Finished: "
238
 
        date
239
 
    fi
240
 
    
241
226
    # Backup any old key files
242
227
    if cp --backup=numbered --force "$SECKEYFILE" "$SECKEYFILE" \
243
228
        2>/dev/null; then
293
278
        stty -echo
294
279
        echo -n "Enter passphrase: " >&2
295
280
        first="$(head --lines=1 | tr --delete '\n')"
296
 
        echo >&2
297
 
        echo -n "Repeat passphrase: " >&2
 
281
        echo -n -e "\nRepeat passphrase: " >&2
298
282
        second="$(head --lines=1 | tr --delete '\n')"
299
283
        echo >&2
300
284
        stty echo
301
285
        if [ "$first" != "$second" ]; then
302
 
            echo "Passphrase mismatch" >&2
 
286
            echo -e "Passphrase mismatch" >&2
303
287
            touch "$RINGDIR"/mismatch
304
288
        else
305
289
            echo -n "$first"