Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0b4b47e

Browse files
committedMay 7, 2025·
Add GetDefaultKeysPath
1 parent 6327a0a commit 0b4b47e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
 

‎TestVectors/dafny/DDBEncryption/src/Index.dfy

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ module WrappedDDBEncryptionMain {
1919
import KeyVectorsTypes = AwsCryptographyMaterialProvidersTestVectorKeysTypes
2020
import WrappedItemEncryptor
2121

22-
// TODO: Add extern for DEFAULT_KEYS
23-
const DEFAULT_KEYS : string := "../../../../submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/test/keys.json"
22+
function method GetDefaultKeysPath(): string
23+
{
24+
var mplKeysPath := "submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/test/keys.json";
25+
if OsLang.GetLanguageShort() == "Go" then
26+
"../../../../" + mplKeysPath
27+
else
28+
"../../../" + mplKeysPath
29+
}
2430

2531
method AddJson(prev : TestVectorConfig, file : string, keyVectors: KeyVectors.KeyVectorsClient)
2632
returns (output : Result<TestVectorConfig, string>)
@@ -52,7 +58,7 @@ module WrappedDDBEncryptionMain {
5258
// Parsing JSON is very slow in Python. Parse JSON as infrequently as possible.
5359
var keyVectors :- expect KeyVectors.KeyVectors(
5460
KeyVectorsTypes.KeyVectorsConfig(
55-
keyManifestPath := DEFAULT_KEYS
61+
keyManifestPath := GetDefaultKeysPath()
5662
)
5763
);
5864

0 commit comments

Comments
 (0)
Please sign in to comment.