diff options
author | Christian Heimes <christian@python.org> | 2016-09-06 01:10:39 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-06 01:10:39 +0200 |
commit | 9940633e89d7928cdc392b065df342b9352956ae (patch) | |
tree | 88fcb995fb09dbe5e9bf9039dbdbdc791bd4250c /Modules/_ssl.c | |
parent | b2b734f48cb814645154bae524db6a51fc87124d (diff) | |
download | cpython-git-9940633e89d7928cdc392b065df342b9352956ae.tar.gz |
Issue #26470: Use short name rather than name for compression name to fix #27958.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index d1f7900328..589ea70a51 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -148,11 +148,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) @@ -1519,7 +1514,7 @@ static PyObject *PySSL_compression(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 PyBytes_FromString(short_name); |