Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0061bf5

Browse files
committed
Issue #26470: Use short name rather than name for compression name to fix #27958.
2 parents 7eacdcc + 281e5f8 commit 0061bf5

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

Modules/_ssl.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ static int COMP_get_type(const COMP_METHOD *meth)
151151
{
152152
return meth->type;
153153
}
154-
155-
static const char *COMP_get_name(const COMP_METHOD *meth)
156-
{
157-
return meth->name;
158-
}
159154
#endif
160155

161156
static pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx)
@@ -1714,7 +1709,7 @@ _ssl__SSLSocket_compression_impl(PySSLSocket *self)
17141709
comp_method = SSL_get_current_compression(self->ssl);
17151710
if (comp_method == NULL || COMP_get_type(comp_method) == NID_undef)
17161711
Py_RETURN_NONE;
1717-
short_name = COMP_get_name(comp_method);
1712+
short_name = OBJ_nid2sn(COMP_get_type(comp_method));
17181713
if (short_name == NULL)
17191714
Py_RETURN_NONE;
17201715
return PyUnicode_DecodeFSDefault(short_name);

0 commit comments

Comments
 (0)