//Check if the curlCode is CURLE_OK
if (curlCode == CURLE_OK)
{
+ SysLog(NID_NET_HTTP, "The curlCode is CURLE_OK.");
+
+ _HttpSslInfo* pSSLInfo = _HttpUtility::GetSslCertInfo(pHttpTransactionUserData->GetSocketFd());
+
+ if (pSSLInfo != null)
+ {
+ if (pSSLInfo->GetCertificateVerificationFlag() == HTTP_CV_FLAG_MANUAL)
+ {
+ r = _HttpUtility::RemoveSslCertInfo(*pSSLInfo);
+ if (IsFailed(r))
+ {
+ SysLogException(NID_NET_HTTP, E_SYSTEM, "[E_SYSTEM] Failed to remove the server cert.");
+ }
+
+ SysLog(NID_NET_HTTP, "The server certificate is removed.");
+ }
+ }
+
int readBodySize = 0;
if (!pHttpTransactionImpl->IsHeaderEventFired())
return __pHttpSessionImpl;
}
+_HttpTransactionImpl*
+_HttpTransactionEvent::GetHttpTransactionImpl(void) const
+{
+ return __pHttpTransactionImpl;
+}
+
result
_HttpTransactionEvent::FireTransactionReadyToReadEvent(int readBodyLength, bool async)
{
_HttpSessionImpl* GetHttpSessionImpl(void) const;
+ _HttpTransactionImpl* GetHttpTransactionImpl(void) const;
+
result FireTransactionReadyToReadEvent(int readBodyLength, bool async = false);
result FireTransactionReadyToWriteEvent(int recommenedLength, bool async = false);
if (pExistSslInfo != null)
{
+ SysLog(NID_NET_HTTP, "The SslInfo is existed.");
+
bool certVerificationResult = false;
_HttpTransactionEvent* pHttpTransactionEvent = pExistSslInfo->GetHttpTransactionEvent();
SysTryReturn(NID_NET_HTTP, pHttpTransactionEvent != null, 0, E_SYSTEM, "[E_SYSTEM] pHttpTransactionEvent must not be null.");
+ _HttpTransactionImpl* pHttpTransactionImpl = pHttpTransactionEvent->GetHttpTransactionImpl();
+ SysTryReturn(NID_NET_HTTP, pHttpTransactionImpl != null, 0, E_SYSTEM, "[E_SYSTEM] pHttpTransactionImpl must not be null.");
+
+ if (pHttpTransactionImpl->GetServerCertificateVerification() != HTTP_CV_FLAG_MANUAL)
+ {
+ SysLog(NID_NET_HTTP, "The server certificate verification is not HTTP_CV_FLAG_MANUAL.");
+ return 1;
+ }
+
if (pHttpTransactionEvent->GetCertRequestedResult())
{
SysLog(NID_NET_HTTP, "The certificate verification is already resumed.");
} else
{
+ SysLog(NID_NET_HTTP, "The SslInfo is not existed.");
+
// The certificateFlag is HTTP_CV_FLAG_AUTOMATIC.
if (error != X509_V_OK)
{