summaryrefslogtreecommitdiff
path: root/doc/luaossl.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/luaossl.tex')
-rw-r--r--doc/luaossl.tex39
1 files changed, 34 insertions, 5 deletions
diff --git a/doc/luaossl.tex b/doc/luaossl.tex
index 15881a8..d733ccf 100644
--- a/doc/luaossl.tex
+++ b/doc/luaossl.tex
@@ -286,8 +286,13 @@ field & type:default & description\\\hline
286 286
287.exp & number:65537 & RSA or Diffie-Hellman exponent \\ 287.exp & number:65537 & RSA or Diffie-Hellman exponent \\
288 288
289.dhparam & string & PEM encoded string with precomputed DH parameters \\
290
289.curve & string:prime192v1 & for elliptic curve keys, the OpenSSL string identifier of the curve 291.curve & string:prime192v1 & for elliptic curve keys, the OpenSSL string identifier of the curve
290\end{ctabular} 292\end{ctabular}
293
294The DH parameters ``dhparam'' will be generated on the fly, ``bits'' wide. This is a slow process, and especially for larger sizes, you would precompute those; for example: ``openssl dhparam -2 -out dh-2048.pem -outform PEM 2048''. Using the field ``dhparam'' overrides the ``bits'' field.
295
291\subsubsection[\fn{pkey.interpose}]{\fn{pkey.interpose($name$, $function$)}} 296\subsubsection[\fn{pkey.interpose}]{\fn{pkey.interpose($name$, $function$)}}
292 297
293Add or interpose a pkey class method. Returns the previous method, if any. 298Add or interpose a pkey class method. Returns the previous method, if any.
@@ -389,7 +394,19 @@ Binds the X.509 extension OpenSSL object.
389 394
390\subsubsection[\fn{extension.new}]{\fn{extension.new($name$, $value$ [, $data$])}} 395\subsubsection[\fn{extension.new}]{\fn{extension.new($name$, $value$ [, $data$])}}
391 396
392Returns a new X.509 extension. If $value$ is the string ``DER'' or ``critical,DER'', then $data$ is an ASN.1-encoded octet string. Otherwise, $name$ and $value$ are plain text strings in \href{https://www.openssl.org/docs/apps/x509v3_config.html#ARBITRARY_EXTENSIONS}{OpenSSL's arbitrary extension format}; and if specified, $data$ is an OpenSSL configuration string defining any referenced identifiers in $value$. 397Returns a new X.509 extension.
398If $value$ is the string ``DER'' or ``critical,DER'', then $data$ is an ASN.1-encoded octet string.
399Otherwise, $name$ and $value$ are plain text strings in \href{https://www.openssl.org/docs/apps/x509v3_config.html#ARBITRARY_EXTENSIONS}{OpenSSL's arbitrary extension format}; and if specified, $data$ is either an OpenSSL configuration string defining any referenced identifiers in $value$, or a table with members:
400
401\begin{ctabular}{ l | l | p{8cm} }
402field & type:default & description\\\hline
403.db & string:$nil$ & OpenSSL configuration string\\
404.issuer & \module{openssl.x509}:$nil$ & issuer certificate\\
405.subject & \module{openssl.x509}:$nil$ & subject certificate\\
406.request & \module{openssl.x509.csr}:$nil$ & certificate signing request\\
407.crl & \module{openssl.x509.crl}:$nil$ & certificate revocation list\\
408.flags & integer:$0$ & a bitwise combination of flags
409\end{ctabular}
393 410
394\subsubsection[\fn{extension.interpose}]{\fn{extension.interpose($name$, $function$)}} 411\subsubsection[\fn{extension.interpose}]{\fn{extension.interpose($name$, $function$)}}
395 412
@@ -528,7 +545,7 @@ Sets the basic constraints critical flag.
528 545
529\subsubsection[\fn{x509:addExtension}]{\fn{x509:addExtension($ext$)}} 546\subsubsection[\fn{x509:addExtension}]{\fn{x509:addExtension($ext$)}}
530 547
531Adds a copy of the \module{x509.extension} object to the certificate. 548Adds a copy of the \module{x509.extension} object to the certificate.
532 549
533\subsubsection[\fn{x509:getExtension}]{\fn{x509:getExtension($key$)}} 550\subsubsection[\fn{x509:getExtension}]{\fn{x509:getExtension($key$)}}
534 551
@@ -558,6 +575,10 @@ Sets the public key component referenced by the \module{openssl.pkey} object $ke
558 575
559Returns the digest of the public key as a binary string. $type$ is an optional string describing the digest type, and defaults to ``sha1''. 576Returns the digest of the public key as a binary string. $type$ is an optional string describing the digest type, and defaults to ``sha1''.
560 577
578\subsubsection[\fn{x509:getSignatureName}]{\fn{x509:getSignatureName()}}
579
580Returns the type of signature used to sign the certificate as a string. e.g. ``RSA-SHA1''
581
561\subsubsection[\fn{x509:sign}]{\fn{x509:sign($key$ [, $type$])}} 582\subsubsection[\fn{x509:sign}]{\fn{x509:sign($key$ [, $type$])}}
562 583
563Signs and updates the instance certificate using the \module{openssl.pkey} $key$. $type$ is an optional string describing the digest type. See \module{pkey:sign}, regarding which types of digests are valid. If $type$ is omitted than a default type is used---``sha1'' for RSA keys, ``dss1'' for DSA keys, and ``ecdsa-with-SHA1'' for EC keys. 584Signs and updates the instance certificate using the \module{openssl.pkey} $key$. $type$ is an optional string describing the digest type. See \module{pkey:sign}, regarding which types of digests are valid. If $type$ is omitted than a default type is used---``sha1'' for RSA keys, ``dss1'' for DSA keys, and ``ecdsa-with-SHA1'' for EC keys.
@@ -678,7 +699,7 @@ Add the certificate identified by $serial$ to the revocation list. $serial$ shou
678 699
679\subsubsection[\fn{crl:addExtension}]{\fn{crl:addExtension($ext$)}} 700\subsubsection[\fn{crl:addExtension}]{\fn{crl:addExtension($ext$)}}
680 701
681Adds a copy of the \module{x509.extension} object to the revocation list. 702Adds a copy of the \module{x509.extension} object to the revocation list.
682 703
683\subsubsection[\fn{crl:getExtension}]{\fn{crl:getExtension($key$)}} 704\subsubsection[\fn{crl:getExtension}]{\fn{crl:getExtension($key$)}}
684 705
@@ -692,6 +713,10 @@ Returns the integer count of the number of extensions.
692 713
693Signs the instance CRL using the \module{openssl.pkey} $key$. 714Signs the instance CRL using the \module{openssl.pkey} $key$.
694 715
716\subsubsection[\fn{crl:verify}]{\fn{crl:verify($publickey$)}}
717
718Verifies the instance CRL using a public key.
719
695\subsubsection[\fn{crl:text}]{\fn{crl:text()}} 720\subsubsection[\fn{crl:text}]{\fn{crl:text()}}
696 721
697Returns a human-readable textual representation of the instance CRL. 722Returns a human-readable textual representation of the instance CRL.
@@ -767,6 +792,10 @@ Add or interpose a store class method. Returns the previous method, if any.
767 792
768Returns a PKCS \#12 binary encoded string. 793Returns a PKCS \#12 binary encoded string.
769 794
795\subsubsection[\fn{pkcs12.parse}]{\fn{pkcs12.parse($bag$[, $passphrase$])}}
796
797Parses a PKCS\#12 bag, presented as a binary string $bag$. The second parameter $passphrase$ is the passphrase required to decrypt the PKCS\#12 bag. The function returns three items; namely the key, certificate and the CA chain, as their respective objects. If an item is absent, it will be substituted with nil.
798
770\end{Module} 799\end{Module}
771 800
772 801
@@ -785,7 +814,7 @@ Returns a new context object. $protocol$ is an optional string identifier select
785\begin{ctabular}{ c | p{14cm} } 814\begin{ctabular}{ c | p{14cm} }
786\multicolumn{2}{c}{$protocol$ identifiers}\\\hline\hline 815\multicolumn{2}{c}{$protocol$ identifiers}\\\hline\hline
787name & \href{https://www.openssl.org/docs/ssl/SSL_CTX_new.html}{description} \\\hline 816name & \href{https://www.openssl.org/docs/ssl/SSL_CTX_new.html}{description} \\\hline
788TLS & Supports TLS 1.0 \emph{and above}. Internally uses \fn{SSLv23\_method} and disables SSLv2 and 817TLS & Supports TLS 1.0 \emph{and above}. Internally uses \fn{SSLv23\_method} and disables SSLv2 and
789SSLv3 using \texttt{SSL\_OP\_NO\_SSLv2} and \texttt{SSL\_OP\_NO\_SSLv3}.\\ 818SSLv3 using \texttt{SSL\_OP\_NO\_SSLv2} and \texttt{SSL\_OP\_NO\_SSLv3}.\\
790 819
791SSL & Supports SSL 3.0 \emph{and above}. Internally uses \fn{SSLv23\_method} and disables SSLv2 using \texttt{SSL\_OP\_NO\_SSLv2}.\\ 820SSL & Supports SSL 3.0 \emph{and above}. Internally uses \fn{SSLv23\_method} and disables SSLv2 using \texttt{SSL\_OP\_NO\_SSLv2}.\\
@@ -951,7 +980,7 @@ Similar to :getPeerCertifiate, but returns the entire chain sent by the peer as
951 980
952\subsubsection[\fn{ssl:getCipherInfo}]{\fn{ssl:getCipherInfo()}} 981\subsubsection[\fn{ssl:getCipherInfo}]{\fn{ssl:getCipherInfo()}}
953 982
954Returns a table of information on the current cipher. 983Returns a table of information on the current cipher.
955 984
956\begin{tabular}{ c | l } 985\begin{tabular}{ c | l }
957field & description\\\hline 986field & description\\\hline