correct more python3 problems
This commit is contained in:
parent
bb9f6c3a8b
commit
d3de84f45d
@ -12,6 +12,7 @@ import config
|
|||||||
import log
|
import log
|
||||||
import crypto
|
import crypto
|
||||||
import M2Crypto
|
import M2Crypto
|
||||||
|
import binascii
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import util
|
import util
|
||||||
@ -89,8 +90,9 @@ class Command:
|
|||||||
|
|
||||||
SignEVP = M2Crypto.EVP.load_key(c.privkey)
|
SignEVP = M2Crypto.EVP.load_key(c.privkey)
|
||||||
SignEVP.sign_init()
|
SignEVP.sign_init()
|
||||||
SignEVP.sign_update(text)
|
encoded_text = text.encode('utf-8')
|
||||||
StringSignature = SignEVP.sign_final().encode('hex')
|
SignEVP.sign_update(encoded_text)
|
||||||
|
StringSignature = binascii.hexlify(SignEVP.sign_final()).decode('utf-8')
|
||||||
logger.debug("Our signature for this message is: " + StringSignature)
|
logger.debug("Our signature for this message is: " + StringSignature)
|
||||||
self.signature = StringSignature
|
self.signature = StringSignature
|
||||||
return StringSignature
|
return StringSignature
|
||||||
|
Loading…
Reference in New Issue
Block a user