consider Config.REQUIRE_RTP_VERIFICATION on decrypt. fail as future

This commit is contained in:
Daniel Gultsch 2021-05-07 22:55:20 +02:00
parent ddf597e0d3
commit 337aa4a110
1 changed files with 4 additions and 2 deletions

View File

@ -322,8 +322,10 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": received verifiable DTLS fingerprint via " + omemoVerification);
return omemoVerifiedPayload.getPayload();
}, MoreExecutors.directExecutor());
} else if (expectVerification) {
throw new SecurityException("DTLS fingerprint was unexpectedly not verifiable");
} else if (Config.REQUIRE_RTP_VERIFICATION || expectVerification) {
return Futures.immediateFailedFuture(
new SecurityException("DTLS fingerprint was unexpectedly not verifiable")
);
} else {
return Futures.immediateFuture(receivedContentMap);
}