Skip to content

Commit

Permalink
Updated package.log, regenerate ncc merged index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
norschel committed Sep 19, 2023
1 parent 46d9212 commit 42a5bf9
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 47 deletions.
73 changes: 54 additions & 19 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ class OidcClient {
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`);
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
Expand Down Expand Up @@ -1538,6 +1538,19 @@ class HttpClientResponse {
}));
});
}
readBodyBuffer() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
const chunks = [];
this.message.on('data', (chunk) => {
chunks.push(chunk);
});
this.message.on('end', () => {
resolve(Buffer.concat(chunks));
});
}));
});
}
}
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
Expand Down Expand Up @@ -2042,7 +2055,13 @@ function getProxyUrl(reqUrl) {
}
})();
if (proxyVar) {
return new URL(proxyVar);
try {
return new URL(proxyVar);
}
catch (_a) {
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
return new URL(`http://${proxyVar}`);

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
}
}
else {
return undefined;
Expand Down Expand Up @@ -17875,7 +17894,7 @@ const createKeyExchange = (() => {
this._dhData = undefined;
this._sig = undefined;
}
finish() {
finish(scOnly) {
if (this._finished)
return false;
this._finished = true;
Expand Down Expand Up @@ -18126,9 +18145,26 @@ const createKeyExchange = (() => {
this._protocol._packetRW.write.finalize(packet, true)
);
}
trySendNEWKEYS(this);

const completeHandshake = () => {
if (isServer || !scOnly)
trySendNEWKEYS(this);

let hsCipherConfig;
let hsWrite;
const completeHandshake = (partial) => {
if (hsCipherConfig) {
trySendNEWKEYS(this);
hsCipherConfig.outbound.seqno = this._protocol._cipher.outSeqno;
this._protocol._cipher.free();
this._protocol._cipher = createCipher(hsCipherConfig);
this._protocol._packetRW.write = hsWrite;
hsCipherConfig = undefined;
hsWrite = undefined;
this._protocol._onHandshakeComplete(negotiated);

return false;
}

if (!this.sessionID)
this.sessionID = exchangeHash;

Expand Down Expand Up @@ -18211,9 +18247,8 @@ const createKeyExchange = (() => {
macKey: (isServer ? scMacKey : csMacKey),
},
};
this._protocol._cipher && this._protocol._cipher.free();
this._protocol._decipher && this._protocol._decipher.free();
this._protocol._cipher = createCipher(config);
this._protocol._decipher.free();
hsCipherConfig = config;
this._protocol._decipher = createDecipher(config);

const rw = {
Expand Down Expand Up @@ -18280,7 +18315,8 @@ const createKeyExchange = (() => {
}
this._protocol._packetRW.read.cleanup();
this._protocol._packetRW.write.cleanup();
this._protocol._packetRW = rw;
this._protocol._packetRW.read = rw.read;
hsWrite = rw.write;

// Cleanup/reset various state
this._public = null;
Expand All @@ -18293,13 +18329,16 @@ const createKeyExchange = (() => {
this._dhData = undefined;
this._sig = undefined;

this._protocol._onHandshakeComplete(negotiated);

if (!partial)
return completeHandshake();
return false;
};

if (isServer || scOnly)
this.finish = completeHandshake;

if (!isServer)
return completeHandshake();
this.finish = completeHandshake;
return completeHandshake(scOnly);
}

start() {
Expand Down Expand Up @@ -18560,12 +18599,8 @@ const createKeyExchange = (() => {
);
this._receivedNEWKEYS = true;
++this._step;
if (this._protocol._server || this._hostVerified)
return this.finish();

// Signal to current decipher that we need to change to a new decipher
// for the next packet
return false;
return this.finish(!this._protocol._server && !this._hostVerified);
default:
return doFatalError(
this._protocol,
Expand Down Expand Up @@ -26621,7 +26656,7 @@ module.exports = require("zlib");
/***/ ((module) => {

"use strict";
module.exports = {"i8":"1.13.0"};
module.exports = {"i8":"1.14.0"};

/***/ })

Expand Down
54 changes: 27 additions & 27 deletions package-lock.json

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

Loading

0 comments on commit 42a5bf9

Please sign in to comment.