ref: 41ca874b7b2ba5d588ea1a25f639d3e46d48cc99
parent: 3dde8528a07bd96825df75ccbd1cb052db868553
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri Sep 20 13:44:14 EDT 2013
pushssl(2), pushtls(2): clarify filedescriptor closing
--- a/sys/man/2/pushssl
+++ b/sys/man/2/pushssl
@@ -36,6 +36,10 @@
descriptor will get encrypted and authenticated and then written to the
file descriptor,
.IR fd .
+.I Pushssl
+closes the original file descriptor
+.IR fd
+on success.
.SH SOURCE
.B /sys/src/libc/9sys
.SH "SEE ALSO"
--- a/sys/man/2/pushtls
+++ b/sys/man/2/pushtls
@@ -75,6 +75,11 @@
descriptor will get encrypted and authenticated and then written to the
file descriptor,
.IR fd .
+.I Pushtls ,
+.IR tlsClient
+and
+.IR tlsServer
+close the original file descriptor on success.
If
.I dir
is non-zero, the path name of the connection directory is copied into
@@ -246,6 +251,22 @@
.SH BUGS
Client certificates and client sessionIDs are not yet
implemented.
+.PP
+Note that
+.IR pushtls ,
+.IR tlsClient
+and
+.IR tlsServer
+do not close the original file descriptor on failure,
+only on success.
+.PP
+The
+.IR sessionID
+and
+.IR cert
+pointers in the
+.IR TLSconn
+structure have to be freed by the caller.
.PP
Note that in the TLS protocol
.I sessionID
--
⑨