bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899)

Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not
copy hostflags from *struct SSL_CTX* to *struct SSL*.

Signed-off-by: Christian Heimes <christian@python.org>
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index 587d3b3..f7bdd56 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -2047,6 +2047,11 @@
 
    .. versionadded:: 3.7
 
+   .. versionchanged:: 3.10
+
+      The flag had no effect with OpenSSL before version 1.1.1k. Python 3.8.9,
+      3.9.3, and 3.10 include workarounds for previous versions.
+
 .. attribute:: SSLContext.security_level
 
    An integer representing the `security level