@@ -98,7 +98,6 @@ const {
9898
9999const {
100100 isKeyObject,
101- isCryptoKey,
102101} = require ( 'internal/crypto/keys' ) ;
103102
104103const {
@@ -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 }
0 commit comments