KeyExchangeAlgorithm.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls
  5. {
  6. /// <summary>RFC 2246</summary>
  7. /// <remarks>
  8. /// Note that the values here are implementation-specific and arbitrary. It is recommended not to depend on the
  9. /// particular values (e.g. serialization).
  10. /// </remarks>
  11. public abstract class KeyExchangeAlgorithm
  12. {
  13. /*
  14. * NOTE: We interpret TLS 1.3 cipher suites as having a NULL key exchange
  15. */
  16. public const int NULL = 0;
  17. public const int RSA = 1;
  18. public const int RSA_EXPORT = 2;
  19. public const int DHE_DSS = 3;
  20. public const int DHE_DSS_EXPORT = 4;
  21. public const int DHE_RSA = 5;
  22. public const int DHE_RSA_EXPORT = 6;
  23. public const int DH_DSS = 7;
  24. public const int DH_DSS_EXPORT = 8;
  25. public const int DH_RSA = 9;
  26. public const int DH_RSA_EXPORT = 10;
  27. public const int DH_anon = 11;
  28. public const int DH_anon_EXPORT = 12;
  29. /*
  30. * RFC 4279
  31. */
  32. public const int PSK = 13;
  33. public const int DHE_PSK = 14;
  34. public const int RSA_PSK = 15;
  35. /*
  36. * RFC 4429
  37. */
  38. public const int ECDH_ECDSA = 16;
  39. public const int ECDHE_ECDSA = 17;
  40. public const int ECDH_RSA = 18;
  41. public const int ECDHE_RSA = 19;
  42. public const int ECDH_anon = 20;
  43. /*
  44. * RFC 5054
  45. */
  46. public const int SRP = 21;
  47. public const int SRP_DSS = 22;
  48. public const int SRP_RSA = 23;
  49. /*
  50. * RFC 5489
  51. */
  52. public const int ECDHE_PSK = 24;
  53. /*
  54. * GMT 0024-2014
  55. */
  56. public const int SM2 = 25;
  57. }
  58. }
  59. #pragma warning restore
  60. #endif