File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
AwsEncryptionSDK/runtimes/go/examples Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -165,4 +165,7 @@ func main() {
165165 utils .GenerateUUIDTestData (numOfString ),
166166 utils .DefaultKMSKeyId (),
167167 utils .DefaultKmsKeyRegion ())
168+
169+ // cleanup
170+ utils .CleanUpFiles ()
168171}
Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ twIDAQAB
5353 testKmsEcdhKeyIdP256RecipientKeyId = "arn:aws:kms:us-west-2:370957321024:key/0265c8e9-5b6a-4055-8f70-63719e09fda5"
5454)
5555
56+ var filesCreatedByExamples = []string {
57+ eccPrivateKeyFileNameSender ,
58+ eccPrivateKeyFileNameRecipient ,
59+ eccPublicKeyFileNameRecipient ,
60+ kmsEccPublicKeyFileNameRecipient ,
61+ kmsEccPublicKeyFileNameSender ,
62+ }
63+
5664// Getter functions
5765
5866func KmsEcdhKeyIdP256SenderKeyId () string {
@@ -157,6 +165,12 @@ func KeyStoreName() string {
157165
158166// Utility functions
159167
168+ func CleanUpFiles () {
169+ for _ , file := range filesCreatedByExamples {
170+ os .Remove (file )
171+ }
172+ }
173+
160174func WriteRawEcdhEccKeys (ecdhCurveSpec awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec ) error {
161175 // Safety check: Validate neither file is present
162176 if FileExists (eccPrivateKeyFileNameSender ) ||
You can’t perform that action at this time.
0 commit comments