Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Strict tls 1.2 authentication is not happening with google.(may be other client as well) #45

Open
vimalgovind143 opened this issue May 25, 2021 · 4 comments

Comments

@vimalgovind143
Copy link

Google authentication(may be other provider as well) is not working on the strict tls 1.2 above servers.

at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at Nemiro.OAuth.OAuthUtility.ExecuteRequest(String method, String endpoint, HttpParameterCollection parameters, HttpAuthorization authorization, NameValueCollection headers, String contentType, AccessToken accessToken, Boolean allowWriteStreamBuffering, Boolean allowSendChunked, Int64 contentLength, HttpWriteRequestStream streamWriteCallback, Int32 writeBufferSize, Int32 readBufferSize, Boolean donotEncodeKeys)
--- End of inner exception stack trace ---
at Nemiro.OAuth.OAuthUtility.ExecuteRequest(String method, String endpoint, HttpParameterCollection parameters, HttpAuthorization authorization, NameValueCollection headers, String contentType, AccessToken accessToken, Boolean allowWriteStreamBuffering, Boolean allowSendChunked, Int64 contentLength, HttpWriteRequestStream streamWriteCallback, Int32 writeBufferSize, Int32 readBufferSize, Boolean donotEncodeKeys)
at Nemiro.OAuth.OAuthUtility.Post(String endpoint, HttpParameterCollection parameters, HttpAuthorization authorization, NameValueCollection headers, String contentType, AccessToken accessToken, Boolean allowWriteStreamBuffering, Boolean allowSendChunked, Int64 contentLength, HttpWriteRequestStream streamWriteCallback, Int32 writeBufferSize, Int32 readBufferSize, Boolean donotEncodeKeys)
at Nemiro.OAuth.OAuth2Client.GetAccessToken()
at Nemiro.OAuth.OAuthBase.get_AccessToken()
at Nemiro.OAuth.OAuthWeb.VerifyAuthorization(String requestId, String code)

@vimalgovind143
Copy link
Author

fixed bug of tls version setting on OAuthUtility.cs Line 496 to work on strict Tls 1.2 environment.

@jpgilchrist
Copy link

@vimalgovind143 could you do me a favor and elaborate on this fix? I have a very old legacy project that I inherited that is running into this issue. I don't see OauthUtility? Do I have to fork and modify the source code or something?

@vimalgovind143
Copy link
Author

@jpgilchrist hello, yes i have an updated source will fork this repository to my account and will update latest source .i will let u know once it is completed.

@vimalgovind143
Copy link
Author

@jpgilchrist please get the latest code from https://github.com/vimalgovind143/nemiro.oauth.dll

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants