setKeyCert
The tlsSocket.setKeyCert() method sets the private key and certificate to use for the socket. This is mainly useful if you wish to select a server certificate from a TLS server's ALPNCallback.
Since
v22.5.0, v20.17.0
Parameters
context
An object containing at least key and cert properties from the {@link createSecureContext()} options, or a TLS context object created with {@link createSecureContext()} itself.