Skip to content
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

Add warning for ASN.1 encoded extension values returned by some modules #318

Merged
merged 2 commits into from
Oct 31, 2021
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
6 changes: 6 additions & 0 deletions changelogs/fragments/318-extension-value-note.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
breaking_changes:
- "get_certificate, openssl_csr_info, x509_certificate_info - depending on the ``cryptography`` version used,
the modules might not return the ASN.1 value for an extension as contained in the certificate respectively CSR,
but a re-encoded version of it. This should usually be identical to the value contained in the source file,
unless the value was malformed. For extensions not handled by C(cryptography) the value contained in
the source file is always returned unaltered (https://github.com/ansible-collections/community.crypto/pull/318)."
8 changes: 7 additions & 1 deletion plugins/modules/get_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@
asn1_data:
returned: success
type: str
description: The Base64 encoded ASN.1 content of the extnesion.
description:
- The Base64 encoded ASN.1 content of the extension.
- B(Note) that depending on the C(cryptography) version used, it is
not possible to extract the ASN.1 content of the extension, but only
to provide the re-encoded content of the extension in case it was
parsed by C(cryptography). This should usually result in exactly the
same value, except if the original extension value was malformed.
name:
returned: success
type: str
Expand Down
8 changes: 7 additions & 1 deletion plugins/modules/openssl_csr_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@
returned: success
type: bool
value:
description: The Base64 encoded value (in DER format) of the extension
description:
- The Base64 encoded value (in DER format) of the extension.
- B(Note) that depending on the C(cryptography) version used, it is
not possible to extract the ASN.1 content of the extension, but only
to provide the re-encoded content of the extension in case it was
parsed by C(cryptography). This should usually result in exactly the
same value, except if the original extension value was malformed.
returned: success
type: str
sample: "MAMCAQU="
Expand Down
8 changes: 7 additions & 1 deletion plugins/modules/x509_certificate_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@
returned: success
type: bool
value:
description: The Base64 encoded value (in DER format) of the extension.
description:
- The Base64 encoded value (in DER format) of the extension.
- B(Note) that depending on the C(cryptography) version used, it is
not possible to extract the ASN.1 content of the extension, but only
to provide the re-encoded content of the extension in case it was
parsed by C(cryptography). This should usually result in exactly the
same value, except if the original extension value was malformed.
returned: success
type: str
sample: "MAMCAQU="
Expand Down