Crash is observed while calling HTTPS get multipletime

Please post support and help requests here.
harendra
Posts: 1
Joined: 31 Aug 2017, 09:24

Crash is observed while calling HTTPS get multipletime

Postby harendra » 12 Sep 2017, 19:27

Hi Experts,

I am using POCONETSSL for making a HTTPSclient. Below is the code I wrote
==========================
AWSRESTapi::scan()
{
..
..
..
try
{
const Context::Ptr context = new Context(Context::CLIENT_USE, "", "", "", Context::VERIFY_NONE, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
HTTPSClientSession http_session(uri.getHost(), uri.getPort(), context);
HTTPRequest request(HTTPRequest::HTTP_GET, canonical_uri+"?"+query_string, HTTPMessage::HTTP_1_1);
request.setContentType("application/octet-stream");
request.add("Accept", "*/*");
request.add("Accept-Encoding", "gzip, deflate");

cout << "Request formed" << endl;
http_session.sendRequest(request);
cout << "Request sent" << endl;
//X509Certificate cert = http_session.serverCertificate();
//cout << "Cert common name : " << cert.commonName() << endl;

HTTPResponse response;
istream& response_body_stream = http_session.receiveResponse(response);
cerr << "server response: " << response.getStatus() << ' ' << response.getReason() << endl;
}
catch ( const Poco::Net::SSLException& e )
{
std::cerr << e.what() << ": " << e.message() << std::endl;
}
catch(const Poco::Exception& e)
{
std::cerr << e.what() << ": " << e.displayText() << std::endl;
}
catch( const std::exception& e )
{
std::cerr << "Caught exception: " << e.what() << std::endl;;
}
}
============================

When I start running this code I am getting the crash as follows. can some one please help me solve this problem. What is am I missing?
>>>>>>>>>>>>
1. (gdb) bt
2. #0 0x00007ffff60b7428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
3. #1 0x00007ffff60b902a in __GI_abort () at abort.c:89
4. #2 0x00007ffff690e84d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
5. #3 0x00007ffff690c6b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
6. #4 0x00007ffff690b6a9 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
7. #5 0x00007ffff690c005 in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
8. #6 0x00007ffff6678f83 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
9. #7 0x00007ffff6679487 in _Unwind_Resume () from /lib/x86_64-linux-gnu/libgcc_s.so.1
10. #8 0x00007ffff3e1aa96 in Poco::Net::Context::~Context() () from /usr/local/lib/libPocoNetSSL.so.23
11. #9 0x00007ffff3e1aaa9 in Poco::Net::Context::~Context() () from /usr/local/lib/libPocoNetSSL.so.23
12. #10 0x00007ffff407a75f in Poco::AutoPtr<Poco::Net::Context>::~AutoPtr (this=<synthetic pointer>, __in_chrg=<optimized out>) at /usr/local/include/Poco/AutoPtr.h:92
13. #11 AWSRESTapi::scan (this=<optimized out>, scanstr=..., scan_key_limit=<optimized out>) at ../cm_io_s3/cm_io_s3.cpp:127
>>>>>>>>>>>>>>>>>>>>>

Return to “Support”

Who is online

Users browsing this forum: No registered users and 1 guest

cron