Skip to content

Commit

Permalink
build based on 0655dbc
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 13, 2024
1 parent 0a81b7e commit c6ed32d
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 100 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-12T18:08:41","documenter_version":"1.2.1"}}
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-13T20:22:00","documenter_version":"1.2.1"}}
16 changes: 8 additions & 8 deletions dev/bindings/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/changelog/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# infinite loop.
julia&gt; servedocs(; include_dirs=[&quot;src&quot;], skip_files=[&quot;docs/src/examples.md&quot;, &quot;docs/src/generated_changelog.md&quot;])</code></pre><p>This will start a server with <a href="https://github.com/tlienart/LiveServer.jl">LiveServer.jl</a> to automatically rebuild the docs when they&#39;re changed. But if you&#39;ve done something like changed a docstring and only want to build it once, this will work too:</p><pre><code class="language-julia hljs">pkg&gt; activate docs
julia&gt; include(&quot;docs/make.jl&quot;)</code></pre><p>Note that the examples are generated automatically from <code>docs/src/examples.jl</code>.</p><h3 id="Updating-the-bindings"><a class="docs-heading-anchor" href="#Updating-the-bindings">Updating the bindings</a><a id="Updating-the-bindings-1"></a><a class="docs-heading-anchor-permalink" href="#Updating-the-bindings" title="Permalink"></a></h3><p>If there&#39;s a new upstream release of libssh, here&#39;s how to update everything:</p><ol><li><p>Update the <a href="https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/libssh/build_tarballs.jl"><code>build_tarballs.jl</code></a> script to build the new version, and submit a PR to Yggdrasil to update <code>libssh_jll</code>. When testing it&#39;s often useful to deploy it locally first:</p><pre><code class="language-bash hljs">$ julia --project=@project-with-binary-builder build_tarballs.jl --deploy=local</code></pre></li><li><p>Update the generated bindings:</p><pre><code class="language-julia-repl hljs">pkg&gt; activate gen
julia&gt; include(&quot;gen/gen.jl&quot;)</code></pre><p>If you&#39;ve build and deployed <code>libssh_jll</code> locally make sure to <code>pkg&gt; dev libssh_jll</code> first, or <code>] up</code> if the JLL has already been updated in Yggdrasil.</p></li><li><p>Run the tests to make sure everything works, then bump the LibSSH.jl version number and release \o/</p></li></ol></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../generated_changelog/">« Changelog</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 12 March 2024 18:08">Tuesday 12 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
julia&gt; include(&quot;gen/gen.jl&quot;)</code></pre><p>If you&#39;ve build and deployed <code>libssh_jll</code> locally make sure to <code>pkg&gt; dev libssh_jll</code> first, or <code>] up</code> if the JLL has already been updated in Yggdrasil.</p></li><li><p>Run the tests to make sure everything works, then bump the LibSSH.jl version number and release \o/</p></li></ol></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../generated_changelog/">« Changelog</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 13 March 2024 20:21">Wednesday 13 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
4 changes: 2 additions & 2 deletions dev/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

host_key = ssh.get_server_publickey(session)
sha256_hash = pki.get_publickey_hash(host_key)
fingerprint = pki.get_fingerprint_hash(sha256_hash)</code></pre><pre><code class="nohighlight hljs">&quot;SHA256:GOKmqMMqHBFlfrvM0SXw8oaVnxRKS7kPxPf8JesjY1I&quot;</code></pre><p>Or convert it to a hex string with <a href="../utilities/#LibSSH.get_hexa"><code>get_hexa()</code></a>:</p><pre><code class="language-julia hljs">hex = ssh.get_hexa(sha256_hash)</code></pre><pre><code class="nohighlight hljs">&quot;18:e2:a6:a8:c3:2a:1c:11:65:7e:bb:cc:d1:25:f0:f2:86:95:9f:14:4a:4b:b9:0f:c4:f7:fc:25:eb:23:63:52&quot;</code></pre><p>Since this is a dummy key from the demo server we don&#39;t really want to add it to our known hosts file, but if this was asked to the user and they said yes, it should be added to the known hosts using <a href="../sessions_and_channels/#LibSSH.update_known_hosts"><code>update_known_hosts()</code></a>. But since it&#39;s a dummy key let&#39;s just trust it and continue with authenticating ourselves to the server.</p><div class="admonition is-danger"><header class="admonition-header">Danger</header><div class="admonition-body"><p>Don&#39;t skip host verification. It&#39;s the only part of the protocol that libssh doesn&#39;t handle for you, and security cannot be guaranteed without it.</p></div></div><p>Since we created the server we already know that it supports password authentication, but a good client should check anyway:</p><pre><code class="language-julia hljs">ssh.userauth_list(session)</code></pre><pre><code class="nohighlight hljs">1-element Vector{LibSSH.AuthMethod}:
AuthMethod_Password::AuthMethod = 2</code></pre><p>If we give the wrong password we&#39;ll get denied:</p><pre><code class="language-julia hljs">@assert ssh.userauth_password(session, &quot;quux&quot;) == ssh.AuthStatus_Denied</code></pre><p>But the right password should succeed:</p><pre><code class="language-julia hljs">@assert ssh.userauth_password(session, &quot;foo&quot;) == ssh.AuthStatus_Success</code></pre><p>Now we&#39;re authenticated to the server and we can actually do something, like running a command (see <a href="../sessions_and_channels/#Command-execution">Command execution</a>):</p><pre><code class="language-julia hljs">@assert read(`echo &#39;Hello world!&#39;`, session, String) == &quot;Hello world!\n&quot;</code></pre><p>Now we can disconnect our client session:</p><pre><code class="language-julia hljs">close(session)</code></pre><p>And stop the server:</p><pre><code class="language-julia hljs">demo.stop(demo_server)</code></pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« LibSSH.jl</a><a class="docs-footer-nextpage" href="../sessions_and_channels/">Sessions and Channels »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 12 March 2024 18:08">Tuesday 12 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
fingerprint = pki.get_fingerprint_hash(sha256_hash)</code></pre><pre><code class="nohighlight hljs">&quot;SHA256:KPhY1vc/ete72+2VtfrTcYN951F9C82ShzzQeRz3ZFc&quot;</code></pre><p>Or convert it to a hex string with <a href="../utilities/#LibSSH.get_hexa"><code>get_hexa()</code></a>:</p><pre><code class="language-julia hljs">hex = ssh.get_hexa(sha256_hash)</code></pre><pre><code class="nohighlight hljs">&quot;28:f8:58:d6:f7:3f:7a:d7:bb:db:ed:95:b5:fa:d3:71:83:7d:e7:51:7d:0b:cd:92:87:3c:d0:79:1c:f7:64:57&quot;</code></pre><p>Since this is a dummy key from the demo server we don&#39;t really want to add it to our known hosts file, but if this was asked to the user and they said yes, it should be added to the known hosts using <a href="../sessions_and_channels/#LibSSH.update_known_hosts"><code>update_known_hosts()</code></a>. But since it&#39;s a dummy key let&#39;s just trust it and continue with authenticating ourselves to the server.</p><div class="admonition is-danger"><header class="admonition-header">Danger</header><div class="admonition-body"><p>Don&#39;t skip host verification. It&#39;s the only part of the protocol that libssh doesn&#39;t handle for you, and security cannot be guaranteed without it.</p></div></div><p>Since we created the server we already know that it supports password authentication, but a good client should check anyway:</p><pre><code class="language-julia hljs">ssh.userauth_list(session)</code></pre><pre><code class="nohighlight hljs">1-element Vector{LibSSH.AuthMethod}:
AuthMethod_Password::AuthMethod = 2</code></pre><p>If we give the wrong password we&#39;ll get denied:</p><pre><code class="language-julia hljs">@assert ssh.userauth_password(session, &quot;quux&quot;) == ssh.AuthStatus_Denied</code></pre><p>But the right password should succeed:</p><pre><code class="language-julia hljs">@assert ssh.userauth_password(session, &quot;foo&quot;) == ssh.AuthStatus_Success</code></pre><p>Now we&#39;re authenticated to the server and we can actually do something, like running a command (see <a href="../sessions_and_channels/#Command-execution">Command execution</a>):</p><pre><code class="language-julia hljs">@assert read(`echo &#39;Hello world!&#39;`, session, String) == &quot;Hello world!\n&quot;</code></pre><p>Now we can disconnect our client session:</p><pre><code class="language-julia hljs">close(session)</code></pre><p>And stop the server:</p><pre><code class="language-julia hljs">demo.stop(demo_server)</code></pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« LibSSH.jl</a><a class="docs-footer-nextpage" href="../sessions_and_channels/">Sessions and Channels »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 13 March 2024 20:21">Wednesday 13 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/generated_changelog/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit c6ed32d

Please sign in to comment.