Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
The exception:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Where the exception occurred:
cpprestsdk.v142.2.10.15\include\cpprest\asyncrt_utils.h
template<typename _Type, typename _Arg1, typename _Arg2>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2)
{
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2)));
}
The environment:
windows 10 , vs 2017, sdk10.0.18362.0, cpprestsdk.v142.2.10.15, debug, x86,boost_1_71_0
My code:
bool verify_certificate(bool bPreverified, boost::asio::ssl::verify_context& ctx)
{
char szSubjectName[256] = { 0 };
X509* pCert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
X509_NAME_oneline(X509_get_subject_name(pCert), szSubjectName, sizeof(szSubjectName));
return bPreverified;
}