TypeError when start conversation with currently connected user on another resource
When I start a conversation with myself on another resource (to copy/paste link for example), when I start typing I got the following traceback:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nbxmpp/dispatcher_nb.py", line 497, in dispatch
handler['func'](session, stanza)
File "/usr/lib/python2.7/site-packages/gajim/common/connection_handlers.py", line 1868, in _messageCB
conn=self, stanza=msg, account=self.name))
File "/usr/lib/python2.7/site-packages/gajim/common/nec.py", line 76, in push_incoming_event
self._generate_events_based_on_incoming_event(event_object)
File "/usr/lib/python2.7/site-packages/gajim/common/nec.py", line 98, in _generate_events_based_on_incoming_event
if new_event_object.generate():
File "/usr/lib/python2.7/site-packages/gajim/common/connection_handlers_events.py", line 1159, in generate
self.session.handle_negotiation(form)
File "/usr/lib/python2.7/site-packages/gajim/session.py", line 482, in handle_negotiation
self.accept_e2e_alice(form, negotiated)
File "/usr/lib/python2.7/site-packages/gajim/common/stanza_session.py", line 956, in accept_e2e_alice
rshashes.append(crypto.random_bytes(rshash_size))
File "/usr/lib/python2.7/site-packages/gajim/common/crypto.py", line 122, in random_bytes
OpenSSL.rand.add(os.urandom(bytes_), bytes_)
File "/usr/lib/python2.7/site-packages/OpenSSL/rand.py", line 64, in add
raise TypeError("entropy must be an integer")
TypeError: entropy must be an integer
This won't prevent discussion, it only crash on newly opened window with yourself when you start writing. I guess it's because of this:
self.hash_alg = sha256
[...]
rshash_size = self.hash_alg().digest_size
Since it return a long instead of an integer.
In [1]: from hashlib import sha256
In [2]: type(sha256().digest_size)
Out[2]: long
In [3]: sys.version
Out[3]: '2.7.8 (default, Sep 24 2014, 18:26:21) \n[GCC 4.9.1 20140903 (prerelease)]'