Skip to content

Commit 13a8b80

Browse files
committed
The RSA keyring now puts requirements on the RSA Keyring
1 parent b570d37 commit 13a8b80

File tree

1 file changed

+19
-17
lines changed
  • DynamoDbEncryption/runtimes/java/src/test/java/software/aws/cryptography/dynamoDbEncryption

1 file changed

+19
-17
lines changed

DynamoDbEncryption/runtimes/java/src/test/java/software/aws/cryptography/dynamoDbEncryption/OtherTests.java

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,25 @@ public void TestBuildHierarchyKeyringWithSupplier() {
165165
}
166166
*/
167167

168-
@Test
169-
public void TestBuildEncryptDecryptAwsKmsRsaKeyring() {
170-
MaterialProviders matProv = MaterialProviders.builder()
171-
.MaterialProvidersConfig(MaterialProvidersConfig.builder().build())
172-
.build();
173-
174-
ByteBuffer key = ByteBuffer.wrap(new byte[32]);
175-
176-
CreateAwsKmsRsaKeyringInput input = CreateAwsKmsRsaKeyringInput.builder()
177-
.kmsClient(KmsClient.create())
178-
.kmsKeyId(KMS_TEST_KEY_ID)
179-
.encryptionAlgorithm(RSAES_OAEP_SHA_1)
180-
.publicKey(key)
181-
.build();
182-
IKeyring keyring = matProv.CreateAwsKmsRsaKeyring(input);
183-
assertNotNull(keyring);
184-
}
168+
// This test can no longer pass.
169+
// Because there is now a Modulus length check on the public key.
170+
// @Test
171+
// public void TestBuildEncryptDecryptAwsKmsRsaKeyring() {
172+
// MaterialProviders matProv = MaterialProviders.builder()
173+
// .MaterialProvidersConfig(MaterialProvidersConfig.builder().build())
174+
// .build();
175+
//
176+
// ByteBuffer key = ByteBuffer.wrap(new byte[32]);
177+
//
178+
// CreateAwsKmsRsaKeyringInput input = CreateAwsKmsRsaKeyringInput.builder()
179+
// .kmsClient(KmsClient.create())
180+
// .kmsKeyId(KMS_TEST_KEY_ID)
181+
// .encryptionAlgorithm(RSAES_OAEP_SHA_1)
182+
// .publicKey(key)
183+
// .build();
184+
// IKeyring keyring = matProv.CreateAwsKmsRsaKeyring(input);
185+
// assertNotNull(keyring);
186+
// }
185187

186188
class TestSupplier implements BranchKeyFromItemSupplier {
187189
public String getBranchKeyFromItem(GetBranchKeyFromItemInput input) {

0 commit comments

Comments
 (0)