Skip to content

Commit 66429d2

Browse files
debug
1 parent e64683c commit 66429d2

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

buildspec.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -327,19 +327,19 @@ batch:
327327
env:
328328
image: aws/codebuild/standard:7.0
329329
- identifier: py312_generate_hkeyring_decrypt_vectors
330-
buildspec: codebuild/py312/py312_generate_hkeyring_decrypt_vectors.yml
330+
buildspec: codebuild/py312/generate_hkeyring_decrypt_vectors.yml
331331
env:
332332
image: aws/codebuild/standard:7.0
333333
- identifier: py312_decrypt_hkeyring_with_masterkey
334334
depend-on:
335335
- py312_generate_hkeyring_decrypt_vectors
336-
buildspec: codebuild/py312/py312_decrypt_hkeyring_with_masterkey.yml
336+
buildspec: codebuild/py312/decrypt_hkeyring_with_masterkey.yml
337337
env:
338338
image: aws/codebuild/standard:7.0
339339
- identifier: py312_decrypt_hkeyring_with_keyrings
340340
depend-on:
341341
- py312_generate_hkeyring_decrypt_vectors
342-
buildspec: codebuild/py312/decrypt_keyrings_with_keyrings.yml
342+
buildspec: codebuild/py312/decrypt_hkeyring_with_keyrings.yml
343343
env:
344344
image: aws/codebuild/standard:7.0
345345
# TODO: turn this into the .NET runner

test_vector_handlers/src/awses_test_vectors/manifests/full_message/encrypt.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,25 @@ def master_key_provider_fn():
126126
return keyring_from_master_key_specs(keys_uri, master_key_specs, "encrypt")
127127
return master_key_provider_from_master_key_specs(keys, master_key_specs)
128128

129+
# MPL test vectors add CMM types to the test vectors manifests
130+
if "cmm" in scenario:
131+
if scenario["cmm"] == "Default":
132+
# Master keys and keyrings can handle default CMM
133+
cmm_type = scenario["cmm"]
134+
elif scenario["cmm"] == "RequiredEncryptionContext":
135+
# Skip RequiredEncryptionContext CMM for master keys;
136+
# RequiredEncryptionContext is unsupported for master keys.
137+
# Caller logic should expect `None` to mean "no scenario".
138+
if keyrings:
139+
cmm_type = scenario["cmm"]
140+
else:
141+
return None
142+
else:
143+
raise ValueError("Unrecognized cmm_type: " + cmm_type)
144+
else:
145+
# If unspecified, set "Default" as the default
146+
cmm_type = "Default"
147+
129148
return cls(
130149
plaintext_name=scenario["plaintext"],
131150
plaintext=plaintexts[scenario["plaintext"]],
@@ -135,7 +154,7 @@ def master_key_provider_fn():
135154
master_key_specs=master_key_specs,
136155
master_key_provider_fn=master_key_provider_fn,
137156
keyrings=keyrings,
138-
cmm=scenario["cmm"],
157+
cmm=cmm_type,
139158
)
140159

141160
def run(self, materials_manager=None):

0 commit comments

Comments
 (0)