@aws-sdk/cloudfront-signer 3.998.0 → 3.999.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +2 -2
- package/dist-es/sign.js +1 -1
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var protocols = require('@smithy/core/protocols');
|
|
4
|
-
var
|
|
4
|
+
var node_crypto = require('node:crypto');
|
|
5
5
|
|
|
6
6
|
function getSignedUrl({ dateLessThan, dateGreaterThan, url, keyPairId, privateKey, ipAddress, policy, passphrase, }) {
|
|
7
7
|
const cloudfrontSignBuilder = new CloudfrontSignBuilder({
|
|
@@ -219,7 +219,7 @@ class CloudfrontSignBuilder {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
signData(data, privateKey, passphrase) {
|
|
222
|
-
const sign =
|
|
222
|
+
const sign = node_crypto.createSign("RSA-SHA1");
|
|
223
223
|
sign.update(data);
|
|
224
224
|
return sign.sign({ key: privateKey, passphrase }, "base64");
|
|
225
225
|
}
|
package/dist-es/sign.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extendedEncodeURIComponent } from "@smithy/core/protocols";
|
|
2
|
-
import { createSign } from "crypto";
|
|
2
|
+
import { createSign } from "node:crypto";
|
|
3
3
|
export function getSignedUrl({ dateLessThan, dateGreaterThan, url, keyPairId, privateKey, ipAddress, policy, passphrase, }) {
|
|
4
4
|
const cloudfrontSignBuilder = new CloudfrontSignBuilder({
|
|
5
5
|
keyPairId,
|
package/package.json
CHANGED