Security 如何强制在Azure服务总线中继中使用TLS 1.1或TLS 1.2
我制作了一个应用程序(用C#)连接到Azure服务总线中继,它运行良好。然而,使用WireShark,我发现服务器端和客户端都使用TLS 1.0加密,而TLS 1.0现在应该降级。如何强制它使用TLS 1.1或TLS 1.2? 是否有一个参数可以设置为指定TLS版本 下面是App.config的一部分:Security 如何强制在Azure服务总线中继中使用TLS 1.1或TLS 1.2,security,tls1.2,azure-servicebusrelay,Security,Tls1.2,Azure Servicebusrelay,我制作了一个应用程序(用C#)连接到Azure服务总线中继,它运行良好。然而,使用WireShark,我发现服务器端和客户端都使用TLS 1.0加密,而TLS 1.0现在应该降级。如何强制它使用TLS 1.1或TLS 1.2? 是否有一个参数可以设置为指定TLS版本 下面是App.config的一部分: 您可能需要安装修补程序。我发现这个问题与WCF有关:没有帮助。修补程序已经过时,因为它是其他服务包的一部分,此时不需要应用。试图通过添加以下代码强制TLS 1.2:ServicePointMan
您可能需要安装修补程序。我发现这个问题与WCF有关:没有帮助。修补程序已经过时,因为它是其他服务包的一部分,此时不需要应用。试图通过添加以下代码强制TLS 1.2:
ServicePointManager.SecurityProtocol=SecurityProtocolType.Tls12代码>也没有帮助。我仍然获得TLS 1.0您是否能够找到使用TLS 1.1+的方法?是和否。如果我使用tcp模式而不是https,则使用ServiceBusEnvironment.SystemConnectivity.mode=ConnectionItyMode.tcp代码>不涉及TLS。但是使用ServiceBusEnvironment.SystemConnectivity.Mode=ConnectivityMode.Https代码>仍将使用TLS 1.0。现在,我将只使用Tcp模式,因为它似乎速度更快。您可能需要安装修补程序。我发现这个问题与WCF有关:没有帮助。修补程序已经过时,因为它是其他服务包的一部分,此时不需要应用。试图通过添加以下代码强制TLS 1.2:ServicePointManager.SecurityProtocol=SecurityProtocolType.Tls12代码>也没有帮助。我仍然获得TLS 1.0您是否能够找到使用TLS 1.1+的方法?是和否。如果我使用tcp模式而不是https,则使用ServiceBusEnvironment.SystemConnectivity.mode=ConnectionItyMode.tcp代码>不涉及TLS。但是使用ServiceBusEnvironment.SystemConnectivity.Mode=ConnectivityMode.Https代码>仍将使用TLS 1.0。现在,我将只使用Tcp模式,因为它似乎也更快。
<services>
<service name="GatewayServer.GatewayService">
<endpoint address="sb://myowntest.servicebus.windows.net" binding="netTcpRelayBinding" contract="GatewayServer.IGateway" behaviorConfiguration="gateway"/>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="gateway">
<transportClientEndpointBehavior>
<tokenProvider>
<sharedAccessSignature keyName="RootManageSharedAccessKey" key="myveryownkey=" />
</tokenProvider>
</transportClientEndpointBehavior>
</behavior>
</endpointBehaviors>
</behaviors>
ServiceHost sh = null;
sh = new ServiceHost(typeof(GatewayService));
sh.Open();