Files

3 lines
4.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Digest (capnp-rpc-net.Capnp_rpc_net.Auth.Digest)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.4"/><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">capnp-rpc-net</a> &#x00BB; <a href="../../index.html">Capnp_rpc_net</a> &#x00BB; <a href="../index.html">Auth</a> &#x00BB; Digest</nav><header class="odoc-preamble"><h1>Module <code><span>Auth.Digest</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 class="spec-doc"><p>The digest of a public key, used to recognise a vat. This appears in URIs as e.g. 'capnp://sha256:1234@host/'.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-insecure"><a href="#val-insecure" class="anchor"></a><code><span><span class="keyword">val</span> insecure : <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>A special value indicating no authentication should be performed.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-from_uri"><a href="#val-from_uri" class="anchor"></a><code><span><span class="keyword">val</span> from_uri : <span><span class="xref-unresolved">Uri</span>.t <span class="arrow">&#45;&gt;</span></span> <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 class="spec-doc"><p><code>from_uri t</code> is the parsed digest information in <code>t</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_to_uri"><a href="#val-add_to_uri" class="anchor"></a><code><span><span class="keyword">val</span> add_to_uri : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Uri</span>.t <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Uri</span>.t</span></code></div><div class="spec-doc"><p><code>add_to_uri t uri</code> is <code>uri</code> with the <code>user</code> and <code>password</code> fields set to the correct values for <code>t</code>. Note that although we use the &quot;password&quot; field, this is not secret.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-authenticator"><a href="#val-authenticator" class="anchor"></a><code><span><span class="keyword">val</span> authenticator : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">X509</span>.Authenticator.t option</span></span></code></div><div class="spec-doc"><p><code>authenticator t</code> is an authenticator that checks that the peer's public key matches <code>t</code>. Returns <code>None</code> if <code>t</code> is <code>insecure</code>. Note: it currently also requires the DN field to be &quot;capnp&quot;.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_certificate"><a href="#val-of_certificate" class="anchor"></a><code><span><span class="keyword">val</span> of_certificate : <span><span class="xref-unresolved">X509</span>.Certificate.t <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>of_certificate cert</code> is a digest of <code>cert</code>'s public key.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span><span class="keyword">val</span> equal : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span><a href="#type-t">t</a> <span class="xref-unresolved">Fmt</span>.t</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Map"><a href="#module-Map" class="anchor"></a><code><span><span class="keyword">module</span> Map</span><span> : <span class="xref-unresolved">Stdlib</span>.Map.S <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">key</span> = <span class="xref-unresolved">t</span></span></span></code></div></div></div></body></html>