395 {
396 int num = -2146893055;
397 try
398 {
399 bool success = false;
400 inCredentials.DangerousAddRef(ref success);
402 global::Interop.SspiCli.CredHandle credentialHandle = inCredentials._handle;
403 global::Interop.SspiCli.CredHandle credHandle = outContext.
_handle;
404 void* ptr = (credHandle.IsZero ? null : (&credHandle));
405 isContextAbsent = ptr == null;
406 num = global::Interop.SspiCli.AcceptSecurityContext(ref credentialHandle, ptr, inputBuffer, inFlags, endianness, ref outContext.
_handle, ref outputBuffer, ref outFlags, out var _);
407 }
408 finally
409 {
411 {
413 outContext._EffectiveCredential = inCredentials;
414 }
415 else
416 {
417 inCredentials.DangerousRelease();
418 }
420 }
421 if (handleTemplate != null)
422 {
423 handleTemplate.
Set(((global::Interop.SspiCli.SecBuffer*)outputBuffer.pBuffers)->pvBuffer);
425 {
427 }
428 }
429 if (isContextAbsent && (num & 0x80000000u) != 0
L)
430 {
431 outContext.
_handle.SetToInvalid();
432 }
433 return num;
434 }
global::Interop.SspiCli.CredHandle _handle
System.Net.Security.SafeFreeCredentials _EffectiveCredential
void DangerousAddRef(ref bool success)
void SetHandleAsInvalid()