Skip to content

Commit

Permalink
restore: sanity check --keyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lirazsiri committed Oct 23, 2013
1 parent 21738a6 commit 49067c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd_restore.py
Expand Up @@ -312,6 +312,11 @@ def main():
fatal("keyfile %s does not exist or is not a file" % `val`)

opt_key = file(val).read()
try:
keypacket.fingerprint(opt_key)
except keypacket.Error:
fatal("'%s' is not a valid keyfile created with tklbam-escrow" % val)

elif opt == '--address':
opt_address = val
elif opt == '--time':
Expand Down

0 comments on commit 49067c7

Please sign in to comment.