Skip to content

Commit

Permalink
fix npe validating pub key
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Aug 18, 2022
1 parent f869aec commit 857a1d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ private boolean isPubKeyValid(DecryptedMessageWithPubKey message, NodeAddress se
if (trade.getArbitratorPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getArbitratorPubKeyRing().getSignaturePubKey())) return true;

// not invalid if pub key rings are unknown
if (trade.getTradingPeer().getPubKeyRing() == null && trade.getArbitratorPubKeyRing() == null) return true;
if ((trade.getTradingPeer() == null || trade.getTradingPeer().getPubKeyRing() == null) && trade.getArbitratorPubKeyRing() == null) return true;

// valid if peer's pub key ring
if (trade.getTradingPeer() != null && trade.getTradingPeer().getPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getTradingPeer().getPubKeyRing().getSignaturePubKey())) return true;
Expand Down

0 comments on commit 857a1d0

Please sign in to comment.