+ // Get the SSL engine pointer and trust if required on certain operating systems.\r
+ \r
+#if defined(__APPLE__)\r
+ \r
+ const struct curl_tlssessioninfo *TLSInfo;\r
+ CURLcode TLSCode;\r
+ CURL *Connection = GetConnectionObject();\r
+ TLSCode = curl_easy_getinfo(Connection, CURLINFO_TLS_SSL_PTR, &TLSInfo);\r
+ \r
+ if (TLSInfo->internals != nullptr && TLSCode == CURLE_OK){\r
+ SSLCopyPeerTrust((SSLContext*)TLSInfo->internals, &SecTrustObject);\r
+ }\r
+ \r
+#elif defined(__WIN32__)\r
+\r
+ const struct curl_tlssessioninfo *TLSInfo;\r
+ CURLcode TLSCode;\r
+ CURL *Connection = GetConnectionObject();\r
+ TLSCode = curl_easy_getinfo(Connection, CURLINFO_TLS_SSL_PTR, &TLSInfo);\r
+\r
+ std::string CertName;\r
+\r
+ if (TLSInfo->internals != nullptr && TLSCode == CURLE_OK){\r
+ PCtxtHandle SSLHandle = (PCtxtHandle)TLSInfo->internals;\r
+ SECURITY_STATUS GetData = QueryContextAttributes(SSLHandle, SECPKG_ATTR_REMOTE_CERT_CONTEXT, &CertificateData);\r
+ //QueryContextAttributesA(TLSInfo->internals, SECPKG_);\r
+ }\r
+\r
+#endif\r
+ \r