From 4231605183ac19c84fe6eb412c88915fa0ba12f3 Mon Sep 17 00:00:00 2001
From: william <william@25tandclement.com>
Date: Tue, 28 Oct 2014 21:32:33 -0700
Subject: update documentation for context.new

---
 doc/luaossl.tex | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

(limited to 'doc/luaossl.tex')

diff --git a/doc/luaossl.tex b/doc/luaossl.tex
index 16dffb3..d0bad06 100644
--- a/doc/luaossl.tex
+++ b/doc/luaossl.tex
@@ -689,7 +689,29 @@ A table mapping OpenSSL named constants. The available constants are documented
 
 \subsubsection[\fn{context.new}]{\fn{context.new([$protocol$][, $server$])}}
 
-Returns a new context object. $protocol$ is an optional string identifier selecting the SSL mode---``TLSv1'' (default), ``SSLv3'', ``SSLv23'', or ``SSLv2''. If $server$ is true, then SSL connections instantiated using this context will be placed into server mode, otherwise they behave as clients.
+Returns a new context object. $protocol$ is an optional string identifier selecting the OpenSSL constructor, defaulting to ``TLS''. If $server$ is true, then SSL connections instantiated using this context will be placed into server mode, otherwise they behave as clients.
+
+\begin{ctabular}{ c | p{14cm} }
+\multicolumn{2}{c}{$protocol$ identifiers}\\\hline\hline
+name & \href{https://www.openssl.org/docs/ssl/SSL_CTX_new.html}{description} \\\hline
+TLS & Supports TLS 1.0 and above. Internally uses \fn{SSLv23\_method} and disables SSLv2 and 
+SSLv3 using \texttt{SSL\_OP\_NO\_SSLv2} and \texttt{SSL\_OP\_NO\_SSLv3}.\\
+
+SSL & Supports SSL 3.0 and above. Internally uses \fn{SSLv23\_method} and disables SSLv2 using \texttt{SSL\_OP\_NO\_SSLv2}.\\
+
+SSLv23 & A catchall for all versions of SSL/TLS supported by OpenSSL. Individual versions can be disabled using \method{context:setOptions}. Internally uses \fn{SSLv23\_method}.\\
+
+TLSv1\_2 & Supports \emph{only} TLS 1.2; \emph{not} anything lower \emph{or} higher. Internally uses \fn{TLSv1\_2\_method}.\\
+
+TLSv1\_1 & Supports \emph{only} TLS 1.1; \emph{not} anything lower \emph{or} higher. Internally uses \fn{TLSv1\_1\_method}.\\
+
+TLSv1 & Supports \emph{only} TLS 1.0; \emph{not} anything lower \emph{or} higher. Internally uses \fn{TLSv1\_method}.\\
+
+SSLv3 & Supports \emph{only} SSL 3.0; \emph{not} anything lower \emph{or} higher. Internally uses \fn{SSLv3\_method}.\\
+
+SSLv2 & Supports \emph{only} SSL 2.0; \emph{not} anything lower \emph{or} higher. Internally uses \fn{SSLv2\_method}.
+\end{ctabular}
+
 
 \subsubsection[\fn{context.interpose}]{\fn{context.interpose($name$, $function$)}}
 
-- 
cgit v1.2.3-55-g6feb

