twisted / twisted/twisted

conch.ssh.keys.fromString raises BadKeyError instead of EncryptedKeyError

Open
#6,804 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug conch new priority-normal
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

lvh's avatar @lvh reported
Trac ID trac#6804
Type defect
Created 2013-10-31 10:03:07Z

When a key is encrypted but no passphrase is provided, fromString raises BadKeyError. According to the docstring for EncryptedKeyError, it should raise EncryptedKeyError.

EncryptedKeyError does not inherit from BadKeyError. The obvious fix to me seems to make EncryptedKeyError inherit from BadKeyError :)

I'm fixing the docstrings (and cleaning up this module extensively) in #6803. I recommend waiting for that be closed before touching it.

Searchable metadata
trac-id__6804 6804
type__defect defect
reporter__lvh lvh
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__conch conch
keywords__ 
time__1383213787000000 1383213787000000
changetime__1383213791000000 1383213791000000
version__None None
owner__ 
cc__z3p

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with conch.ssh.keys.fromString and the EncryptedKeyError and BadKeyError definitions, then review the cleanup described in issue #6803 before making changes. Done means an encrypted key without a passphrase raises EncryptedKeyError rather than BadKeyError, with the documented exception relationship preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.