@@ -93,7 +93,6 @@ const {
9393
9494const {
9595 isKeyObject,
96- isCryptoKey,
9796} = require ( 'internal/crypto/keys' ) ;
9897
9998const {
@@ -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 }
0 commit comments