/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: Björn Påhlsson
  • Date: 2010-09-12 18:23:40 UTC
  • mfrom: (237.2.189 mandos)
  • mto: (237.7.1 mandos)
  • mto: This revision was merged to the branch mainline in revision 270.
  • Revision ID: belorn@fukt.bsnet.se-20100912182340-09gzhdzd2a4zde5y
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
3
3
# Mandos key generator - create a new OpenPGP key for a Mandos client
4
4
5
 
# Copyright © 2008-2010 Teddy Hogeborn
6
 
# Copyright © 2008-2010 Björn Påhlsson
 
5
# Copyright © 2008,2009 Teddy Hogeborn
 
6
# Copyright © 2008,2009 Björn Påhlsson
7
7
8
8
# This program is free software: you can redistribute it and/or modify
9
9
# it under the terms of the GNU General Public License as published by
21
21
# Contact the authors at <mandos@fukt.bsnet.se>.
22
22
23
23
 
24
 
VERSION="1.2.3"
 
24
VERSION="1.0.14"
25
25
 
26
26
KEYDIR="/etc/keys/mandos"
27
27
KEYTYPE=DSA
195
195
stty echo; \
196
196
" EXIT
197
197
 
198
 
set -e
199
 
 
200
198
umask 077
201
199
 
202
200
if [ "$mode" = keygen ]; then
295
293
        stty -echo
296
294
        echo -n "Enter passphrase: " >&2
297
295
        first="$(head --lines=1 | tr --delete '\n')"
298
 
        echo >&2
299
 
        echo -n "Repeat passphrase: " >&2
 
296
        echo -n -e "\nRepeat passphrase: " >&2
300
297
        second="$(head --lines=1 | tr --delete '\n')"
301
298
        echo >&2
302
299
        stty echo
303
300
        if [ "$first" != "$second" ]; then
304
 
            echo "Passphrase mismatch" >&2
 
301
            echo -e "Passphrase mismatch" >&2
305
302
            touch "$RINGDIR"/mismatch
306
303
        else
307
304
            echo -n "$first"