Can someone help me with a simple example on how to authenticate against a java sasl server a windows C++ client with windows API: I mean using AcquireCredentialsHandle, InitializeSecurityContext...
The best result I got at the moment is with this configuration:
set(&credentials, "username", "password", "domain");
ss= AcquireCredentialsHandle(NULL, "WDigest", SECPKG_CRED_OUTBOUND, NULL
, &credentials, NULL, NULL, &hCred, &tsExpiry);
OutBuffers[0].pvBuffer = NULL;
OutBuffers[0].BufferType = SECBUFFER_TOKEN;
OutBuffers[0].cbBuffer = 0;
OutBuffer.cBuffers = 1;
OutBuffer.pBuffers = OutBuffers;
OutBuffer.ulVersion = SECBUFFER_VERSION;
scRet = InitializeSecurityContext(&hCred, NULL, "server", ISC_REQ_ALLOCATE_MEMORY
, 0, SECURITY_NATIVE_DREP, NULL, 0, hContext
, &OutBuffer, &dwSSPIOutFlags, &tsExpiry);
ss result is OK, and scRet is SEC_I_CONTINUE_NEEDED, but the outBuffers[0] is empty so I have nothing to send to the server to continue the authentication procedure.