Skip to content

Commit

Permalink
Revert PR 302 (#308)
Browse files Browse the repository at this point in the history
+ A randomized test failes with this PR. We'll revert till the root
  cause is found and the gap in testing is added to CI.
  • Loading branch information
amirhosv authored Jun 30, 2023
1 parent 852f0ef commit 9f8d8b9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/com/amazon/corretto/crypto/provider/AesGcmSpi.java
Original file line number Diff line number Diff line change
Expand Up @@ -993,4 +993,20 @@ private void stateReset() {
hasConsumedData = false;
contextInitialized = false;
}

@Override
protected int engineDoFinal(final ByteBuffer input, final ByteBuffer output)
throws ShortBufferException, IllegalBlockSizeException, BadPaddingException {
int initialPosition = output.position();

engineUpdate(input, output);

ShimArray shim = new ShimArray(output, engineGetOutputSize(0));
int finalBytes = engineDoFinal(EMPTY_ARRAY, 0, 0, shim.array, shim.offset);

shim.writeback();
output.position(output.position() + finalBytes);

return output.position() - initialPosition;
}
}

0 comments on commit 9f8d8b9

Please sign in to comment.