From: patrick f. <pa...@we...> - 2009-04-20 21:57:13
|
Hello Jean-Paul > Ah. This is because of the OpenSSL library not being loadable. If you > copy ssleay32.a into the Python library directory, C:\python26\Lib\ I > think, then Windows will find it and the error should be resolved. > > I hope that the next release of pyOpenSSL will include a Windows installer > which deals with this automatically. > > Let me know how it goes, > > Jean-Paul No (alas) that didn't work. So after I'd copied ssleay32.a to c:\python26\lib, I then had it both there and in c:\python26\libs (where you need it for the build). c:\python26\lib is, of course, in my Windows PATH. thanx - pat |
From: patrick f. <pa...@we...> - 2009-04-21 17:58:53
|
well dumpbin recognizes, say, ssl.pyd as a to-at-least-some-extent well-formed DLL. > C:\Python26\Lib\site-packages\OpenSSL>dumpbin ssl.pyd > Microsoft (R) COFF/PE Dumper Version 9.00.21022.08 > Copyright (C) Microsoft Corporation. All rights reserved. > > > Dump of file ssl.pyd > > File Type: DLL > > Summary > > 1000 .bss > 4000 .data > 1000 .edata > 2000 .idata > 2000 .rdata > 1000 .reloc > 4000 .text > > C:\Python26\Lib\site-packages\OpenSSL> But even when I put the prebuilt ( the pyopenssl-win download ) module into place, the DLLs (not unsurprisingly) refused to import. So how does this work and what's the problem? thanx - pat |
From: Jean-Paul C. <ex...@di...> - 2009-04-21 18:27:37
|
On Tue, 21 Apr 2009 10:58:41 -0700, patrick flaherty <pa...@we...> wrote: > >well dumpbin recognizes, say, ssl.pyd as a to-at-least-some-extent >well-formed DLL. > > > C:\Python26\Lib\site-packages\OpenSSL>dumpbin ssl.pyd > > Microsoft (R) COFF/PE Dumper Version 9.00.21022.08 > > Copyright (C) Microsoft Corporation. All rights reserved. > > > > > > Dump of file ssl.pyd > > > > File Type: DLL > > > > Summary > > > > 1000 .bss > > 4000 .data > > 1000 .edata > > 2000 .idata > > 2000 .rdata > > 1000 .reloc > > 4000 .text > > > > C:\Python26\Lib\site-packages\OpenSSL> > >But even when I put the prebuilt ( the pyopenssl-win download ) >module into place, the DLLs (not unsurprisingly) refused to import. > >So how does this work and what's the problem? Windows is still largely a mystery to me, so I can't tell you how it works. I do think that I understand the problem, which is that the OpenSSL library isn't being found by Windows. The pyOpenSSL library ssl.pyd is linked against it. Since you said you already have the OpenSSL libraries in the Python libs directory, I'm not sure why it's not being found. Jean-Paul |
From: patrick f. <pa...@we...> - 2009-04-21 19:53:37
|
Hello Jean-Paul > Windows is still largely a mystery to me, so I can't tell you how it works. > I do think that I understand the problem, which is that the OpenSSL library > isn't being found by Windows. The pyOpenSSL library ssl.pyd is linked > against it. Since you said you already have the OpenSSL libraries in the > Python libs directory, I'm not sure why it's not being found. > > Jean-Paul Here's a dumpbin of ssl.pyd's dependencies: > Section contains the following imports: WS2_32.DLL 618CD30C Import > Address Table 618CD0A4 Import Name Table 0 time date stamp 0 Index of > first forwarder reference 1A WSAGetLastError KERNEL32.dll 618CD318 > Import Address Table 618CD0B0 Import Name Table 0 time date stamp 0 > Index of first forwarder reference 1 AddAtomA AF FindAtomA DC > GetAtomNameA msvcr71.dll 618CD32C Import Address Table 618CD0C4 Import > Name Table 0 time date stamp 0 Index of first forwarder reference 38 > __dllonexit BD _errno 26B fflush 27A free 2AD malloc 2DD strncpy > msvcrt.dll 618CD34C Import Address Table 618CD0E4 Import Name Table 0 > time date stamp 0 Index of first forwarder reference 6F _assert 215 > abort 27A memset ssleay32.dll 618CD360 Import Address Table 618CD0F8 > Import Name Table 0 time date stamp 0 Index of first forwarder > reference 9 ERR_load_SSL_strings 14 SSL_CTX_check_private_key 15 > SSL_CTX_ctrl 17 SSL_CTX_free 18 SSL_CTX_get_cert_store 1F > SSL_CTX_get_timeout 21 SSL_CTX_get_verify_depth 22 > SSL_CTX_get_verify_mode 23 SSL_CTX_load_verify_locations 24 > SSL_CTX_new 2F SSL_CTX_set_cipher_list 30 SSL_CTX_set_client_CA_list > 34 SSL_CTX_set_default_passwd_cb 35 > SSL_CTX_set_default_passwd_cb_userdata 37 SSL_CTX_set_ex_data 39 > SSL_CTX_set_info_callback 3D SSL_CTX_set_session_id_context 3F > SSL_CTX_set_timeout 44 SSL_CTX_set_verify 45 SSL_CTX_set_verify_depth > 46 SSL_CTX_use_PrivateKey 48 SSL_CTX_use_PrivateKey_file 4C > SSL_CTX_use_certificate 4E SSL_CTX_use_certificate_chain_file 4F > SSL_CTX_use_certificate_file 6B SSL_ctrl 6C SSL_do_handshake 6F > SSL_free 73 SSL_get_cipher_list 7A SSL_get_error 7B SSL_get_ex_data 82 > SSL_get_peer_certificate 8B SSL_get_shutdown 95 SSL_library_init 96 > SSL_load_client_CA_file 98 SSL_new 9A SSL_pending 9B SSL_read 9C > SSL_renegotiate 9D SSL_renegotiate_pending A1 SSL_set_accept_state A5 > SSL_set_connect_state A6 SSL_set_ex_data A7 SSL_set_fd B1 > SSL_set_shutdown BB SSL_shutdown BE SSL_state_string_long C9 SSL_want > CA SSL_write CC SSLv23_method CF SSLv2_method D2 SSLv3_method D5 > TLSv1_method libeay32.dll 618CD43C Import Address Table 618CD1D4 > Import Name Table 0 time date stamp 0 Index of first forwarder > reference F8 BIO_free 10F BIO_new_file 274 DH_free 3C7 > ERR_func_error_string 3C9 ERR_get_error 3D0 ERR_lib_error_string 3EE > ERR_peek_error 3F9 ERR_reason_error_string 606 PEM_read_bio_DHparams > 914 X509_STORE_CTX_get_current_cert 915 X509_STORE_CTX_get_error 916 > X509_STORE_CTX_get_error_depth 917 X509_STORE_CTX_get_ex_data 923 > X509_STORE_CTX_set_error 969 X509_dup 96D X509_free python25.dll > 618CD484 Import Address Table 618CD21C Import Name Table 0 time date > stamp 0 Index of first forwarder reference 7 PyArg_ParseTuple 1E > PyCObject_AsVoidPtr 1F PyCObject_FromVoidPtr 24 PyCObject_Type 27 > PyCallable_Check 57 PyDict_GetItemString 5F PyDict_SetItemString 68 > PyErr_Clear 6A PyErr_ExceptionMatches 6E PyErr_NewException 6F > PyErr_NoMemory 71 PyErr_Occurred 82 PyErr_SetNone 83 PyErr_SetObject > 84 PyErr_SetString 8F PyEval_CallObjectWithKeywords A1 > PyEval_RestoreThread A2 PyEval_SaveThread A8 PyExc_AttributeError BC > PyExc_NotImplementedError C1 PyExc_RuntimeError CA PyExc_TypeError D2 > PyExc_ValueError 10D PyImport_ImportModule 115 PyInt_AsLong 11A > PyInt_FromLong 120 PyInt_Type 128 PyList_Append 12E PyList_New 13E > PyLong_FromLong 162 PyModule_AddIntConstant 163 PyModule_AddObject 165 > PyModule_GetDict 1A8 PyObject_AsFileDescriptor 1B9 PyObject_GC_Del 1BA > PyObject_GC_Track 1BB PyObject_GC_UnTrack 1BF PyObject_GetAttrString > 1C9 PyObject_IsTrue 227 PyString_AsString 232 PyString_FromString 233 > PyString_FromStringAndSize 238 PyString_Size 239 PyString_Type 254 > PyThread_create_key 259 PyThread_get_key_value 25E > PyThread_set_key_value 268 PyTuple_GetItem 271 PyType_IsSubtype 273 > PyType_Type 2D6 Py_BuildValue 2E2 Py_FindMethod 2F4 Py_InitModule4 33C > _PyObject_GC_New 34D _PyString_Resize 377 _Py_NoneStruct 37E > _Py_TrueStruct 380 _Py_ZeroStruct pat |
From: patrick f. <pa...@we...> - 2009-04-21 20:05:20
|
well it lost all its formatting when it arrived here in the mailing list archive on sourceforge but I see that if one clicks on the 'Mail as HTML' part of Attachments, it will bring up my message, properly formatted, in a browser window. How does one actually respond here so as to maintain the same thread? pat |
From: patrick f. <pa...@we...> - 2009-04-21 21:40:49
|
Figured it out at least this far - it's the 64 bit-ness. I installed the OpenSSL prebuilt module into a python 2.5 installation on a 32 bit windows machine. mk_simple_certs.py ran successfully and produced the certs (in the simple subdirectory). So I think it fair to say this all of this stuff will work on a 32-bit machine - but not a 64-bit machine. I'm considering installing a 3.x version of python to see if this handles 64-bit windows better (in particular how python loads DLLs). Note that on a 64-bit machine you have two versions of the system32 directory (where Windows DLLs are often put): c:\windows\system32 c:\windows\sysWOW64 Confusingly the first (which is the same as the old 32 bit name) is the 64 bit location. WOW64 is actually the 32 bit location. pat |