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

Commit 3310a9a8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Keystore 2.0 SPI: Fix engineDoFinal with null input." am: 06df6d84

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680128

Change-Id: Ia75168fc7489fe24178b7b81db643bc43823d7de
parents ee7d15d5 06df6d84
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -579,8 +579,12 @@ abstract class AndroidKeyStoreCipherSpiBase extends CipherSpi implements KeyStor
    protected final byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
            throws IllegalBlockSizeException, BadPaddingException {
        if (mCipher != null) {
            if (input == null && inputLen == 0) {
                return mCipher.doFinal();
            } else {
                return mCipher.doFinal(input, inputOffset, inputLen);
            }
        }

        if (mCachedException != null) {
            throw (IllegalBlockSizeException)