MsetKeyCert
Bun

method

tls.TLSSocket.setKeyCert

): void;

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.

@param context

An object containing at least key and cert properties from the () options, or a TLS context object created with () itself.