-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further amendment to #114 #128
Conversation
Where relevant, tokens are obtained in a loop with an increasing buffer size as long as SEC_E_BUFFER_TOO_SMALL or SEC_E_INSUFFICIENT_MEMORY is returned.
…MEMORY, because even though the MSDN docs don't indicate that this error can occur when calling InitializeSecurityContext, it certainly can.
I don't think we should merge it. First, I do think that we should make the change in all the code, .NET and Java if they were to be, but furthermore I think we should figure out why this is returning an error that is not documented in MSDN. In my experience this has been a side effect of a bigger problem :) |
I will have to run with my own patched version then. I have returned to Australia so it's impossible for me to diagnose further with the user in question (not that I'd have any ideas how to pin this down any further than it already is). I work for an investment bank, and you wouldn't believe the hoops I have to jump through to do this stuff. |
I understand, thx @kentcb. |
I just wanted to chime in here with some info I found. I've been working on a separate project that integrates with SChannel and Through various testing, I've tracked it down to the
Sometimes a server will send a value for I've confirmed this to happen on Windows 7 and Windows 8.1. I have not confirmed on Windows 10 yet. It seems the solutions to this include:
|
This has been merged on bdc8ca5 |
Alas, I was correct in saying I had seen
SEC_E_BUFFER_TOO_SMALL
being returned byInitializeSecurityContext
. Here is a stack trace from my user:Thus, I have re-added the code that treats
SEC_E_BUFFER_TOO_SMALL
the same asSEC_E_INSUFFICIENT_MEMORY
. I realize MSDN does not indicate this error is possible from that function, but it certainly is. I have already tested the above change for my user, and all is good.It would probably be good for someone to update the Java code too...?