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

Commit eaca45fc 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 am: 3310a9a8

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

Change-Id: I7a5f847e02b9a02d6b6a03ee247aa135fc3fd1c5
parents 4c41fca7 3310a9a8
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)