Description
Bug report
Bug description:
AIX build broke after the commit #103181
./Modules/_ssl.c:4757:5: error: unknown type name 'SSL_psk_client_cb_func' 4757 | SSL_psk_client_cb_func ssl_callback; | ^~~~~~~~~~~~~~~~~~~~~~ ./Modules/_ssl.c:4761:22: warning: assignment to 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 4761 | ssl_callback = NULL; | ^ ./Modules/_ssl.c:4767:22: warning: assignment to 'int' from 'unsigned int (*)(SSL *, const char *, char *, unsigned int, unsigned char *, unsigned int)' {aka 'unsigned int (*)(struct ssl_st *, const char *, char *, unsigned int, unsigned char *, unsigned int)'} makes integer from pointer without a cast [-Wint-conversion] 4767 | ssl_callback = psk_client_callback; | ^ ./Modules/_ssl.c:4774:5: error: implicit declaration of function 'SSL_CTX_set_psk_client_callback'; did you mean 'SSL_CTX_set_security_callback'? [-Werror=implicit-function-declaration] 4774 | SSL_CTX_set_psk_client_callback(self->ctx, ssl_callback); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | SSL_CTX_set_security_callback
Recent Openssl versions in AIX has been built without PSK support (--no-psk in configure). The psk related functions are protect under OPENSSL_NO_PSK (which is set) in the headers and functions are not part of library. Hence the failure.
Applications which uses openssl can use OPENSSL_NO_PSK to not expose the psk related code when it is set (For example., python cryptography, proftpd, stunnel, etc., does that.) I think in python also we can do that , so that openssl library built without psk support can also be used to build the _ssl module.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other