具有AES 256支持的HttpWebRequest [英] HttpWebRequest with AES 256 support
问题描述
我们有一个.net win表格应用程序,并从服务器下载配置文件.
我们要求仅支持TLS_RSA_WITH_AES_256_CBC_SHA256密码套件.
我们的应用程序使用客户端PC中可用的默认加密算法来启动与服务器的连接.
我可以限制我们的客户端组件仅支持TLS_RSA_WITH_AES_256_CBC_SHA256密码套件吗,因此,如果客户端不支持TLS_RSA_WITH_AES_256_CBC_SHA256密码套件,那么它将无法连接.
应用框架:.net 3.5
Windows支持的版本:Windows 7/8/10
We have a .net win forms application and downloading configuration files from server.
We have a requirement to support only TLS_RSA_WITH_AES_256_CBC_SHA256 cipher suite.
Our application is using default encryption algorithms available in client PC to initiate connection with server.
Can i restrict our client component to support only TLS_RSA_WITH_AES_256_CBC_SHA256 cipher suite, So that if TLS_RSA_WITH_AES_256_CBC_SHA256 cipher suite is not supported by client then it should fail to connect.
Application framework : .net 3.5
Windows Versions to support : Windows 7/8/10
代码块
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_configFileUri);
request.Credentials = CredentialCache.DefaultCredentials;
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
using (StreamWriter sw = new StreamWriter(fileName, false, Encoding.UTF8))
{
sw.Write(readStream.ReadToEnd());
sw.Flush();
sw.Close();
}
客户端和服务器密码套件:
Client and Server Cipher Suites :
推荐答案
只需禁用/删除服务器"的不需要的密码即可.按照知识库文章的指示 此处.本文底部包含有关更高版本Windows系统的信息.
Just disable/remove the unwanted ciphers for "server" as instructed by KB article here. The bottom of the article contains information for later Windows systems.
这篇关于具有AES 256支持的HttpWebRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!