Skip to content

Commit 07f60a6

Browse files
committed
Set incomplete single byte ciphertext to a valid version
1 parent 3dd630c commit 07f60a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/com/amazonaws/encryptionsdk/ParsedCiphertextTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package com.amazonaws.encryptionsdk;
1515

1616
import com.amazonaws.encryptionsdk.internal.StaticMasterKey;
17+
import com.amazonaws.encryptionsdk.internal.VersionInfo;
1718
import com.amazonaws.encryptionsdk.model.CiphertextHeaders;
1819
import org.junit.Before;
1920
import org.junit.Test;
@@ -68,7 +69,7 @@ public void incompleteZeroByteCiphertext() {
6869

6970
@Test(expected = BadCiphertextException.class)
7071
public void incompleteSingleByteCiphertext() {
71-
final byte[] cipherText = {0};
72+
final byte[] cipherText = {VersionInfo.CURRENT_CIPHERTEXT_VERSION};
7273
ParsedCiphertext pCt = new ParsedCiphertext(cipherText);
7374
}
7475

0 commit comments

Comments
 (0)