Skip to content

ValueError: MAC check failed after adding new user #11

@ChristophorusReyhan

Description

@ChristophorusReyhan

Hi,
After I added a user to a service, when I use get_password('service','new_user') I get ValueError: mac check failed.
Here's the log:

Traceback (most recent call last):
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/keyrings/cryptfile/file_base.py", line 116, in get_password
    password = self.decrypt(password_encrypted, assoc).decode('utf-8')
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt
    return cipher.decrypt_and_verify(data['data'], data['mac'])
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify
    self.verify(received_mac_tag)
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify
    raise ValueError("MAC check failed")
ValueError: MAC check failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 18, in <module>
    data["pass"] = file_kr.get_password(crd.getSID(tipe), json_data[tipe]["send"])
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/keyrings/cryptfile/file_base.py", line 119, in get_password
    password = self.decrypt(password_encrypted).decode('utf-8')
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt
    return cipher.decrypt_and_verify(data['data'], data['mac'])
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify
    self.verify(received_mac_tag)
  File "/home/reyhan/project/.virtualenvs/keras_tf/lib/python3.6/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify
    raise ValueError("MAC check failed")
ValueError: MAC check failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions