Skip to content
Snippets Groups Projects
Commit 0c18512f authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

fix import error

parent 62edcc71
No related branches found
No related tags found
No related merge requests found
......@@ -139,12 +139,13 @@ for status in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible'):
HAVE_PYCRYPTO = True
try:
from Crypto.PublicKey.RSA import generate
import os
except ImportError:
HAVE_PYCRYPTO = False
else:
# public key for XEP-0116
#FIXME os.urandom is not a cryptographic PRNG
pubkey = Crypto.PublicKey.RSA.generate(384, os.urandom)
pubkey = generate(384, os.urandom)
def get_nick_from_jid(jid):
pos = jid.find('@')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment