8000 Wile may leave nullbyte account key file and crashes when run after · Issue #15 · costela/wile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Wile may leave nullbyte account key file and crashes when run after #15
Closed
@hartwork

Description

@hartwork
# rm ~/.wile/account.key

# ./wile.py cert
WARNING:wile:no account key found; creating a new 2048 bit key in [..]/.wile/account.key
(optional) Password for [..]/.wile/account.key: ^C
Aborted!

# ls -l ~/.wile/account.key
-rw-r--r-- 1 user user 0 Feb 27 22:04 /home/user/.wile/account.key
                      ^^^
# ./wile.py cert
Traceback (most recent call last):
  File "./wile.py", line 95, in <module>
    main()
  File "./wile.py", line 91, in main
    return wile(obj={})
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "./wile.py", line 44, in wile
    account_key = get_or_gen_key(account_key_path, new_account_key_size)
  File "./wile.py", line 61, in get_or_gen_key
    account_key = jose.JWKRSA(key=serialization.load_pem_private_key(key_contents, None, default_backend()))
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization.py", line 20, in load_pem_private_key
    return backend.load_pem_private_key(data, password)
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/multibackend.py", line 305, in load_pem_private_key
    return b.load_pem_private_key(data, password)
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1084, in load_pem_private_key
    password,
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1253, in _load_key
    self._handle_key_loading_error()
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1325, in _handle_key_loading_error
    raise ValueError("Could not unserialize key data.")
ValueError: Could not unserialize key data.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0