snstac / pytak

PyTAK is a Python package for rapid TAK integration.
https://pytak.readthedocs.io/en/stable/
Apache License 2.0
156 stars 42 forks source link

Add a config variable for users to set expected CN when using CA verification #72

Closed ahoenerBE closed 3 months ago

ahoenerBE commented 3 months ago

When connecting direct to an IP with TLS (e.g. tls://192.168.10.101:8089) and using a CA bundle, there is no option to set the expected CN of the host, even though Python SSL / AsyncIO offer that feature.

This PR adds that config variable PYTAK_TLS_SERVER_EXPECTED_HOSTNAME, and passes it along to the connection.

ahoenerBE commented 3 months ago

@ampledata Ready for review whenever you have time