Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion modules/web-crypto-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/ie11-detection": "4.0.0",
"@aws-crypto/supports-web-crypto": "5.2.0",
"@aws-sdk/util-locate-window": "3.310.0",
"tslib": "^2.2.0"
Expand Down
2 changes: 0 additions & 2 deletions modules/web-crypto-backend/src/backend-factory.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { isMsWindow } from '@aws-crypto/ie11-detection'
import {
supportsWebCrypto,
supportsSubtleCrypto,
supportsZeroByteGCM,
} from '@aws-crypto/supports-web-crypto'
import { generateSynchronousRandomValues } from './synchronous_random_values'
import promisifyMsSubtleCrypto from './promisify-ms-crypto'

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-latest

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-latest

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-latest

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-latest

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-latest

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-latest

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-latest

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-latest

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-latest

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-latest

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-22.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-22.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-22.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-22.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-22.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-22.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-22.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-22.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-22.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-22.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-latest

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-latest

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-20.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-20.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-20.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-20.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-22.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-22.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-20.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-20.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-20.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-20.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-20.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-20.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-20.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-20.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-18.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-browser-18.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-18.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-browser-18.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-18.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-browser-18.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-18.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-coverage-node-18.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-18.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-vectors-node-18.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-18.x

Cannot find module './promisify-ms-crypto' or its corresponding type declarations.

Check failure on line 10 in modules/web-crypto-backend/src/backend-factory.ts

View workflow job for this annotation

GitHub Actions / shared-ci / test-compliance-node-18.x

'promisifyMsSubtleCrypto' is declared but its value is never read.

type MaybeSubtleCrypto = SubtleCrypto | false
export type WebCryptoBackend =
Expand Down Expand Up @@ -140,7 +139,6 @@
// if needed webkitSubtle check should be added here
// see: https://webkit.org/blog/7790/update-on-web-cryptography/
if (supportsWebCrypto(window)) return window.crypto.subtle
if (isMsWindow(window)) return promisifyMsSubtleCrypto(window.msCrypto.subtle)
return false
}

Expand Down
38 changes: 0 additions & 38 deletions modules/web-crypto-backend/src/promisify-ms-crypto.ts

This file was deleted.

5 changes: 0 additions & 5 deletions modules/web-crypto-backend/src/synchronous_random_values.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { isMsWindow } from '@aws-crypto/ie11-detection'
import { supportsSecureRandom } from '@aws-crypto/supports-web-crypto'
import { locateWindow } from '@aws-sdk/util-locate-window'

Expand All @@ -19,10 +18,6 @@ export function generateSynchronousRandomValues(
return function synchronousRandomValues(byteLength: number): Uint8Array {
if (supportsSecureRandom(globalScope)) {
return globalScope.crypto.getRandomValues(new Uint8Array(byteLength))
} else if (isMsWindow(globalScope)) {
const values = new Uint8Array(byteLength)
globalScope.msCrypto.getRandomValues(values)
return values
}

throw new Error(`Unable to locate a secure random source.`)
Expand Down
12 changes: 0 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading