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 4c206ec

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 a6ced7d commit 4c206ec
Copy full SHA for 4c206ec

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
@@ -93,7 +93,6 @@ const {
9393

9494
const {
9595
isKeyObject,
96-
isCryptoKey,
9796
} = require('internal/crypto/keys');
9897

9998
const {
@@ -138,7 +137,6 @@ const {
138137
kVersionNegotiation,
139138
kInspect,
140139
kKeyObjectHandle,
141-
kKeyObjectInner,
142140
kWantsHeaders,
143141
kWantsTrailers,
144142
} = require('internal/quic/symbols');
@@ -182,7 +180,6 @@ const onSessionHandshakeChannel = dc.channel('quic.session.handshake');
182180
/**
183181
* @typedef {import('../socketaddress.js').SocketAddress} SocketAddress
184182
* @typedef {import('../crypto/keys.js').KeyObject} KeyObject
185-
* @typedef {import('../crypto/keys.js').CryptoKey} CryptoKey
186183
*/
187184

188185
/**
@@ -255,7 +252,7 @@ const onSessionHandshakeChannel = dc.channel('quic.session.handshake');
255252
* @property {boolean} [verifyClient] Verify the client
256253
* @property {boolean} [tlsTrace] Enable TLS tracing
257254
* @property {boolean} [verifyPrivateKey] Verify the private key
258-
* @property {KeyObject|CryptoKey|Array<KeyObject|CryptoKey>} [keys] The keys
255+
* @property {KeyObject|KeyObject[]} [keys] The keys
259256
* @property {ArrayBuffer|ArrayBufferView|Array<ArrayBuffer|ArrayBufferView>} [certs] The certificates
260257
* @property {ArrayBuffer|ArrayBufferView|Array<ArrayBuffer|ArrayBufferView>} [ca] The certificate authority
261258
* @property {ArrayBuffer|ArrayBufferView|Array<ArrayBuffer|ArrayBufferView>} [crl] The certificate revocation list
@@ -1999,13 +1996,8 @@ function processTlsOptions(tls, forServer) {
19991996
throw new ERR_INVALID_ARG_VALUE('options.keys', key, 'must be a private key');
20001997
}
20011998
ArrayPrototypePush(keyHandles, key[kKeyObjectHandle]);
2002-
} else if (isCryptoKey(key)) {
2003-
if (key.type !== 'private') {
2004-
throw new ERR_INVALID_ARG_VALUE('options.keys', key, 'must be a private key');
2005-
}
2006-
ArrayPrototypePush(keyHandles, key[kKeyObjectInner][kKeyObjectHandle]);
20071999
} else {
2008-
throw new ERR_INVALID_ARG_TYPE('options.keys', ['KeyObject', 'CryptoKey'], key);
2000+
throw new ERR_INVALID_ARG_TYPE('options.keys', 'KeyObject', key);
20092001
}
20102002
}
20112003
}
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
@@ -10,7 +10,6 @@ const {
1010

1111
const {
1212
kHandle: kKeyObjectHandle,
13-
kKeyObject: kKeyObjectInner,
1413
} = require('internal/crypto/util');
1514

1615
// Symbols used to hide various private properties and methods from the
@@ -54,7 +53,6 @@ module.exports = {
5453
kHeaders,
5554
kInspect,
5655
kKeyObjectHandle,
57-
kKeyObjectInner,
5856
kListen,
5957
kNewSession,
6058
kNewStream,

0 commit comments

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