CertificateConfig.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Security.Cryptography.X509Certificates;
  6. namespace SuperSocket.SocketBase.Config
  7. {
  8. /// <summary>
  9. /// Certificate config model class
  10. /// </summary>
  11. [Serializable]
  12. public class CertificateConfig : ICertificateConfig
  13. {
  14. #region ICertificateConfig Members
  15. /// <summary>
  16. /// Gets/sets the file path.
  17. /// </summary>
  18. public string FilePath { get; set; }
  19. /// <summary>
  20. /// Gets/sets the password.
  21. /// </summary>
  22. public string Password { get; set; }
  23. /// <summary>
  24. /// Gets/sets the the store where certificate locates.
  25. /// </summary>
  26. /// <value>
  27. /// The name of the store.
  28. /// </value>
  29. public string StoreName { get; set; }
  30. /// <summary>
  31. /// Gets/sets the store location of the certificate.
  32. /// </summary>
  33. /// <value>
  34. /// The store location.
  35. /// </value>
  36. public StoreLocation StoreLocation { get; set; }
  37. /// <summary>
  38. /// Gets/sets the thumbprint.
  39. /// </summary>
  40. public string Thumbprint { get; set; }
  41. /// <summary>
  42. /// Gets/sets a value indicating whether [client certificate required].
  43. /// </summary>
  44. /// <value>
  45. /// <c>true</c> if [client certificate required]; otherwise, <c>false</c>.
  46. /// </value>
  47. public bool ClientCertificateRequired { get; set; }
  48. /// <summary>
  49. /// Gets/sets a value that will be used to instantiate the X509Certificate2 object in the CertificateManager
  50. /// </summary>
  51. public X509KeyStorageFlags KeyStorageFlags { get; set; }
  52. #endregion
  53. }
  54. }