#define KEEPALIVE_FACTOR(x)
#endif
+/* Offered by mingw-w64 and MS SDK. Latter only when targeting Win7+. */
#if defined(USE_WINSOCK) && !defined(SIO_KEEPALIVE_VALS)
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
#ifdef USE_WINSOCK
+/* Offered by mingw-w64 v13+. MS SDK 7.0A+. */
#ifndef SIO_IDEAL_SEND_BACKLOG_QUERY
#define SIO_IDEAL_SEND_BACKLOG_QUERY 0x4004747B
#endif
#define SP_NAME_NEGOTIATE "Negotiate"
#define SP_NAME_KERBEROS "Kerberos"
+/* Offered by mingw-w64 v9+. MS SDK 7.0A+. */
#ifndef ISC_REQ_USE_HTTP_STYLE
#define ISC_REQ_USE_HTTP_STYLE 0x01000000
#endif
#define SEC_E_KDC_CERT_REVOKED ((HRESULT)0x8009035BL)
#endif
#endif /* __MINGW32CE__ */
+/* Offered by mingw-w64 v8+. MS SDK 6.0A+. */
#ifndef SEC_E_INVALID_PARAMETER
#define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
#endif
+/* Offered by mingw-w64 v8+. MS SDK 6.0A+. */
#ifndef SEC_E_DELEGATION_POLICY
#define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL)
#endif
+/* Offered by mingw-w64 v8+. MS SDK 6.0A+. */
#ifndef SEC_E_POLICY_NLTM_ONLY
#define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
#endif
#define SEC_I_NO_LSA_CONTEXT ((HRESULT)0x00090323L)
#endif
#endif /* __MINGW32CE__ */
+
+/* Offered by mingw-w64 v8+. MS SDK 6.0A+. */
#ifndef SEC_I_SIGNATURE_NEEDED
#define SEC_I_SIGNATURE_NEEDED ((HRESULT)0x0009035CL)
#endif
# ifdef _MSC_VER
# pragma comment(lib, "bcrypt.lib")
# endif
+ /* Offered by mingw-w64 v3+. MS SDK v7.0A+. */
# ifndef BCRYPT_USE_SYSTEM_PREFERRED_RNG
# define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
# endif
};
typedef struct sha256_ctx my_sha256_ctx;
+/* Offered when targeting Vista (XP SP2+) */
#ifndef CALG_SHA_256
#define CALG_SHA_256 0x0000800c
#endif
/*************** Request - specific items ************/
#if defined(USE_WINDOWS_SSPI) && defined(SECPKG_ATTR_ENDPOINT_BINDINGS)
- CtxtHandle *sslContext;
+ CtxtHandle *sslContext; /* mingw-w64 v9+. MS SDK 7.0A+. */
#endif
#ifdef USE_NTLM
* #define failf(x, y, ...) printf(y, __VA_ARGS__)
*/
+/* Offered when targeting Vista (XP SP2+) */
#ifndef CALG_SHA_256
#define CALG_SHA_256 0x0000800c
#endif
#define ALG_CLASS_DHASH ALG_CLASS_HASH
#endif
+/* Offered by mingw-w64 v4+. MS SDK 6.0A+. */
#ifndef PKCS12_NO_PERSIST_KEY
#define PKCS12_NO_PERSIST_KEY 0x00008000
#endif
+/* Offered by mingw-w64 v4+. MS SDK ~10+/~VS2017+. */
#ifndef CERT_FIND_HAS_PRIVATE_KEY
#define CERT_FIND_HAS_PRIVATE_KEY (21 << CERT_COMPARE_SHIFT)
#endif
if(ssl_connect_done == connssl->connecting_state) {
connssl->state = ssl_connection_complete;
-#ifdef SECPKG_ATTR_ENDPOINT_BINDINGS
+#ifdef SECPKG_ATTR_ENDPOINT_BINDINGS /* mingw-w64 v9+. MS SDK 7.0A+. */
/* When SSPI is used in combination with Schannel
* we need the Schannel context to create the Schannel
* binding to pass the IIS extended protection checks.
#define HAS_MANUAL_VERIFY_API
#endif
+/* These two macros are missing from mingw-w64 in UWP mode as of v13 */
#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) && \
!defined(DISABLE_SCHANNEL_CLIENT_CERT)
#define HAS_CLIENT_CERT_PATH
#define CERT_STORE_PROV_SYSTEM_W ((LPCSTR)(size_t)10)
#endif
+/* Offered by mingw-w64 v8+, MS SDK ~10+/~VS2022+ */
#ifndef SCH_CREDENTIALS_VERSION
#define SCH_CREDENTIALS_VERSION 0x00000005
DWORD dwExclusiveFlags;
};
-/* Not defined before mingw-w64 4.0.0 */
+/* Offered by mingw-w64 v4+. MS SDK ~10+/~VS2017+. */
#ifndef CERT_CHAIN_EXCLUSIVE_ENABLE_CA_FLAG
#define CERT_CHAIN_EXCLUSIVE_ENABLE_CA_FLAG 0x00000001
#endif