mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: cyrptoconditions dependency updated because of vulnerability (#2494)
* Problem: cyrptoconditions dependency updated because of vulnerability CVE-2018-10903 * update cc to ~=0.7.2 * Fix test using b58encode * Fixing some more tests failing because of base58 update
This commit is contained in:
parent
80b6881797
commit
8e55b11da2
@ -94,7 +94,7 @@ class Input(object):
|
||||
"""
|
||||
try:
|
||||
fulfillment = self.fulfillment.serialize_uri()
|
||||
except (TypeError, AttributeError, ASN1EncodeError):
|
||||
except (TypeError, AttributeError, ASN1EncodeError, ASN1DecodeError):
|
||||
fulfillment = _fulfillment_to_details(self.fulfillment)
|
||||
|
||||
try:
|
||||
@ -161,7 +161,7 @@ def _fulfillment_to_details(fulfillment):
|
||||
if fulfillment.type_name == 'ed25519-sha-256':
|
||||
return {
|
||||
'type': 'ed25519-sha-256',
|
||||
'public_key': base58.b58encode(fulfillment.public_key),
|
||||
'public_key': base58.b58encode(fulfillment.public_key).decode(),
|
||||
}
|
||||
|
||||
if fulfillment.type_name == 'threshold-sha-256':
|
||||
|
@ -172,7 +172,7 @@ class ValidatorElection(Transaction):
|
||||
|
||||
@classmethod
|
||||
def to_public_key(cls, election_id):
|
||||
return base58.b58encode(bytes.fromhex(election_id))
|
||||
return base58.b58encode(bytes.fromhex(election_id)).decode()
|
||||
|
||||
@classmethod
|
||||
def count_votes(cls, election_pk, transactions, getter=getattr):
|
||||
|
2
setup.py
2
setup.py
@ -79,7 +79,7 @@ install_requires = [
|
||||
# TODO Consider not installing the db drivers, or putting them in extras.
|
||||
'pymongo~=3.6',
|
||||
'pysha3~=1.0.2',
|
||||
'cryptoconditions~=0.6.0.dev',
|
||||
'cryptoconditions~=0.7.2',
|
||||
'python-rapidjson~=0.6.0',
|
||||
'logstats~=0.2.1',
|
||||
'flask>=0.10.1',
|
||||
|
@ -93,7 +93,7 @@ def test_output_serialization(user_Ed25519, user_pub):
|
||||
'uri': user_Ed25519.condition_uri,
|
||||
'details': {
|
||||
'type': 'ed25519-sha-256',
|
||||
'public_key': b58encode(user_Ed25519.public_key),
|
||||
'public_key': b58encode(user_Ed25519.public_key).decode(),
|
||||
},
|
||||
},
|
||||
'public_keys': [user_pub],
|
||||
@ -114,7 +114,7 @@ def test_output_deserialization(user_Ed25519, user_pub):
|
||||
'uri': user_Ed25519.condition_uri,
|
||||
'details': {
|
||||
'type': 'ed25519-sha-256',
|
||||
'public_key': b58encode(user_Ed25519.public_key),
|
||||
'public_key': b58encode(user_Ed25519.public_key).decode(),
|
||||
},
|
||||
},
|
||||
'public_keys': [user_pub],
|
||||
|
Loading…
x
Reference in New Issue
Block a user