Net.startTLS(3kaya)
NAME
Net::startTLS - Convert an existing connection to use TLS.
SYNOPSIS
Void startTLS( NetHandle h, [String] certfiles=[] )
ARGUMENTS
h The connection handle
certs An optional list of certificate files for TLS encrypted connections. Each file should contain one or more PEM-encoded certificates
for a trusted certification authority. If this list is empty (the
default), no certificate verification will be performed on encrypted
connections, which is insecure.
DESCRIPTION
Begins TLS encryption on an existing connection equivilant to having
set usetls to true when creating it. Useful for secure SMTP connections. This function will fail silently if TLS encryption is already in
use on the connection.
Note that this function is only designed for client connections started
with Net.connect (3kaya) rather than server connections from Net.accept
(3kaya)
AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others
(kaya@kayalang.org). For further information see http://kayalang.org/
LICENSE
The Kaya standard library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
License (version 2.1 or any later version) as published by the Free
Software Foundation.
RELATED
- Net.NetHandle (3kaya)
Net.connect (3kaya)