[Bug 1618765] Re: TypeError: cannot instantiate ctype 'EVP_MD_CTX' of unknown size
James Page
james.page at ubuntu.com
Wed Aug 31 08:42:13 UTC 2016
Unit test in pyopenssl fails as well:
pkey = <OpenSSL.crypto.PKey object at 0x7f572536b940>
data = b'It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his b...s doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him.'
digest = 'sha1'
def sign(pkey, data, digest):
"""
Sign data with a digest
:param pkey: Pkey to sign with
:param data: data to be signed
:param digest: message digest to use
:return: signature
"""
data = _text_to_bytes_and_warn("data", data)
digest_obj = _lib.EVP_get_digestbyname(_byte_string(digest))
if digest_obj == _ffi.NULL:
raise ValueError("No such digest method")
> md_ctx = _ffi.new("EVP_MD_CTX*")
E TypeError: cannot instantiate ctype 'EVP_MD_CTX' of unknown size
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pyopenssl in Ubuntu.
https://bugs.launchpad.net/bugs/1618765
Title:
TypeError: cannot instantiate ctype 'EVP_MD_CTX' of unknown size
Status in pyopenssl package in Ubuntu:
New
Status in python-cryptography package in Ubuntu:
New
Bug description:
The new 1.5 update of python-cryptography in yakkety-proposed is
causing some test failures in various OpenStack packages that use
crypto - example:
==============================
Failed 1 tests - output below:
==============================
glance.tests.unit.common.test_utils.TestUtils.test_validate_key_cert_key
------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "glance/tests/unit/common/test_utils.py", line 276, in test_validate_key_cert_key
utils.validate_key_cert(keyfile, certfile)
File "glance/common/utils.py", line 433, in validate_key_cert
out = crypto.sign(key, data, digest)
File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 2563, in sign
md_ctx = _ffi.new("EVP_MD_CTX*")
TypeError: cannot instantiate ctype 'EVP_MD_CTX' of unknown size
Tests passed fine with 1.4.x.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pyopenssl/+bug/1618765/+subscriptions
More information about the foundations-bugs
mailing list