SSL Fix by default, Added support of TLS 1.1 & 1.2 (#337)

* SSL Fix by default, Now use TLS (1.2, 1.1, 1) by default
* Workaround to use TLS 1.2 & 1.1 on Mono < 4.3
This commit is contained in:
JigSaw
2016-05-14 00:46:56 +02:00
parent b29c578adb
commit 28199ab4be
4 changed files with 197 additions and 175 deletions

View File

@@ -1,13 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
namespace CurlSharp
{
/// <summary>
/// Our SSL FIX for CURL contain authorized Ciphers for SSL Communications
/// </summary>
public class SSLFix
{
public const string CipherList = "rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha";
// Our CiphersList
private static readonly ReadOnlyCollection<string> Ciphers = new ReadOnlyCollection<string>( new[] {
// Default supported ciphers by Jackett
"rsa_aes_128_sha",
"ecdhe_rsa_aes_256_sha",
"ecdhe_ecdsa_aes_128_sha"
});
/// <summary>
/// List of ciphers supported by Jackett
/// </summary>
/// <returns>Formatted string of ciphers</returns>
public static string CiphersList()
{
// Comma-Separated list of ciphers
return string.Join(",", Ciphers);
}
}
}