def Tls.secure
import bend-kube-runtime@0.2.0.0/src/net.bend as Netimport Base
31# Handshakes on a connection from Tls.dial and verifies the server as host
32# (a name, or an IP literal), always: ca is a PEM bundle of trusted roots
33# ("" for the system's), cert and key a PEM client certificate and key (""
34# for none), ms the handshake's deadline (0 for 30s). TLS 1.2 or later. A
35# failure closes the connection.
36def Tls.secure(sock: Socket, host: String, ca: String, cert: String, key: String, ms: U32) ->
37 IO(Res(Socket)):
38 import "./effs/tls.c"
39 import "./effs/tls.js"