Skip to content

Add WebCrypto detection for crypto components #16

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 2 commits into from
Jun 5, 2017
Merged

Add WebCrypto detection for crypto components #16

merged 2 commits into from
Jun 5, 2017

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented May 30, 2017

Spun off from #1

This PR includes a way to detect if the script is running in an environment whose provided crypto interfaces are compatible with the W3C WebCrypto API.

@jeskew jeskew requested review from awood45 and chrisradek May 30, 2017 21:49
@jeskew jeskew mentioned this pull request May 30, 2017
7 tasks
@jeskew
Copy link
Contributor Author

jeskew commented Jun 1, 2017

@awood45 Per your comments on #1, then isNativeCode check has been removed and replaced with a simple typeof X === 'function' as WebCrypto will not be available outside of secure contexts.

Copy link
Contributor

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

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

Other than a typo, looks good.

},
} as any;

describe('isMsWindow', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo?

Copy link
Contributor

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

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

Ship it!

@jeskew jeskew merged commit 01d5b58 into aws:master Jun 5, 2017
@jeskew jeskew deleted the feature/crypto-webCrypto-detection branch June 5, 2017 17:34
trivikr referenced this pull request in trivikr/aws-sdk-js-v3 Dec 10, 2018
* Add WebCrypto detection for crypto components

* Fix typos in tests
@lock
Copy link

lock bot commented Sep 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants