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

Commit 06df6d84 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 0e41945e 70cf430e
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line 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)
    protected final byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
            throws IllegalBlockSizeException, BadPaddingException {
            throws IllegalBlockSizeException, BadPaddingException {
        if (mCipher != null) {
        if (mCipher != null) {
            if (input == null && inputLen == 0) {
                return mCipher.doFinal();
            } else {
                return mCipher.doFinal(input, inputOffset, inputLen);
                return mCipher.doFinal(input, inputOffset, inputLen);
            }
            }
        }


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