Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28fd11c6 authored by Alex Klyubin's avatar Alex Klyubin Committed by Android Git Automerger
Browse files

am ab910eb9: am f2d70428: am b5501efc: am d25093d2: Merge "Reject...

am ab910eb9: am f2d70428: am b5501efc: am d25093d2: Merge "Reject AlgorithmParameters of wrong type." into mnc-dev

* commit 'ab910eb9':
  Reject AlgorithmParameters of wrong type.
parents acf7afcd ab910eb9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -129,6 +129,12 @@ abstract class AndroidKeyStoreAuthenticatedAESCipherSpi extends AndroidKeyStoreC
                return;
            }

            if (!"GCM".equalsIgnoreCase(params.getAlgorithm())) {
                throw new InvalidAlgorithmParameterException(
                        "Unsupported AlgorithmParameters algorithm: " + params.getAlgorithm()
                        + ". Supported: GCM");
            }

            GCMParameterSpec spec;
            try {
                spec = params.getParameterSpec(GCMParameterSpec.class);
+6 −0
Original line number Diff line number Diff line
@@ -197,6 +197,12 @@ class AndroidKeyStoreUnauthenticatedAESCipherSpi extends AndroidKeyStoreCipherSp
            return;
        }

        if (!"AES".equalsIgnoreCase(params.getAlgorithm())) {
            throw new InvalidAlgorithmParameterException(
                    "Unsupported AlgorithmParameters algorithm: " + params.getAlgorithm()
                    + ". Supported: AES");
        }

        IvParameterSpec ivSpec;
        try {
            ivSpec = params.getParameterSpec(IvParameterSpec.class);