Lines Matching refs:pw_info
3868 _pwinfo_set(_PySSLPasswordInfo *pw_info, PyObject* password, in _pwinfo_set() argument
3903 PyMem_Free(pw_info->password); in _pwinfo_set()
3904 pw_info->password = PyMem_Malloc(size); in _pwinfo_set()
3905 if (!pw_info->password) { in _pwinfo_set()
3910 memcpy(pw_info->password, data, size); in _pwinfo_set()
3911 pw_info->size = (int)size; in _pwinfo_set()
3924 _PySSLPasswordInfo *pw_info = (_PySSLPasswordInfo*) userdata; in _password_callback() local
3927 PySSL_END_ALLOW_THREADS_S(pw_info->thread_state); in _password_callback()
3929 if (pw_info->callable) { in _password_callback()
3930 fn_ret = _PyObject_CallNoArg(pw_info->callable); in _password_callback()
3937 if (!_pwinfo_set(pw_info, fn_ret, in _password_callback()
3944 if (pw_info->size > size) { in _password_callback()
3950 PySSL_BEGIN_ALLOW_THREADS_S(pw_info->thread_state); in _password_callback()
3951 memcpy(buf, pw_info->password, pw_info->size); in _password_callback()
3952 return pw_info->size; in _password_callback()
3956 PySSL_BEGIN_ALLOW_THREADS_S(pw_info->thread_state); in _password_callback()
3957 pw_info->error = 1; in _password_callback()
3977 _PySSLPasswordInfo pw_info = { NULL, NULL, NULL, 0, 0 }; in _ssl__SSLContext_load_cert_chain_impl() local
4000 pw_info.callable = password; in _ssl__SSLContext_load_cert_chain_impl()
4001 } else if (!_pwinfo_set(&pw_info, password, in _ssl__SSLContext_load_cert_chain_impl()
4006 SSL_CTX_set_default_passwd_cb_userdata(self->ctx, &pw_info); in _ssl__SSLContext_load_cert_chain_impl()
4008 PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); in _ssl__SSLContext_load_cert_chain_impl()
4011 PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); in _ssl__SSLContext_load_cert_chain_impl()
4013 if (pw_info.error) { in _ssl__SSLContext_load_cert_chain_impl()
4026 PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); in _ssl__SSLContext_load_cert_chain_impl()
4030 PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); in _ssl__SSLContext_load_cert_chain_impl()
4034 if (pw_info.error) { in _ssl__SSLContext_load_cert_chain_impl()
4047 PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); in _ssl__SSLContext_load_cert_chain_impl()
4049 PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); in _ssl__SSLContext_load_cert_chain_impl()
4056 PyMem_Free(pw_info.password); in _ssl__SSLContext_load_cert_chain_impl()
4062 PyMem_Free(pw_info.password); in _ssl__SSLContext_load_cert_chain_impl()