/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: 2008-08-22 00:16:20 UTC
  • mfrom: (24.1.57 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20080822001620-vxpn1evy0t0kyvj0
* clients.conf ([DEFAULT]/checker): Update to new default value.

* mandos (Client.start_checker): Bug fix: OSError, not
                                 subprocess.OSError.
  (main): Use "fping -q -- %(host)s" instead of "fping -q --
          %%(host)s" as default value for "checker".  Always redirect
          stdin to be from /dev/null, even if in debug mode.

* mandos-clients.conf.xml (DESCRIPTION): Improved wording and refer to
                                         the EXPANSION section.
  (OPTIONS): Added synopsis and improved wording for "checker",
             "fingerprint", and "secret".  Refer to the RUNTIME
             EXPANSION section for the "checker" option.
  (EXAMPLE): Update to new default value for "checker".

* mandos-keygen (trap): Split lines and add "set +e".

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        -n|--name) KEYNAME="$2"; shift 2;;
71
71
        -e|--email) KEYEMAIL="$2"; shift 2;;
72
72
        -c|--comment) KEYCOMMENT="$2"; shift 2;;
73
 
        -x|--expire) KEYCOMMENT="$2"; shift 2;;
 
73
        -x|--expire) KEYEXPIRE="$2"; shift 2;;
74
74
        -f|--force) FORCE=yes; shift;;
75
75
        -v|--version) echo "$0 $VERSION"; exit;;
76
76
        -h|--help) help; exit;;
142
142
PUBRING="`mktemp -t mandos-gpg-pubring.XXXXXXXXXX`"
143
143
 
144
144
# Remove temporary files on exit
145
 
trap "rm --force $PUBRING $BATCHFILE; shred --remove $SECRING" EXIT
 
145
trap "
 
146
set +e
 
147
rm --force $PUBRING $BATCHFILE;
 
148
shred --remove $SECRING;
 
149
stty echo
 
150
" EXIT
146
151
 
147
152
# Create batch file for GnuPG
148
153
cat >"$BATCHFILE" <<EOF
188
193
 
189
194
# Export keys from key rings to key files
190
195
gpg --no-random-seed-file --quiet --batch --no-tty --armor \
191
 
    --no-default-keyring --secret-keyring "$SECRING" \
 
196
    --no-default-keyring --no-options --secret-keyring "$SECRING" \
192
197
    --keyring "$PUBRING" --export-options export-minimal \
193
198
    --comment "$FILECOMMENT" --output "$SECKEYFILE" \
194
199
    --export-secret-keys
195
200
gpg --no-random-seed-file --quiet --batch --no-tty --armor \
196
 
    --no-default-keyring --secret-keyring "$SECRING" \
 
201
    --no-default-keyring --no-options --secret-keyring "$SECRING" \
197
202
    --keyring "$PUBRING" --export-options export-minimal \
198
203
    --comment "$FILECOMMENT" --output "$PUBKEYFILE" \
199
204
    --export