shithub: riscv

Download patch

ref: 65653a184021a7e6a26492251168e8ac2b906527
parent: 4e015eb5c7ba7ae1cb7b2e26997a7ba0eb02b626
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
--