File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -333,6 +333,22 @@ export class SecureContext {
333333 }
334334 if ( options . clientCertEngine != null ) {
335335 validateString ( options . clientCertEngine , "options.clientCertEngine" ) ;
336+ // OpenSSL engines are not supported in Deno (which uses rustls).
337+ // Match Node's behaviour when OpenSSL fails to load the engine: throw
338+ // an Error whose message contains "could not load the shared library"
339+ // and carries an `opensslErrorStack` array.
340+ const err = new Error (
341+ `error:25066067:DSO support routines:dlfcn_load:could not load the shared library` ,
342+ ) as any ;
343+ err . opensslErrorStack = [
344+ `error:25070067:DSO support routines:DSO_load:could not load the shared library` ,
345+ `error:260B6084:engine routines:dynamic_load:dso not found` ,
346+ ] ;
347+ err . library = "DSO support routines" ;
348+ err . function = "dlfcn_load" ;
349+ err . reason = "could not load the shared library" ;
350+ err . code = "ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY" ;
351+ throw err ;
336352 }
337353 if ( options . privateKeyEngine != null ) {
338354 validateString ( options . privateKeyEngine , "options.privateKeyEngine" ) ;
Original file line number Diff line number Diff line change 34803480 "parallel/test-tls-empty-sni-context.js" : {},
34813481 "parallel/test-tls-enable-trace-cli.js" : {},
34823482 "parallel/test-tls-enable-trace.js" : {},
3483+ "parallel/test-tls-error-stack.js" : {},
34833484 "parallel/test-tls-env-extra-ca-no-crypto.js" : {},
34843485 "parallel/test-tls-external-accessor.js" : {},
34853486 "parallel/test-tls-fast-writing.js" : {},
You can’t perform that action at this time.
0 commit comments