mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 722434 - check for failure after JSON parsing. r=rnewman
This commit is contained in:
parent
8ea74e7f50
commit
fc3249a330
@ -57,6 +57,7 @@ import org.mozilla.gecko.sync.crypto.CryptoInfo;
|
||||
import org.mozilla.gecko.sync.crypto.Cryptographer;
|
||||
import org.mozilla.gecko.sync.crypto.KeyBundle;
|
||||
import org.mozilla.gecko.sync.cryptographer.CryptoStatusBundle.CryptoStatus;
|
||||
import java.security.GeneralSecurityException;
|
||||
|
||||
/*
|
||||
* This class acts as a wrapper for the Cryptographer class.
|
||||
@ -192,6 +193,10 @@ public class SyncCryptographer {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (json == null) {
|
||||
throw new CryptoException(new GeneralSecurityException("Could not decrypt JSON payload"));
|
||||
}
|
||||
|
||||
// Verify that this is indeed the crypto/keys bundle and that
|
||||
// decryption worked.
|
||||
String id = (String) json.get(KEY_ID);
|
||||
|
Loading…
Reference in New Issue
Block a user