[Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.52,1.53
Fred L. Drake
fdrake@users.sourceforge.net
Tue, 25 Sep 2001 08:48:13 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv1873/lib
Modified Files:
libsocket.tex
Log Message:
Added documentation for the SSL interface, contributed by Gerhard Häring.
This closes SF patch #461337.
Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** libsocket.tex 2001/08/04 22:22:45 1.52
--- libsocket.tex 2001/09/25 15:48:11 1.53
***************
*** 266,269 ****
--- 266,278 ----
\end{funcdesc}
+ \begin{funcdesc}{ssl}{sock, keyfile, certfile}
+ Initiate a SSL connection over the socket \var{sock}. \var{keyfile} is
+ the name of a PEM formatted file that contains your private
+ key. \var{certfile} is a PEM formatted certificate chain file. On
+ success, a new \class{SSLObject} is returned.
+
+ \strong{Warning:} This does not do any certificate verification!
+ \end{funcdesc}
+
\begin{funcdesc}{fromfd}{fd, family, type\optional{, proto}}
Build a socket object from an existing file descriptor (an integer as
***************
*** 510,513 ****
--- 519,536 ----
instead.
+
+ \subsection{SSL Objects \label{ssl-objects}}
+
+ SSL objects have the following methods.
+
+ \begin{methoddesc}{write}{s}
+ Writes the string \var{s} to the on the object's SSL connection.
+ The return value is the number of bytes written.
+ \end{methoddesc}
+
+ \begin{methoddesc}{read}{\optional{n}}
+ If \var{n} is provided, read \var{n} bytes from the SSL connection, otherwise
+ read until EOF. The return value is a string of the bytes read.
+ \end{methoddesc}
\subsection{Example \label{socket-example}}