Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ef0a5b

Browse filesBrowse files
panvaaduh95
authored andcommitted
quic: remove CryptoKey support from session keys option
PR-URL: #62335 Refs: #55293 Refs: #62321 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent bfff8cb commit 3ef0a5b
Copy full SHA for 3ef0a5b

3 files changed

+7-13Lines changed: 7 additions & 13 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/quic.md‎

Copy file name to clipboardExpand all lines: doc/api/quic.md
+5-1Lines changed: 5 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1197,9 +1197,13 @@ True to enable TLS keylogging output.
11971197

11981198
<!-- YAML
11991199
added: v23.8.0
1200+
changes:
1201+
- version: REPLACEME
1202+
pr-url: https://github.com/nodejs/node/pull/62335
1203+
description: CryptoKey is no longer accepted.
12001204
-->
12011205

1202-
* Type: {KeyObject|CryptoKey|KeyObject\[]|CryptoKey\[]}
1206+
* Type: {KeyObject|KeyObject\[]}
12031207

12041208
The TLS crypto keys to use for sessions.
12051209

Collapse file

‎lib/internal/quic/quic.js‎

Copy file name to clipboardExpand all lines: lib/internal/quic/quic.js
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ const {
9898

9999
const {
100100
isKeyObject,
101-
isCryptoKey,
102101
} = require('internal/crypto/keys');
103102

104103
const {
@@ -143,7 +142,6 @@ const {
143142
kVersionNegotiation,
144143
kInspect,
145144
kKeyObjectHandle,
146-
kKeyObjectInner,
147145
kWantsHeaders,
148146
kWantsTrailers,
149147
} = require('internal/quic/symbols');
@@ -187,7 +185,6 @@ const onSessionHandshakeChannel = dc.channel('quic.session.handshake');
187185
/**
188186
* @typedef {import('../socketaddress.js').SocketAddress} SocketAddress
189187
* @typedef {import('../crypto/keys.js').KeyObject} KeyObject
190-
* @typedef {import('../crypto/keys.js').CryptoKey} CryptoKey
191188
*/
192189

193190
/**
@@ -260,7 +257,7 @@ const onSessionHandshakeChannel = dc.channel('quic.session.handshake');
260257
* @property {boolean} [verifyClient] Verify the client
261258
* @property {boolean} [tlsTrace] Enable TLS tracing
262259
* @property {boolean} [verifyPrivateKey] Verify the private key
263-
* @property {KeyObject|CryptoKey|Array<KeyObject|CryptoKey>} [keys] The keys
260+
* @property {KeyObject|KeyObject[]} [keys] The keys
264261
* @property {ArrayBuffer|ArrayBufferView|Array<ArrayBuffer|ArrayBufferView>} [certs] The certificates
265262
* @property {ArrayBuffer|ArrayBufferView|Array<ArrayBuffer|ArrayBufferView>} [ca] The certificate authority
266263
* @property {ArrayBuffer|ArrayBufferView|Array<ArrayBuffer|ArrayBufferView>} [crl] The certificate revocation list
@@ -2171,13 +2168,8 @@ function processTlsOptions(tls, forServer) {
21712168
throw new ERR_INVALID_ARG_VALUE('options.keys', key, 'must be a private key');
21722169
}
21732170
ArrayPrototypePush(keyHandles, key[kKeyObjectHandle]);
2174-
} else if (isCryptoKey(key)) {
2175-
if (key.type !== 'private') {
2176-
throw new ERR_INVALID_ARG_VALUE('options.keys', key, 'must be a private key');
2177-
}
2178-
ArrayPrototypePush(keyHandles, key[kKeyObjectInner][kKeyObjectHandle]);
21792171
} else {
2180-
throw new ERR_INVALID_ARG_TYPE('options.keys', ['KeyObject', 'CryptoKey'], key);
2172+
throw new ERR_INVALID_ARG_TYPE('options.keys', 'KeyObject', key);
21812173
}
21822174
}
21832175
}
Collapse file

‎lib/internal/quic/symbols.js‎

Copy file name to clipboardExpand all lines: lib/internal/quic/symbols.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const {
1818

1919
const {
2020
kHandle: kKeyObjectHandle,
21-
kKeyObject: kKeyObjectInner,
2221
} = require('internal/crypto/util');
2322

2423
// Symbols used to hide various private properties and methods from the
@@ -61,7 +60,6 @@ module.exports = {
6160
kHeaders,
6261
kInspect,
6362
kKeyObjectHandle,
64-
kKeyObjectInner,
6563
kListen,
6664
kNewSession,
6765
kNewStream,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.