File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ import {
38
38
getUpstreamTlsOptions ,
39
39
getClientRelativeHostname ,
40
40
getDnsLookupFunction ,
41
- shouldUseStrictHttps
41
+ shouldUseStrictHttps ,
42
+ getTrustedCAs
42
43
} from '../passthrough-handling' ;
43
44
44
45
import {
@@ -212,16 +213,7 @@ export class PassThroughWebSocketHandler extends PassThroughWebSocketHandlerDefi
212
213
if ( ! this . extraCACertificates . length ) return undefined ;
213
214
214
215
if ( ! this . _trustedCACertificates ) {
215
- this . _trustedCACertificates = Promise . all (
216
- ( tls . rootCertificates as Array < string | Promise < string > > )
217
- . concat ( this . extraCACertificates . map ( certObject => {
218
- if ( 'cert' in certObject ) {
219
- return certObject . cert . toString ( 'utf8' ) ;
220
- } else {
221
- return fs . readFile ( certObject . certPath , 'utf8' ) ;
222
- }
223
- } ) )
224
- ) ;
216
+ this . _trustedCACertificates = getTrustedCAs ( undefined , this . extraCACertificates ) ;
225
217
}
226
218
227
219
return this . _trustedCACertificates ;
You can’t perform that action at this time.
0 commit comments