summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-05 23:14:34 (GMT)
committerChristian Heimes <christian@python.org>2016-09-05 23:14:34 (GMT)
commit0061bf58923152a01ff19a41235040befd4f0b89 (patch)
tree357f44436bbfa60bde4d6d6ab078abf1b40a7c9d /Modules
parent7eacdcc3b81bacb500e0dc8a1ecfbcab29bc56e6 (diff)
parent281e5f8839355a03ace8c2162bd69ff0082e73f0 (diff)
downloadcpython-0061bf58923152a01ff19a41235040befd4f0b89.zip
cpython-0061bf58923152a01ff19a41235040befd4f0b89.tar.gz
cpython-0061bf58923152a01ff19a41235040befd4f0b89.tar.bz2
Issue #26470: Use short name rather than name for compression name to fix #27958.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ssl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index fe19195..dcfa95a 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -151,11 +151,6 @@ static int COMP_get_type(const COMP_METHOD *meth)
{
return meth->type;
}
-
-static const char *COMP_get_name(const COMP_METHOD *meth)
-{
- return meth->name;
-}
#endif
static pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx)
@@ -1714,7 +1709,7 @@ _ssl__SSLSocket_compression_impl(PySSLSocket *self)
comp_method = SSL_get_current_compression(self->ssl);
if (comp_method == NULL || COMP_get_type(comp_method) == NID_undef)
Py_RETURN_NONE;
- short_name = COMP_get_name(comp_method);
+ short_name = OBJ_nid2sn(COMP_get_type(comp_method));
if (short_name == NULL)
Py_RETURN_NONE;
return PyUnicode_DecodeFSDefault(short_name);