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 SNI support to module get_certificates #84

Merged
merged 4 commits into from
Jul 13, 2020
Merged

Add SNI support to module get_certificates #84

merged 4 commits into from
Jul 13, 2020

Conversation

bmillemathias
Copy link
Contributor

SUMMARY

drop get_server_certificates as it does not support SNI in favor of low-level SSLContext.wrap_socket().getpeercert()

Fixes #69

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

get_certificate

@bmillemathias bmillemathias marked this pull request as draft July 12, 2020 08:07
@bmillemathias bmillemathias marked this pull request as ready for review July 12, 2020 09:24
plugins/modules/get_certificate.py Outdated Show resolved Hide resolved
plugins/modules/get_certificate.py Outdated Show resolved Hide resolved
@bmillemathias bmillemathias marked this pull request as draft July 12, 2020 11:28
@felixfontein felixfontein reopened this Jul 13, 2020
@felixfontein
Copy link
Contributor

Ah, now it found the new commits...

@bmillemathias bmillemathias marked this pull request as ready for review July 13, 2020 11:29
@bmillemathias bmillemathias reopened this Jul 13, 2020
bmillemathias and others added 3 commits July 13, 2020 15:05
For python versions supporting `create_default_context` support SNI by using low-level
SSLContext.wrap_socket().getpeercert().

Add also more information in the error message

fixes #69
@felixfontein felixfontein merged commit 0786e93 into ansible-collections:main Jul 13, 2020
@felixfontein
Copy link
Contributor

@bmillemathias thanks a lot for working on this!

@bmillemathias bmillemathias deleted the get_cert_sni branch July 13, 2020 20:10
@bmillemathias
Copy link
Contributor Author

@bmillemathias thanks a lot for working on this!

thanks for helping so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_certificate module is not using SNI resulting in certs coming back as invalid
2 participants