I am working on developing an SMTP client to connect with Gmail via TLS 1.x, but I am getting an error from AcquireCredentialsHandle()
and displaying an error like "Error 0x80090308 returned by InitializeSecurityContext"
:
Status = g_pSSPI->AcquireCredentialsHandle(
NULL, // Name of principal
(SEC_WCHAR*) UNISP_NAME_A, // Name of package
SECPKG_CRED_OUTBOUND, // Flags indicating use
NULL, // Pointer to logon ID
&SchannelCred, // Package specific data
NULL, // Pointer to GetKey() func
NULL, // Value to pass to GetKey()
phCreds, // (out) Cred Handle
&tsExpiry ); // (out) Lifetime (optional)
if(Status != SEC_E_OK)
printf("**** Error 0x%x returned by AcquireCredentialsHandle\n", Status);
Can anyone provide me a working SMTP client with TLS by using SChannel? I have tried with a sample available on the Internet, but unfortunately it didn't work.
User contributions licensed under CC BY-SA 3.0