KeyPurposeId.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
  4. {
  5. /**
  6. * The KeyPurposeID object.
  7. * <pre>
  8. * KeyPurposeID ::= OBJECT IDENTIFIER
  9. * </pre>
  10. */
  11. public sealed class KeyPurposeID
  12. : DerObjectIdentifier
  13. {
  14. private const string IdKP = "1.3.6.1.5.5.7.3";
  15. private KeyPurposeID(
  16. string id)
  17. : base(id)
  18. {
  19. }
  20. public static readonly KeyPurposeID AnyExtendedKeyUsage = new KeyPurposeID(X509Extensions.ExtendedKeyUsage.Id + ".0");
  21. public static readonly KeyPurposeID IdKPServerAuth = new KeyPurposeID(IdKP + ".1");
  22. public static readonly KeyPurposeID IdKPClientAuth = new KeyPurposeID(IdKP + ".2");
  23. public static readonly KeyPurposeID IdKPCodeSigning = new KeyPurposeID(IdKP + ".3");
  24. public static readonly KeyPurposeID IdKPEmailProtection = new KeyPurposeID(IdKP + ".4");
  25. public static readonly KeyPurposeID IdKPIpsecEndSystem = new KeyPurposeID(IdKP + ".5");
  26. public static readonly KeyPurposeID IdKPIpsecTunnel = new KeyPurposeID(IdKP + ".6");
  27. public static readonly KeyPurposeID IdKPIpsecUser = new KeyPurposeID(IdKP + ".7");
  28. public static readonly KeyPurposeID IdKPTimeStamping = new KeyPurposeID(IdKP + ".8");
  29. public static readonly KeyPurposeID IdKPOcspSigning = new KeyPurposeID(IdKP + ".9");
  30. //
  31. // microsoft key purpose ids
  32. //
  33. public static readonly KeyPurposeID IdKPSmartCardLogon = new KeyPurposeID("1.3.6.1.4.1.311.20.2.2");
  34. public static readonly KeyPurposeID IdKPMacAddress = new KeyPurposeID("1.3.6.1.1.1.1.22");
  35. }
  36. }
  37. #pragma warning restore
  38. #endif