Lines Matching refs:pw_info
2630 _pwinfo_set(_PySSLPasswordInfo *pw_info, PyObject* password, in _pwinfo_set() argument
2665 PyMem_Free(pw_info->password); in _pwinfo_set()
2666 pw_info->password = PyMem_Malloc(size); in _pwinfo_set()
2667 if (!pw_info->password) { in _pwinfo_set()
2672 memcpy(pw_info->password, data, size); in _pwinfo_set()
2673 pw_info->size = (int)size; in _pwinfo_set()
2686 _PySSLPasswordInfo *pw_info = (_PySSLPasswordInfo*) userdata; in _password_callback() local
2689 PySSL_END_ALLOW_THREADS_S(pw_info->thread_state); in _password_callback()
2691 if (pw_info->callable) { in _password_callback()
2692 fn_ret = PyObject_CallFunctionObjArgs(pw_info->callable, NULL); in _password_callback()
2699 if (!_pwinfo_set(pw_info, fn_ret, in _password_callback()
2706 if (pw_info->size > size) { in _password_callback()
2712 PySSL_BEGIN_ALLOW_THREADS_S(pw_info->thread_state); in _password_callback()
2713 memcpy(buf, pw_info->password, pw_info->size); in _password_callback()
2714 return pw_info->size; in _password_callback()
2718 PySSL_BEGIN_ALLOW_THREADS_S(pw_info->thread_state); in _password_callback()
2719 pw_info->error = 1; in _password_callback()
2731 _PySSLPasswordInfo pw_info = { NULL, NULL, NULL, 0, 0 }; in load_cert_chain() local
2760 pw_info.callable = password; in load_cert_chain()
2761 } else if (!_pwinfo_set(&pw_info, password, in load_cert_chain()
2766 SSL_CTX_set_default_passwd_cb_userdata(self->ctx, &pw_info); in load_cert_chain()
2768 PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); in load_cert_chain()
2770 PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); in load_cert_chain()
2772 if (pw_info.error) { in load_cert_chain()
2785 PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); in load_cert_chain()
2789 PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); in load_cert_chain()
2791 if (pw_info.error) { in load_cert_chain()
2804 PySSL_BEGIN_ALLOW_THREADS_S(pw_info.thread_state); in load_cert_chain()
2806 PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); in load_cert_chain()
2814 PyMem_Free(pw_info.password); in load_cert_chain()
2822 PyMem_Free(pw_info.password); in load_cert_chain()