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

◆ QueryStringContextAttributes() [2/2]

static string System.Net.SSPIWrapper.QueryStringContextAttributes ( System::Net::ISSPIInterface secModule,
System::Net::Security::SafeDeleteContext securityContext,
global::Interop::SspiCli::ContextAttribute contextAttribute )
inlinestatic

Definition at line 172 of file SSPIWrapper.cs.

173 {
174 Span<IntPtr> span = stackalloc IntPtr[1];
175 SafeHandle refHandle;
176 int num = secModule.QueryContextAttributes(securityContext, contextAttribute, MemoryMarshal.AsBytes(span), typeof(System.Net.Security.SafeFreeContextBuffer), out refHandle);
177 using (refHandle)
178 {
179 if (num != 0)
180 {
181 if (System.Net.NetEventSource.Log.IsEnabled())
182 {
183 System.Net.NetEventSource.Error(null, $"ERROR = {ErrorDescription(num)}", "QueryStringContextAttributes");
184 }
185 return null;
186 }
187 string text = Marshal.PtrToStringUni(refHandle.DangerousGetHandle());
188 if (System.Net.NetEventSource.Log.IsEnabled())
189 {
190 System.Net.NetEventSource.Info(null, text, "QueryStringContextAttributes");
191 }
192 return text;
193 }
194 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static unsafe? string PtrToStringUni(IntPtr ptr)
Definition Marshal.cs:652
int QueryContextAttributes(System.Net.Security.SafeDeleteContext phContext, global::Interop.SspiCli.ContextAttribute attribute, Span< byte > buffer, Type handleType, out SafeHandle refHandle)

References System.Runtime.InteropServices.SafeHandle.DangerousGetHandle(), System.Net.NetEventSource.Error(), System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.Runtime.InteropServices.Marshal.PtrToStringUni(), and System.text.

Referenced by System.Net.Security.NegotiateStreamPal.QueryContextAssociatedName(), System.Net.Security.NegotiateStreamPal.QueryContextClientSpecifiedSpn(), and System.Net.Security.NegotiateStreamPal.QueryContextClientSpecifiedSpn().