(original) (raw)
changeset: 103091:2593ed9a6a62 branch: 2.7 parent: 103087:fb74947843eb user: Christian Heimes christian@python.org date: Tue Sep 06 01:10:39 2016 +0200 files: Modules/_ssl.c description: Issue #26470: Use short name rather than name for compression name to fix #27958. diff -r fb74947843eb -r 2593ed9a6a62 Modules/_ssl.c --- a/Modules/_ssl.c Mon Sep 05 18:06:06 2016 -0500 +++ b/Modules/_ssl.c Tue Sep 06 01:10:39 2016 +0200 @@ -148,11 +148,6 @@ { 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 @@ 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); /christian@python.org