Skip to content

PKCS#11 docs #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions awsiot/mqtt_connection_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,30 +265,30 @@ def mtls_with_pkcs11(*,
This function takes all :mod:`common arguments<awsiot.mqtt_connection_builder>`
described at the top of this doc, as well as...

Keyword Args:
pkcs11_lib (awscrt.io.Pkcs11Lib): Use this PKCS#11 library
Args:
pkcs11_lib: Use this PKCS#11 library

user_pin (Optional[str]): User PIN, for logging into the PKCS#11 token.
user_pin: User PIN, for logging into the PKCS#11 token.
Pass `None` to log into a token with a "protected authentication path".

slot_id (Optional[int]): ID of slot containing PKCS#11 token.
slot_id: ID of slot containing PKCS#11 token.
If not specified, the token will be chosen based on other criteria (such as token label).

token_label (Optional[str]): Label of the PKCS#11 token to use.
token_label: Label of the PKCS#11 token to use.
If not specified, the token will be chosen based on other criteria (such as slot ID).

private_key_label (Optional[str]): Label of private key object on PKCS#11 token.
private_key_label: Label of private key object on PKCS#11 token.
If not specified, the key will be chosen based on other criteria
(such as being the only available private key on the token).

cert_filepath (Optional[str]): Use this X.509 certificate (file on disk).
cert_filepath: Use this X.509 certificate (file on disk).
The certificate must be PEM-formatted. The certificate may be
specified by other means instead (ex: `cert_file_contents`)
specified by other means instead (ex: `cert_bytes`)

cert_bytes (Optional[bytes-like object]):
Use this X.509 certificate (contents in memory).
The certificate must be PEM-formatted. The certificate may be
specified by other means instead (ex: `cert_file_path`)
specified by other means instead (ex: `cert_filepath`)
"""
_check_required_kwargs(**kwargs)

Expand Down
4 changes: 2 additions & 2 deletions docs/awsiot/awsiot.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/awsiot/eventstreamrpc.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/awsiot/greengrass_discovery.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
1,837 changes: 922 additions & 915 deletions docs/awsiot/greengrasscoreipc.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/awsiot/iotidentity.html
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/awsiot/iotjobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1724,8 +1724,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/awsiot/iotshadow.html
Original file line number Diff line number Diff line change
Expand Up @@ -1867,8 +1867,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
38 changes: 36 additions & 2 deletions docs/awsiot/mqtt_connection_builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,40 @@ <h3>Navigation</h3>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="awsiot.mqtt_connection_builder.mtls_with_pkcs11">
<span class="sig-prename descclassname"><span class="pre">awsiot.mqtt_connection_builder.</span></span><span class="sig-name descname"><span class="pre">mtls_with_pkcs11</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pkcs11_lib</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">user_pin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">slot_id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">token_label</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">private_key_label</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cert_filepath</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cert_bytes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#awsiot.mqtt_connection_builder.mtls_with_pkcs11" title="Permalink to this definition">¶</a></dt>
<dd><p>This builder creates an <a class="reference external" href="https://awslabs.github.io/aws-crt-python/api/mqtt.html#awscrt.mqtt.Connection" title="(in awscrt)"><code class="xref py py-class docutils literal notranslate"><span class="pre">awscrt.mqtt.Connection</span></code></a>, configured for an mTLS MQTT connection to AWS IoT,
using a PKCS#11 library for private key operations.</p>
<p>This function takes all <a class="reference internal" href="#module-awsiot.mqtt_connection_builder" title="awsiot.mqtt_connection_builder"><code class="xref py py-mod docutils literal notranslate"><span class="pre">common</span> <span class="pre">arguments</span></code></a>
described at the top of this doc, as well as…</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pkcs11_lib</strong> (<a class="reference external" href="https://awslabs.github.io/aws-crt-python/api/io.html#awscrt.io.Pkcs11Lib" title="(in awscrt)"><em>awscrt.io.Pkcs11Lib</em></a>) – Use this PKCS#11 library</p></li>
<li><p><strong>user_pin</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a>) – User PIN, for logging into the PKCS#11 token.
Pass <cite>None</cite> to log into a token with a “protected authentication path”.</p></li>
<li><p><strong>slot_id</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><em>int</em></a><em>]</em>) – ID of slot containing PKCS#11 token.
If not specified, the token will be chosen based on other criteria (such as token label).</p></li>
<li><p><strong>token_label</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – Label of the PKCS#11 token to use.
If not specified, the token will be chosen based on other criteria (such as slot ID).</p></li>
<li><p><strong>private_key_label</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – Label of private key object on PKCS#11 token.
If not specified, the key will be chosen based on other criteria
(such as being the only available private key on the token).</p></li>
<li><p><strong>cert_filepath</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><em>str</em></a><em>]</em>) – Use this X.509 certificate (file on disk).
The certificate must be PEM-formatted. The certificate may be
specified by other means instead (ex: <cite>cert_bytes</cite>)</p></li>
<li><p><strong>cert_bytes</strong> (<em>Optional</em><em>[</em><em>bytes-like object</em><em>]</em>) – Use this X.509 certificate (contents in memory).
The certificate must be PEM-formatted. The certificate may be
specified by other means instead (ex: <cite>cert_filepath</cite>)</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://awslabs.github.io/aws-crt-python/api/mqtt.html#awscrt.mqtt.Connection" title="(in awscrt)">awscrt.mqtt.Connection</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="awsiot.mqtt_connection_builder.websockets_with_default_aws_signing">
<span class="sig-prename descclassname"><span class="pre">awsiot.mqtt_connection_builder.</span></span><span class="sig-name descname"><span class="pre">websockets_with_default_aws_signing</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">region</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">credentials_provider</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">websocket_proxy_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#awsiot.mqtt_connection_builder.websockets_with_default_aws_signing" title="Permalink to this definition">¶</a></dt>
Expand Down Expand Up @@ -289,8 +323,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
8 changes: 6 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,8 @@ <h2 id="M">M</h2>
<li><a href="awsiot/mqtt_connection_builder.html#awsiot.mqtt_connection_builder.mtls_from_bytes">mtls_from_bytes() (in module awsiot.mqtt_connection_builder)</a>
</li>
<li><a href="awsiot/mqtt_connection_builder.html#awsiot.mqtt_connection_builder.mtls_from_path">mtls_from_path() (in module awsiot.mqtt_connection_builder)</a>
</li>
<li><a href="awsiot/mqtt_connection_builder.html#awsiot.mqtt_connection_builder.mtls_with_pkcs11">mtls_with_pkcs11() (in module awsiot.mqtt_connection_builder)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -1863,6 +1865,8 @@ <h2 id="W">W</h2>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="awsiot/mqtt_connection_builder.html#awsiot.mqtt_connection_builder.websockets_with_default_aws_signing">websockets_with_default_aws_signing() (in module awsiot.mqtt_connection_builder)</a>
</li>
<li><a href="awsiot/greengrasscoreipc.html#awsiot.greengrasscoreipc.model.RunWithInfo.windows_user">windows_user (awsiot.greengrasscoreipc.model.RunWithInfo attribute)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -1903,8 +1907,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
Binary file modified docs/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2021, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.0.
&#169; Copyright 2022, Amazon Web Services, Inc.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.