Hello,

I seem to be running into a callback/timing-related bug.

I am integrating M2Crypto with OpenSSL 0.9.5a. M2Crypto is a Python 
interface to OpenSSL; it allows one to write SSL clients and servers, 
including OpenSSL callbacks, in Python. Presently, M2Crypto supports 
SSL_set_info_callback() and SSL_set_verify_callback().


As demos/testbeds, I have implemented iterative, threading, forking 
and single-threaded async-socket versions of the classic "echod" 
server over SSL.


With OpenSSL 0.9.5a on FreeBSD 2 and Linux (Red Hat 5.2), iterative, 
threading, forking and async work fine, both with and without 
info/verification callbacks. 


On WinNT with OpenSSL 0.9.5a, I'm seeing the following: iterative and 
threading work fine, both with and without info/verification callbacks. 
Async works fine, _without_ callbacks. Once a callback is used, async 
crashes.

If I run both the async echod and the echo client on the same boxen,
echod crashes quickly, somewhere after "read client hello A". If I run
the echo client over the network, echod sometimes crashes later, somewhere 
after "read client certificate A". 

If I use a C info_callback, instead of a Python one, async sometimes
work.

In all cases, the error is as follows:

    The instruction at "0x1e127028" referenced memory at "0x00000008".
    The memory could not be "read".

Now, if I single-step through the async echod under the Python debugger,
it works!


With OpenSSL 0.9.4, they all work. 


The FreeBSD, Linux and NT OS, C compiler setup, Python environment, etc. 
have not changed, AFAIK. The FreeBSD is a P5-166, Linux P5-120, and the 
NT Pentium II 400. (This NT boxen isn't mine, else it wouldn't be running 
NT. ;-)

Has any one encountered errors similar to what I have described?

TIA. Cheers.


PS. On a happier note, M2Crypto now groks 0.9.5's S/MIME and interoperates 
with Netscape Messenger. ;-)


PPS. M2Crypto can be obtained at http://www.post1.com/home/ngps/m2

-- 
Ng Pheng Siong <[EMAIL PROTECTED]> * http://www.post1.com/home/ngps

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to