JDK-8228668 : compiler/codegen/aes/TestAESMain.java failed with GCM mode must be used with NoPadding
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-26
  • Updated: 2021-07-14
  • Resolved: 2019-07-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b08Fixed
Related Reports
Relates :  
Description
For random generator using seed: -8985920662877597219
To re-run test with same seed value please add "-Djdk.test.lib.random.seed=-8985920662877597219" to command line.

algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=646, keySize=128, noReinit=false, checkOutput=true, encInputOffset=0, encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
Algorithm: AES(128bit)
----------System.err:(14/1065)----------
javax.crypto.NoSuchPaddingException: GCM mode must be used with NoPadding
	at java.base/com.sun.crypto.provider.CipherCore.setPadding(CipherCore.java:299)
	at java.base/com.sun.crypto.provider.AESCipher.engineSetPadding(AESCipher.java:212)
	at java.base/javax.crypto.Cipher$Transform.setModePadding(Cipher.java:391)
	at java.base/javax.crypto.Cipher.getInstance(Cipher.java:738)
	at java.base/javax.crypto.Cipher.getInstance(Cipher.java:645)
	at compiler.codegen.aes.TestAESBase.prepare(TestAESBase.java:106)
	at compiler.codegen.aes.TestAESMain.main(TestAESMain.java:151)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:830)
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/f459f98aa30d User: valeriep Date: 2019-07-29 20:19:18 +0000
29-07-2019