mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 22:22:27 +00:00
fix traceback when trying to do unsupported passphrase change, fixes #189
This commit is contained in:
parent
4ab4ecc7af
commit
be29e5f6f4
1 changed files with 6 additions and 0 deletions
|
@ -190,6 +190,12 @@ def detect(cls, repository, manifest_data):
|
|||
except IntegrityError:
|
||||
passphrase = getpass(prompt)
|
||||
|
||||
def change_passphrase(self):
|
||||
class ImmutablePassphraseError(Error):
|
||||
"""The passphrase for this encryption key type can't be changed."""
|
||||
|
||||
raise ImmutablePassphraseError
|
||||
|
||||
def init(self, repository, passphrase):
|
||||
self.init_from_random_data(pbkdf2_sha256(passphrase.encode('utf-8'), repository.id, self.iterations, 100))
|
||||
self.init_ciphers()
|
||||
|
|
Loading…
Reference in a new issue