mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-09 18:29:39 +02:00
Fix IndexOutOfBounds, but keep decryption with only SK working
This commit is contained in:
parent
16a2bf27eb
commit
4f8c52d215
1 changed files with 1 additions and 6 deletions
|
@ -347,12 +347,7 @@ class OpenPgpMessageInputStream(
|
|||
"Symmetrically Encrypted Data Packet at depth ${layerMetadata.depth} encountered.")
|
||||
syntaxVerifier.next(InputSymbol.ENCRYPTED_DATA)
|
||||
val encDataList = packetInputStream!!.readEncryptedDataList()
|
||||
if (encDataList.isEmpty) {
|
||||
LOGGER.debug(
|
||||
"Missing encrypted session key packet.")
|
||||
return false
|
||||
}
|
||||
if (!encDataList.isIntegrityProtected && !encDataList.get(0).isAEAD) {
|
||||
if (!encDataList.isIntegrityProtected && !encDataList.isEmpty && !encDataList.get(0).isAEAD) {
|
||||
LOGGER.warn("Symmetrically Encrypted Data Packet is not integrity-protected.")
|
||||
if (!options.isIgnoreMDCErrors()) {
|
||||
throw MessageNotIntegrityProtectedException()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue