在单声道中,如何控制SSL / TLS加密套件? [英] In mono, how to control the SSL/TLS cipher suite?

查看:232
本文介绍了在单声道中,如何控制SSL / TLS加密套件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将服务器配置为拒绝DES,RC4,MD5等的协商。单声道3.4发行说明说网络堆栈现在允许开发人员控制哪些密码套件与TLS / SSL配合使用。 ...但是如何?

I would like to configure the server to refuse negotation of DES, RC4, MD5, etc. The mono 3.4 release notes say "Network Stack Now allows developers to control which cipher suites to use with TLS/SSL." ... But how?

推荐答案

(感谢Sebastien Pouliot为此答案)

(Thanks to Sebastien Pouliot for this answer)

您可以为 ClientCipherSuitesCallback 或 ServerCipherSuitesCallback SSL / TLS。这将允许您控制哪些密码可以使用和选择顺序(一般来说,大多数服务器选择他们支持的第一个密码套件)。

You can set a callback for either ClientCipherSuitesCallback or ServerCipherSuitesCallback SSL/TLS. That will allow you to control which ciphers can be used and the selection order (in general most server select the first cipher suites they support).

示例代码是文档的一部分。

Sample code is part of the documentation.

此外,由于某些人可能很难找到有效的枚举,请参阅 CipherSuiteFactory.cs

And also, since it will likely be difficult for some people to find the valid enumerations, see CipherSuiteFactory.cs

这篇关于在单声道中,如何控制SSL / TLS加密套件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆