CertificateEngineProperties.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using InABox.Core;
  2. namespace PRSServer
  3. {
  4. public class CertificateEngineProperties : ServerProperties
  5. {
  6. [NullEditor]
  7. public const string LetsEncryptV2StagingEndpoint = "https://acme-staging-v02.api.letsencrypt.org/";
  8. [NullEditor]
  9. public const string LetsEncryptV2Endpoint = "https://acme-v02.api.letsencrypt.org/";
  10. [NullEditor]
  11. public const int DefaultRsaKeySize = 2048;
  12. [NullEditor]
  13. public const int DefaultEcKeySize = 256;
  14. [EditorSequence(1)]
  15. [TextBoxEditor]
  16. [Caption("Domain Name(s) to Register:")]
  17. public string DomainNames { get; set; }
  18. [EditorSequence(2)]
  19. [TextBoxEditor]
  20. [Caption("Contact Email for Let's Encrypt")]
  21. public string AccountContactEmails { get; set; }
  22. [NullEditor]
  23. public string AcmeRootDir { get; set; } = "_acmesharp";
  24. [NullEditor]
  25. public string CaUrl { get; set; } = LetsEncryptV2Endpoint;
  26. [NullEditor]
  27. public string AccountKeyAlgor { get; set; } = "ec";
  28. [NullEditor]
  29. public int? AccountKeySize { get; set; }
  30. [NullEditor]
  31. public bool AcceptTermsOfService { get; set; }
  32. [NullEditor]
  33. public bool TestChallenges { get; }
  34. [NullEditor]
  35. public string CertificateKeyAlgor { get; set; } = "ec";
  36. [NullEditor]
  37. public int? CertificateKeySize { get; set; }
  38. [NullEditor]
  39. public int WaitForAuthorizations { get; set; } = 60;
  40. [NullEditor]
  41. public int WaitForCertificate { get; set; } = 60;
  42. public override ServerType Type()
  43. {
  44. return ServerType.Certificate;
  45. }
  46. public CertificateEngineProperties()
  47. {
  48. AcceptTermsOfService = true;
  49. DomainNames = "";
  50. AccountContactEmails = "";
  51. }
  52. }
  53. }