Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CONTEXT()

static SafeFreeCertContext System.Net.SSPIWrapper.QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CONTEXT ( ISSPIInterface secModule,
SafeDeleteContext securityContext )
inlinestatic

Definition at line 389 of file SSPIWrapper.cs.

390 {
391 Span<IntPtr> span = stackalloc IntPtr[1];
392 SafeHandle refHandle;
393 int num = secModule.QueryContextAttributes(securityContext, global::Interop.SspiCli.ContextAttribute.SECPKG_ATTR_REMOTE_CERT_CONTEXT, MemoryMarshal.AsBytes(span), typeof(SafeFreeCertContext), out refHandle);
394 if (num != 0)
395 {
396 refHandle?.Dispose();
397 if (System.Net.NetEventSource.Log.IsEnabled())
398 {
399 System.Net.NetEventSource.Error(null, $"ERROR = {ErrorDescription(num)}", "QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CONTEXT");
400 }
401 return null;
402 }
403 return (SafeFreeCertContext)refHandle;
404 }
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)

References System.Runtime.InteropServices.SafeHandle.Dispose(), System.Net.NetEventSource.Error(), System.Net.NetEventSource.Log, and System.Net.ISSPIInterface.QueryContextAttributes().

Referenced by System.Net.CertificateValidationPal.GetRemoteCertificate().