mirror of https://github.com/borgbackup/borg.git
EVP_DecryptFinal_ex: fix check for return value
seems like the current docs were updated. was "positive return code". now specifically mentions 0 and 1.
This commit is contained in:
parent
c010800f55
commit
bb949b25ea
|
@ -568,7 +568,7 @@ cdef class _AEAD_BASE:
|
||||||
raise CryptoError('EVP_DecryptUpdate failed')
|
raise CryptoError('EVP_DecryptUpdate failed')
|
||||||
offset += olen
|
offset += olen
|
||||||
rc = EVP_DecryptFinal_ex(self.ctx, odata+offset, &olen)
|
rc = EVP_DecryptFinal_ex(self.ctx, odata+offset, &olen)
|
||||||
if rc <= 0:
|
if not rc:
|
||||||
# a failure here means corrupted or tampered tag (mac) or data.
|
# a failure here means corrupted or tampered tag (mac) or data.
|
||||||
raise IntegrityError('Authentication / EVP_DecryptFinal_ex failed')
|
raise IntegrityError('Authentication / EVP_DecryptFinal_ex failed')
|
||||||
offset += olen
|
offset += olen
|
||||||
|
|
Loading…
Reference in New Issue