tlsSocket.setKeyCert(context)
context<Object> | <tls.SecureContext> 一个对象,至少包含来自tls.createSecureContext()options的key和cert属性,或者是用tls.createSecureContext()本身创建的 TLS 上下文对象。
tlsSocket.setKeyCert() 方法用于为套接字设置要使用的私钥和证书。如果你希望从 TLS 服务器的 ALPNCallback 中选择服务器证书,这个方法会非常有用。
🌐 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.