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

◆ GenerateToken()

SecurityStatusPal System.Net.Security.SecureChannel.GenerateToken ( ReadOnlySpan< byte > inputBuffer,
ref byte[] output )
inlineprivate

Definition at line 564 of file SecureChannel.cs.

565 {
566 byte[] outputBuffer = Array.Empty<byte>();
567 SecurityStatusPal result = default(SecurityStatusPal);
568 bool flag = false;
569 byte[] thumbPrint = null;
570 try
571 {
572 do
573 {
574 thumbPrint = null;
576 {
577 flag = (_sslAuthenticationOptions.IsServer ? AcquireServerCredentials(ref thumbPrint) : AcquireClientCredentials(ref thumbPrint));
578 }
579 result = ((!_sslAuthenticationOptions.IsServer) ? SslStreamPal.InitializeSecurityContext(ref _credentialsHandle, ref _securityContext, _sslAuthenticationOptions.TargetHost, inputBuffer, ref outputBuffer, _sslAuthenticationOptions) : SslStreamPal.AcceptSecurityContext(ref _credentialsHandle, ref _securityContext, inputBuffer, ref outputBuffer, _sslAuthenticationOptions));
580 }
581 while (flag && _credentialsHandle == null);
582 }
583 finally
584 {
586 {
590 {
592 }
593 }
594 }
595 output = outputBuffer;
596 return result;
597 }
bool AcquireServerCredentials(ref byte[] thumbPrint)
SafeDeleteSslContext _securityContext
SafeFreeCredentials _credentialsHandle
bool AcquireClientCredentials(ref byte[] thumbPrint)
readonly SslAuthenticationOptions _sslAuthenticationOptions

References System.Net.Security.SecureChannel._credentialsHandle, System.Net.Security.SecureChannel._refreshCredentialNeeded, System.Net.Security.SecureChannel._securityContext, System.Net.Security.SecureChannel._sslAuthenticationOptions, System.Net.Security.SslStreamPal.AcceptSecurityContext(), System.Net.Security.SecureChannel.AcquireClientCredentials(), System.Net.Security.SecureChannel.AcquireServerCredentials(), System.Net.Security.SslSessionsCache.CacheCredential(), System.Runtime.InteropServices.SafeHandle.Dispose(), System.Net.Security.SslAuthenticationOptions.EnabledSslProtocols, System.Net.Security.SslAuthenticationOptions.EncryptionPolicy, System.Net.Security.SslStreamPal.InitializeSecurityContext(), System.Net.Security.SafeDeleteContext.IsInvalid, System.Net.Security.SafeFreeCredentials.IsInvalid, System.Net.Security.SslAuthenticationOptions.IsServer, and System.Net.Security.SslAuthenticationOptions.TargetHost.

Referenced by System.Net.Security.SecureChannel.GenerateAlertToken(), and System.Net.Security.SecureChannel.NextMessage().