liuzongquan / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
0 stars 0 forks source link

Calling AcquireCredentialsHandle using unicode strings #167

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
According to [1], function AcquireCredentialsHandle should be called using 
unicode strings:

' #Remarks
'
' [...]
'
' - The two string parameters must be Unicode strings.

So instead of using a regular char*, shouldn't 
`serf__spnego_create_sec_context() ` use a wchar_t pointer like this:

const wchar_t* sspi_package = L"Negotiate"; /* or L"NTLM" */


[1] 
https://msdn.microsoft.com/en-us/library/windows/desktop/aa374712(v=vs.85).aspx

Original issue reported on code.google.com by benjamin...@gmail.com on 15 Jun 2015 at 10:49

GoogleCodeExporter commented 9 years ago
Serf uses ansi version of AcquireCredentialsHandle - 
AcquireCredentialsHandleA() since revision r2005.

Original comment by i...@visualsvn.com on 15 Jun 2015 at 11:17

GoogleCodeExporter commented 9 years ago
Oh sry, somehow missed that trailing A. Thanks for your quick response!

Original comment by benjamin...@gmail.com on 15 Jun 2015 at 11:56

GoogleCodeExporter commented 9 years ago
Now I see... I was using the latest tagged serf version (1.3.8), which isn't 
yet calling the ansi version of that method.

r2005 was committed 3 days after the 1.3.x branch has been created and it seems 
it never has been merged. Is this intended for compatibility considerations? Or 
do you think it was just forgotten and could be merged?

Original comment by benjamin...@gmail.com on 15 Jun 2015 at 1:51

GoogleCodeExporter commented 9 years ago
I think it just forgotten. I don't see reasons why this change cannot be merged 
to 1.3.x branch.

Original comment by chemodax@gmail.com on 15 Jun 2015 at 2:33

GoogleCodeExporter commented 9 years ago
Closing as fixed, to be included in the 1.4.0 release.

Original comment by lieven.govaerts@gmail.com on 19 Aug 2015 at 6:52