Skip to content

Commit 11ccd49

Browse files
committed
chore(signature-v4a): deps updates and lockfile
1 parent e40b2c0 commit 11ccd49

File tree

6 files changed

+26
-629
lines changed

6 files changed

+26
-629
lines changed

packages/signature-v4/src/SignatureV4.ts

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ import { moveHeadersToQuery } from "./moveHeadersToQuery";
4242
import { prepareRequest } from "./prepareRequest";
4343
import { SignatureV4Base, SignatureV4CryptoInit, SignatureV4Init } from "./SignatureV4Base";
4444

45+
/**
46+
* @public
47+
*/
4548
export class SignatureV4
4649
extends SignatureV4Base
4750
implements RequestPresigner, RequestSigner, StringSigner, EventSigner, MessageSigner

packages/signature-v4a/package.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
1818
"format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"",
1919
"extract:docs": "api-extractor run --local",
20-
"test": "vitest run --coverage"
20+
"test": "yarn g:vitest run"
2121
},
2222
"author": {
2323
"name": "AWS SDK for JavaScript Team",
@@ -34,17 +34,12 @@
3434
"devDependencies": {
3535
"@aws-crypto/sha256-js": "5.2.0",
3636
"@smithy/protocol-http": "workspace:^",
37-
"@types/elliptic": "6.4.18",
38-
"@vitest/coverage-v8": "^1.2.0",
3937
"concurrently": "7.0.0",
4038
"downlevel-dts": "0.10.1",
41-
"elliptic": "6.5.5",
42-
"rimraf": "3.0.2",
43-
"typedoc": "0.23.23",
44-
"vitest": "^1.2.0"
39+
"rimraf": "3.0.2"
4540
},
4641
"engines": {
47-
"node": ">=16.0.0"
42+
"node": ">=18.0.0"
4843
},
4944
"typesVersions": {
5045
"<4.0": {

packages/signature-v4a/src/SignatureV4a.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class SignatureV4a extends SignatureV4Base implements RequestSigner {
103103
const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash);
104104
const stringToSign = await this.createStringToSign(longDate, scope, canonicalRequest, ALGORITHM_IDENTIFIER_V4A);
105105

106-
const signature = await this.GetSignature(pKey, stringToSign);
106+
const signature = await this.getSignature(pKey, stringToSign);
107107

108108
request.headers[AUTH_HEADER] =
109109
`${ALGORITHM_IDENTIFIER_V4A} ` +
@@ -120,7 +120,7 @@ export class SignatureV4a extends SignatureV4Base implements RequestSigner {
120120
* @param stringToSign String to sign using private key
121121
* @private
122122
*/
123-
private async GetSignature(privateKey: Uint8Array, stringToSign: string): Promise<string> {
123+
private async getSignature(privateKey: Uint8Array, stringToSign: string): Promise<string> {
124124
// Create ECDSA and get key pair
125125
const ecdsa = new Ec("p256");
126126
const key = ecdsa.keyFromPrivate(privateKey);

packages/signature-v4a/src/constants.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import { REGION_SET_PARAM } from "@smithy/signature-v4";
22

3+
/**
4+
* @internal
5+
*/
36
export const REGION_HEADER = REGION_SET_PARAM.toLowerCase();
47

5-
// AWS SigV4a private signing key constants
8+
/**
9+
* @internal
10+
*
11+
* AWS SigV4a private signing key constants
12+
*
13+
*/
614
export const ONE_AS_4_BYTES = [0x00, 0x00, 0x00, 0x01];
715
export const TWOFIFTYSIX_AS_4_BYTES = [0x00, 0x00, 0x01, 0x00];
816
export const N_MINUS_TWO = [

packages/signature-v4a/src/credentialDerivation.ts

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export const clearCredentialCache = (): void => {
2525
});
2626
};
2727

28+
/**
29+
* @internal
30+
*/
2831
export const getSigV4aSigningKey = async (
2932
sha256: ChecksumConstructor | HashConstructor,
3033
accessKey: string,

0 commit comments

Comments
 (0)