PlatformDetection.cs 856 B

123456789101112131415161718192021
  1. namespace System
  2. {
  3. static partial class PlatformDetection
  4. {
  5. public static bool IsOSX => true;
  6. public static bool IsDebian => false;
  7. internal static bool IsSsl2AndSsl3Supported => false;
  8. /*
  9. * Use of these properties should be strictly limited to the `System.Net.Http` tests.
  10. *
  11. * Please do not move them into the shared PlatformDetection part or use them outside
  12. * this directory without previously talking to me (Martin Baulig ([email protected]))
  13. * as I plan to eventually remove / replace them with a more robust mechanism.
  14. */
  15. public static Version OpenSslVersion => new Version (-1, 0);
  16. public static bool SupportsX509Chain => UsingBtls;
  17. public static bool SupportsCertRevocation => !UsingBtls;
  18. public static bool UsingBtls => string.Equals (Environment.GetEnvironmentVariable ("MONO_TLS_PROVIDER"), "btls");
  19. }
  20. }