Skip to content

Commit

Permalink
Update tls doc to 1.0.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Oct 28, 2024
1 parent 3abf677 commit 4b29ee7
Show file tree
Hide file tree
Showing 58 changed files with 2,248 additions and 5 deletions.
7 changes: 6 additions & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="tls-miou-unix/index.html">tls-miou-unix</a> <span class="version">1.0.3</span></li>
<li><a href="tls/index.html">tls</a> <span class="version">1.0.4</span></li>
<li><a href="tls-async/index.html">tls-async</a> <span class="version">1.0.4</span></li>
<li><a href="tls-eio/index.html">tls-eio</a> <span class="version">1.0.4</span></li>
<li><a href="tls-lwt/index.html">tls-lwt</a> <span class="version">1.0.4</span></li>
<li><a href="tls-miou-unix/index.html">tls-miou-unix</a> <span class="version">1.0.4</span></li>
<li><a href="tls-mirage/index.html">tls-mirage</a> <span class="version">1.0.4</span></li>
</ol>
</div>
</main>
Expand Down
2 changes: 2 additions & 0 deletions doc/tls-async/Tls_async/Session/Fd/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Fd (tls-async.Tls_async.Session.Fd)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../../index.html">tls-async</a> &#x00BB; <a href="../../index.html">Tls_async</a> &#x00BB; <a href="../index.html">Session</a> &#x00BB; Fd</nav><header class="odoc-preamble"><h1>Module <code><span>Session.Fd</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = <span class="xref-unresolved">Async</span>.Reader.t * <span class="xref-unresolved">Async</span>.Writer.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>bytes <span class="arrow">&#45;&gt;</span></span> <span><span>[ <span>`Ok of int</span> <span>| `Eof</span> ]</span> <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write_full"><a href="#val-write_full" class="anchor"></a><code><span><span class="keyword">val</span> write_full : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div></div></div></body></html>
12 changes: 12 additions & 0 deletions doc/tls-async/Tls_async/Session/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Session (tls-async.Tls_async.Session)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">tls-async</a> &#x00BB; <a href="../index.html">Tls_async</a> &#x00BB; Session</nav><header class="odoc-preamble"><h1>Module <code><span>Tls_async.Session</span></code></h1><p>Low-level API for working with TLS sessions. Most applications should use the high-level API below</p></header><nav class="odoc-toc"><ul><li><a href="#constructors">Constructors</a></li><li><a href="#common-stream-operations">Common stream operations</a></li></ul></nav><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Fd"><a href="#module-Fd" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Fd/index.html">Fd</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Abstract type of a session</p></div></div><h3 id="constructors"><a href="#constructors" class="anchor"></a>Constructors</h3><div class="odoc-spec"><div class="spec value anchored" id="val-server_of_fd"><a href="#val-server_of_fd" class="anchor"></a><code><span><span class="keyword">val</span> server_of_fd : <span><a href="../../../tls/Tls/Config/index.html#type-server">Tls.Config.server</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="Fd/index.html#type-t">Fd.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>server_of_fd server fd</code> is <code>t</code>, after server-side TLS handshake of <code>fd</code> using <code>server</code> configuration.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-client_of_fd"><a href="#val-client_of_fd" class="anchor"></a><code><span><span class="keyword">val</span> client_of_fd :
<span><a href="../../../tls/Tls/Config/index.html#type-client">Tls.Config.client</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?host</span>:<span><span>[ `host ]</span> <span class="xref-unresolved">Domain_name</span>.t</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="Fd/index.html#type-t">Fd.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>client_of_fd client ~host fd</code> is <code>t</code>, after client-side TLS handshake of <code>fd</code> using <code>client</code> configuration and <code>host</code>.</p></div></div><h3 id="common-stream-operations"><a href="#common-stream-operations" class="anchor"></a>Common stream operations</h3><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>bytes <span class="arrow">&#45;&gt;</span></span> <span>int <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>read t buffer</code> is <code>length</code>, the number of bytes read into <code>buffer</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-writev"><a href="#val-writev" class="anchor"></a><code><span><span class="keyword">val</span> writev : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span>string list</span> <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>writev t buffers</code> writes the <code>buffers</code> to the session.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-close_tls"><a href="#val-close_tls" class="anchor"></a><code><span><span class="keyword">val</span> close_tls : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>close t</code> closes the TLS session by sending a close notify to the peer.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-reneg"><a href="#val-reneg" class="anchor"></a><code><span><span class="keyword">val</span> reneg :
<span><span class="optlabel">?authenticator</span>:<span class="xref-unresolved">X509</span>.Authenticator.t <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?acceptable_cas</span>:<span><span class="xref-unresolved">X509</span>.Distinguished_name.t list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?cert</span>:<a href="../../../tls/Tls/Config/index.html#type-own_cert">Tls.Config.own_cert</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?drop</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>reneg ~authenticator ~acceptable_cas ~cert ~drop t</code> renegotiates the session, and blocks until the renegotiation finished. Optionally, a new <code>authenticator</code> and <code>acceptable_cas</code> can be used. The own certificate can be adjusted by <code>cert</code>. If <code>drop</code> is <code>true</code> (the default), application data received before the renegotiation finished is dropped.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-key_update"><a href="#val-key_update" class="anchor"></a><code><span><span class="keyword">val</span> key_update : <span><span class="optlabel">?request</span>:bool <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>key_update ~request t</code> updates the traffic key and requests a traffic key update from the peer if <code>request</code> is provided and <code>true</code> (the default). This is only supported in TLS 1.3.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-epoch"><a href="#val-epoch" class="anchor"></a><code><span><span class="keyword">val</span> epoch : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../tls/Tls/Core/index.html#type-epoch_data">Tls.Core.epoch_data</a> <span class="xref-unresolved">Core</span>.Or_error.t</span></span></code></div><div class="spec-doc"><p><code>epoch t</code> returns <code>epoch</code>, which contains information of the active session.</p></div></div></div></body></html>
15 changes: 15 additions & 0 deletions doc/tls-async/Tls_async/X509_async/Authenticator/Param/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Param (tls-async.Tls_async.X509_async.Authenticator.Param)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../../../index.html">tls-async</a> &#x00BB; <a href="../../../index.html">Tls_async</a> &#x00BB; <a href="../../index.html">X509_async</a> &#x00BB; <a href="../index.html">Authenticator</a> &#x00BB; Param</nav><header class="odoc-preamble"><h1>Module <code><span>Authenticator.Param</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ca_file"><a href="#val-ca_file" class="anchor"></a><code><span><span class="keyword">val</span> ca_file :
<span><span class="optlabel">?allowed_hashes</span>:<span><span class="xref-unresolved">Digestif</span>.hash' list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?crls</span>:<span class="xref-unresolved">Core</span>.Filename.t <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">Core</span>.Filename.t <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ca_dir"><a href="#val-ca_dir" class="anchor"></a><code><span><span class="keyword">val</span> ca_dir :
<span><span class="optlabel">?allowed_hashes</span>:<span><span class="xref-unresolved">Digestif</span>.hash' list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?crls</span>:<span class="xref-unresolved">Core</span>.Filename.t <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">Core</span>.Filename.t <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-cert_fingerprint"><a href="#val-cert_fingerprint" class="anchor"></a><code><span><span class="keyword">val</span> cert_fingerprint : <span><span class="xref-unresolved">Digestif</span>.hash' <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>The fingerprint can be collected from a browser or by invoking an openssl command like 'openssl x509 -in &lt;pem_file&gt; -noout -fingerprint -sha256'</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-key_fingerprint"><a href="#val-key_fingerprint" class="anchor"></a><code><span><span class="keyword">val</span> key_fingerprint : <span><span class="xref-unresolved">Digestif</span>.hash' <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>The fingerprint can be collected from a browser or by invoking an openssl command like 'openssl x509 -in &lt;pem_file&gt; -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256'</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-time"><a href="#val-time" class="anchor"></a><code><span><span class="keyword">val</span> time : <span>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Ptime</span>.t option</span></span></code></div><div class="spec-doc"><p>Async programs often don't use <code>Ptime_clock</code>, so this is provided as a convenience function. Relies on <code>Unix.gettimeofday</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_authenticator"><a href="#val-to_authenticator" class="anchor"></a><code><span><span class="keyword">val</span> to_authenticator :
<span><span class="label">time</span>:<span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Ptime</span>.t option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">{Authenticator}7</span>.t <span class="xref-unresolved">Async</span>.Deferred.Or_error.t</span></span></code></div></div></div></body></html>
21 changes: 21 additions & 0 deletions doc/tls-async/Tls_async/X509_async/Authenticator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Authenticator (tls-async.Tls_async.X509_async.Authenticator)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../../index.html">tls-async</a> &#x00BB; <a href="../../index.html">Tls_async</a> &#x00BB; <a href="../index.html">X509_async</a> &#x00BB; Authenticator</nav><header class="odoc-preamble"><h1>Module <code><span>X509_async.Authenticator</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> =
<span><span class="optlabel">?ip</span>:<span class="xref-unresolved">Ipaddr</span>.t <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">host</span>:<span><span><span>[ `host ]</span> <span class="xref-unresolved">Domain_name</span>.t</span> option</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">X509</span>.Certificate.t list</span> <span class="arrow">&#45;&gt;</span></span>
<span class="xref-unresolved">X509</span>.Validation.r</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chain_of_trust"><a href="#val-chain_of_trust" class="anchor"></a><code><span><span class="keyword">val</span> chain_of_trust :
<span><span class="label">time</span>:<span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Ptime</span>.t option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?crls</span>:<span><span class="xref-unresolved">X509</span>.CRL.t list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?allowed_hashes</span>:<span><span class="xref-unresolved">Digestif</span>.hash' list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">X509</span>.Certificate.t list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-key_fingerprint"><a href="#val-key_fingerprint" class="anchor"></a><code><span><span class="keyword">val</span> key_fingerprint :
<span><span class="label">time</span>:<span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Ptime</span>.t option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">hash</span>:<span class="xref-unresolved">Digestif</span>.hash' <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">fingerprint</span>:string <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-cert_fingerprint"><a href="#val-cert_fingerprint" class="anchor"></a><code><span><span class="keyword">val</span> cert_fingerprint :
<span><span class="label">time</span>:<span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Ptime</span>.t option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">hash</span>:<span class="xref-unresolved">Digestif</span>.hash' <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">fingerprint</span>:string <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_string"><a href="#val-of_string" class="anchor"></a><code><span><span class="keyword">val</span> of_string :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Ptime</span>.t option</span>)</span> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a>, <span>[&gt; <span>`Msg of string</span> ]</span>)</span> <span class="xref-unresolved">Stdlib</span>.result</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Param"><a href="#module-Param" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Param/index.html">Param</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>
Loading

0 comments on commit 4b29ee7

Please sign in to comment.