/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: 2013-10-20 19:13:09 UTC
  • Revision ID: teddy@recompile.se-20131020191309-7tyca3oo0zqxn45s
* mandos-keygen: Bug fix: Specify key usage to avoid creating keys
                 with key usage flags which GnuTLS does not like.
                 Also fix --help output documentation about default
                 subkey type.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# Contact the authors at <mandos@recompile.se>.
22
22
23
23
 
24
 
VERSION="1.6.4"
 
24
VERSION="1.6.1"
25
25
 
26
26
KEYDIR="/etc/keys/mandos"
27
27
KEYTYPE=RSA
30
30
SUBKEYLENGTH=4096
31
31
KEYNAME="`hostname --fqdn 2>/dev/null || hostname`"
32
32
KEYEMAIL=""
33
 
KEYCOMMENT=""
 
33
KEYCOMMENT="Mandos client key"
34
34
KEYEXPIRE=0
35
35
FORCE=no
36
36
KEYCOMMENT_ORIG="$KEYCOMMENT"
71
71
  -e ADDRESS, --email ADDRESS
72
72
                        Email address of key.  Default is empty.
73
73
  -c TEXT, --comment TEXT
74
 
                        Comment field for key.  The default is empty.
 
74
                        Comment field for key.  The default value is
 
75
                        "Mandos client key".
75
76
  -x TIME, --expire TIME
76
77
                        Key expire time.  Default is no expiration.
77
78
                        See gpg(1) for syntax.
228
229
        date
229
230
    fi
230
231
    
231
 
    # Make sure trustdb.gpg exists;
232
 
    # this is a workaround for Debian bug #737128
233
 
    gpg --quiet --batch --no-tty --no-options --enable-dsa2 \
234
 
        --homedir "$RINGDIR" \
235
 
        --import-ownertrust < /dev/null
236
232
    # Generate a new key in the key rings
237
233
    gpg --quiet --batch --no-tty --no-options --enable-dsa2 \
238
234
        --homedir "$RINGDIR" --trust-model always \
298
294
            cat "$PASSFILE"
299
295
        else
300
296
            tty --quiet && stty -echo
301
 
            echo -n "Enter passphrase: " >&2
 
297
            echo -n "Enter passphrase: "
302
298
            read first
303
299
            tty --quiet && echo >&2
304
 
            echo -n "Repeat passphrase: " >&2
 
300
            echo -n "Repeat passphrase: "
305
301
            read second
306
302
            if tty --quiet; then
307
303
                echo >&2