Skip to content

Commit

Permalink
Documentation fixes
Browse files Browse the repository at this point in the history
 - Typo in release notes
 - Update AWS KMS example
  • Loading branch information
MatthiasValvekens committed Nov 20, 2024
1 parent 6da5404 commit afcfc1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Dependency changes
* Bump ``pyhanko-certvalidator`` to ``0.26.5``
* Bump ``certomancer`` to ``0.12.3``

Note: these changes make pyHanko compatible with the API (unreleased) change in
Note: these changes make pyHanko compatible with the (unreleased) API change in
`asn1crypto #230 <https://github.com/wbond/asn1crypto/issues/230>`_,
which is nevertheless already being shipped in some distros.

Expand Down
21 changes: 8 additions & 13 deletions docs/lib-guide/adv-examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ about ``aiohttp`` usage and resource management.
other_certs=(),
):
self.session = session
self.signing_cert = signing_cert
self.key_id = key_id
self.signature_mechanism = signature_mechanism
self.signature_mechanism_aws_id = signature_mechanism_aws_id
self.cert_registry = cr = SimpleCertificateStore()
cr = SimpleCertificateStore()
cr.register_multiple(other_certs)
super().__init__()
super().__init__(
signing_cert=signing_cert,
cert_registry=cr,
)
async def async_sign_raw(
self, data: bytes, digest_algorithm: str, dry_run=False
Expand Down Expand Up @@ -101,16 +103,9 @@ about ``aiohttp`` usage and resource management.
# AWS credentials
kms_key_id = "KEY_ID_GOES_HERE"
aws_access_key_id = "ACCESS_KEY_GOES_HERE"
aws_secret_access_key = "SECRET_GOES_HERE"
# Set up aioboto3 session with provided credentials & region
session = aioboto3.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
# substitute your region here
region_name='eu-central-1',
)
# Set up aioboto3 session with ambient credentials & region
session = aioboto3.Session()
# Set up our signer
signer = AsyncKMSSigner(
Expand Down

0 comments on commit afcfc1c

Please sign in to comment.