Access violation while deleting ssl socket
I just upgraded the boost libraries from 1.43 to 1.53 and switched from a 32bit build to a 64bit build. The code worked fine before the upgrade but in 1.53 I am getting an out of access violation while trying to delete the sslSocket. Here is a sample of the code: ssl::streamip::tcp::socket* sslSocket = (ssl::streamip::tcp::socket*) NULL; sslSocket = new ssl::streamip::tcp::socket(io_service, ctx); sslSocket->lowest_layer().connect(*endpoint_iterator, error); sslSocket->handshake(ssl::stream_base::client); sslSocket->shutdown(); delete sslSocket; //This throws the exception I also tried doing this and several variations of it but I still have the same issue: sslSocket->lowest_layer().cancel(); sslSocket->lowest_layer().shutdown(boost::asio::ip::tcp::socket::shutdown_both,EC); sslSocket->lowest_layer().close(); delete sslSocket; I read through the documentation and the examples but didn't see anything that describes how to do this properly. Does anyone know why this wouldn't work or the proper way to close the SSL connection? I can provide more of the code if that would be helpful. Thanks, Dan Martinell Application Security Boeing Information Security cell: 425-283-6712
participants (1)
-
Martinell, Dan F