try to fix OPENSSL_assert(inl > 0)

This commit is contained in:
clowwindy 2013-05-23 12:41:08 +08:00
parent 7e546bdff1
commit b71ef639bf

View file

@ -166,4 +166,6 @@ class Encryptor(object):
decipher_iv = buf[:decipher_iv_len] decipher_iv = buf[:decipher_iv_len]
self.decipher = self.get_cipher(self.key, self.method, 0, iv=decipher_iv) self.decipher = self.get_cipher(self.key, self.method, 0, iv=decipher_iv)
buf = buf[decipher_iv_len:] buf = buf[decipher_iv_len:]
if len(buf) == 0:
return buf
return self.decipher.update(buf) return self.decipher.update(buf)