/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: 2017-08-20 13:50:57 UTC
  • Revision ID: teddy@recompile.se-20170820135057-u069yh7hhk2ha1a2
Don't import doctest module in mandos-ctl unless running tests.

* mandos-ctl: Don't import doctest module unless running tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
        [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|*) FORCE=0;;
162
162
    esac
163
163
    
164
 
    if { [ -e "$SECKEYFILE" ] || [ -e "$PUBKEYFILE" ]; } \
165
 
        && [ "$FORCE" -eq 0 ]; then
 
164
    if [ \( -e "$SECKEYFILE" -o -e "$PUBKEYFILE" \) \
 
165
        -a "$FORCE" -eq 0 ]; then
166
166
        echo "Refusing to overwrite old key files; use --force" >&2
167
167
        exit 1
168
168
    fi
289
289
        for ssh_keytype in ecdsa-sha2-nistp256 ed25519 rsa; do
290
290
            set +e
291
291
            ssh_fingerprint="`ssh-keyscan -t $ssh_keytype localhost 2>/dev/null`"
292
 
            err=$?
293
292
            set -e
294
 
            if [ $err -ne 0 ]; then
 
293
            if [ $? -ne 0 ]; then
295
294
                ssh_fingerprint=""
296
295
                continue
297
296
            fi