diff --git a/fail2ban-p2p-client.py b/fail2ban-p2p-client.py index 1ab2ef8..ac717e2 100755 --- a/fail2ban-p2p-client.py +++ b/fail2ban-p2p-client.py @@ -98,8 +98,9 @@ if args.b or dump: SignEVP = M2Crypto.EVP.load_key(c.privkey) SignEVP.sign_init() - SignEVP.sign_update(signed_message) - StringSignature = SignEVP.sign_final().encode('hex') + encoded_signed_message = signed_message.encode('utf-8') + SignEVP.sign_update(encoded_signed_message) + StringSignature = binascii.hexlify(SignEVP.sign_final()).decode('utf-8') signed_dict = { #"protocolVersion": version.protocol,