Thank you.

I've been able to pointing it to a call to WSACleanup();
After a call to CleanupOpenSSL();

void CSmtp::CleanupOpenSSL()
{
        if(m_ssl != NULL)
        {
                SSL_shutdown (m_ssl);  /* send SSL/TLS close_notify */
                SSL_free (m_ssl);

                m_ssl = NULL;
        }

        if(m_ctx != NULL)
        {
                SSL_CTX_free (m_ctx);   
                m_ctx = NULL;

                ERR_free_strings();
                EVP_cleanup();
                CRYPTO_cleanup_all_ex_data();
        }
} 

What is curious here is that is able to run fine for a while an then it crash.
Some times take 2 minutes, sometime hours.
Look like it depends on the speed the SMTP server can proces request.
We have a client with a really slow server that made crash in less than 10 
minutes always.
But I manage to send to gmail (with same TLS) with no crash for a very long 
time.
I'm using CSMTP class from 
http://www.codeproject.com/Articles/98355/SMTP-Client-with-SSL-TLS
As base for what I've done and found no problem until that slow server came 
into the scene.

Any ideas would be appreciated.

Thanks,
 

Ludwig O'Hallorans 
Software Developer

Phone 1.786.454.8472 
Fax 1.786.363.1784 
email: [email protected]

www.magaya.com

This email message and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error, please notify the sender 
via returned email. Please note that any views or opinions expressed in this 
email are solely those of the author and do not necessarily represent those of 
the company. Although Magaya Corporation operates anti-virus programs, it does 
not accept responsibility for any damage whatsoever that is caused by viruses 
being passed. Please consider the environment before printing this email.


-----Original Message-----
From: [email protected] [mailto:[email protected]] 
On Behalf Of Jeremy Farrell
Sent: Thursday, August 15, 2013 3:24 PM
To: [email protected]
Subject: RE: Thread safe callbacks never actually called

A crash in crypto_free most likely means that some code outside the OpenSSL 
library has corrupted the heap, perhaps by freeing an area more than once or 
simply scribbling over its control data. One of the usual memory allocation 
debugging tools should be able to help you pin down the guilty party.

Regards,
               jjf


> From: Ludwig O'Hallorans [mailto:[email protected]]
> Sent: Thursday, August 15, 2013 7:45 PM
> 
> I don't mean the type, I mean the data And not, I di mutythread in C++ 
> for a while now, and work fine by the way This is the first time I use 
> OpenSSL though.
> 
> Any way in my case It shpuldn't be the same data because each time the 
> dll is call, it should have a different set of data, and how can you 
> explain the crash in crypto_free?
> For what I read this was something that shoild be patched for a while 
> already.
> 
> Regards,
> 
> 
> 
> Ludwig O'Hallorans
> Software Developer
> 
> Phone 1.786.454.8472
> Fax 1.786.363.1784
> email: [email protected]
> 
> www.magaya.com
> 
> This email message and any files transmitted with it are confidential 
> and intended solely for the use of the individual or entity to whom 
> they are addressed. If you have received this email in error, please 
> notify the sender via returned email. Please note that any views or 
> opinions expressed in this email are solely those of the author and do 
> not necessarily represent those of the company. Although Magaya 
> Corporation operates anti-virus programs, it does not accept 
> responsibility for any damage whatsoever that is caused by viruses 
> being passed. Please consider the environment before printing this 
> email.
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:owner-openssl- 
> [email protected]] On Behalf Of Salz, Rich
> Sent: Thursday, August 15, 2013 2:39 PM
> 
> > There should be a way.
> 
> There isn't.
> 
> > There are syncronization method to keep the same structure used by
> many threads at the same time, and ussually this is transaparent to 
> developers.
> 
> Are you new to multi-threaded C programming?
> 
> 
> --
> Principal Security Engineer
> Akamai Technology
> Cambridge, MA
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to