Skip to content

feat: Encryption tests for integration-browser #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 24, 2019

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Jul 23, 2019

https://github.com/awslabs/aws-crypto-tools-test-vector-framework defines an encryption manifest.
This manifest should be used to maintain cross compatibility of language implementations.

Then integrate this into the CI integration tests.
Also update package.json to better organize parameters.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

https://github.com/awslabs/aws-crypto-tools-test-vector-framework defines an encryption manifest.
This manifest should be used to maintain cross compatibility of language implementations.

Then integrate this into the CI integration tests.
Also update package.json to better organize parameters.
@seebees seebees requested a review from a team July 23, 2019 16:04
ragona
ragona previously approved these changes Jul 24, 2019
Copy link
Contributor

@ragona ragona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

needs(response.ok, `Failed to decrypt: ${toUtf8(body)}`)
expect(plainText).toEqual(new Uint8Array(body))
} catch (e) {
if (!notSupportedMessages.includes(e.message)) throw e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't suppose there's a better way to handle specific error types that isn't just string parsing? It looks like if one of those error messages changes the logic here breaks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There maybe. But that would be an extensive change to the ESDK that I may make...

import got from 'got'

export async function buildEncryptFixtures (fixtures: string, manifestFile: string, keyFile: string, testName: string, slice: string) {
const [start = 0, end = 9999] = (slice || '').split(':').map(n => parseInt(n, 10))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: This smells funny.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very funny. Just me working around some cmd line parsing :(
Humans are difficult interfaces...

johnwalker
johnwalker previously approved these changes Jul 24, 2019
@seebees seebees merged commit 043506d into aws:master Jul 24, 2019
@seebees seebees deleted the decrypt-oracle-browser branch July 24, 2019 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants