> #0  0x08081361 in BIO_ctrl ()
> #1  0x0815fac0 in ?? ()
> #2  0x08051a88 in ?? ()
> #3  0xbf9a4e98 in ?? ()
> #4  0x0805ad6e in SSLwrapper::ProcessBuffers (this=0xb7fdb480,
> [EMAIL PROTECTED], read=false, write=false) at SSLwrapper.cpp:34
> Previous frame inner to this frame (corrupt stack?)
>
> I get that when calling:
>
>     BUF_MEM *bptr = NULL;
>     BIO_get_mem_ptr(out, &bptr);
>
> What am I doing wrong?
>
> I set it all up using:
>
>    out = BIO_new(BIO_s_mem());
>    in = BIO_new(BIO_s_mem());
>
>    ssl = SSL_new(ctx);
>    SSL_set_bio(ssl,in,out);
>
> these steps are done continously:
>
> then I read from my socket-class and feed the data into 'in':
>        socket.Read(buffer,1024);
>         length = socket.LastCount();
>         if (BIO_write(in,buffer,length) != length)
>
> then I write to the socket-class from the 'out'
>       BUF_MEM *bptr = NULL;
>         BIO_get_mem_ptr(out, &bptr);
>
>         int length = bptr->length;
>         while(length > 0)
>           {
>              socket.Write(bptr->data + (bptr->length-length), length);
>              length -= socket.LastCount();
>           }
>         BIO_reset(out);
>
>
> It's when I'm calling BIO_get_mem_ptr that I get a segfault.
> Anyone have an idea of what I'm missing/doing wrong?

Does anyone have a link to a tutorial or something similar,
that explains the concept of encrypting/decrypting in memory and just feed the 
SSL object with data and retrieve data from it afterwards.
This method is needed as I have a special cross platform socket implementation 
that is not supported by OpenSSL.

(Or even better, anyone knows what's wrong with my current code? see above)

/Desperate Tommy
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to