-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.InvalidOperationException : The client certificate is not provided. #458
Comments
* Added a property in BridgeClientCertificateManager to hold the thumbprint of the ClientCertificate so that a test case can get it. * Test sets the DnsEndpointIdentity to "localhost" which means this will only work when the Bridge and the test run on the same machine. * Hong has a PR that adds a resource to the Bridge that will return the server Identity. I will update this PR to use that Resource once her PR is merged, before I merge this one. * Test currently fails due to Issue dotnet#458, added ActiveIssue
* Added a property in BridgeClientCertificateManager to hold the thumbprint of the ClientCertificate so that a test case can get it. * Test sets the DnsEndpointIdentity to "localhost" which means this will only work when the Bridge and the test run on the same machine. * Hong has a PR that adds a resource to the Bridge that will return the server Identity. I will update this PR to use that Resource once her PR is merged, before I merge this one. * Test currently fails due to Issue dotnet#458, added ActiveIssue
I think this one's on me 😄 |
Setting service certificate is having the same issue. This is a simple wire fix. if (other._clientCertificate != null) |
The protected constructor and MakeReadOnly() method does not properly clone the _clientCertificate, _serverCertificate fields Fixes dotnet#458
The test case for #Issue366 is failing due to the following exception.
System.InvalidOperationException : The client certificate is not provided. Specify a client certificate in ClientCredentials.
at System.ServiceModel.ClientCredentialsSecurityTokenManager.CreateSecurityTokenProvider(SecurityTokenRequirement tokenRequirement) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs:line 108
at System.ServiceModel.Channels.SslStreamSecurityUpgradeInitiator..ctor(SslStreamSecurityUpgradeProvider parent, EndpointAddress remoteAddress, Uri via) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs:line 478
at System.ServiceModel.Channels.SslStreamSecurityUpgradeProvider.CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs:line 225
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.d__10.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\FramingChannels.cs:line 282
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at System.ServiceModel.Channels.ConnectionPoolHelper.<EstablishConnectionAsync>d__15.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ConnectionPoolHelper.cs:line 113 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.d__14.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\FramingChannels.cs:line 368
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at System.ServiceModel.Channels.CommunicationObject.d__71.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\CommunicationObject.cs:line 348
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at System.ServiceModel.Channels.ServiceChannel.d__149.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannel.cs:line 1351
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at System.ServiceModel.Channels.CommunicationObject.d__71.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\CommunicationObject.cs:line 348
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at System.ServiceModel.Channels.CommunicationObject.d__70.MoveNext() in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\CommunicationObject.cs:line 323
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at System.Runtime.TaskHelpers.WaitForCompletion(Task task) in C:\OSS\wcf\src\System.Private.ServiceModel\src\Internals\System\Runtime\TaskHelpers.cs:line 184
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\CommunicationObject.cs:line 317
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannel.cs:line 1976
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannel.cs:line 2043
at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannel.cs:line 502
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannel.cs:line 747
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannel.cs:line 722
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(MethodCall methodCall, ProxyOperationRuntime operation) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannelProxy.cs:line 371
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(MethodInfo targetMethod, Object[] args) in C:\OSS\wcf\src\System.Private.ServiceModel\src\System\ServiceModel\Channels\ServiceChannelProxy.cs:line 139
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
at generatedProxy_1.Echo(String )
at Tcp_ClientCredentialTypeTests.TcpClientCredentialType_Certificate_EchoString() in C:\OSS\wcf\src\System.Private.ServiceModel\tests\Scenarios\Security\TransportSecurity\Tcp\ClientCredentialTypeTests.cs:line 158
The text was updated successfully, but these errors were encountered: