/// <summary> /// Initializes a new instance of the <see cref="Certiply.CertesWrapper"/> class. /// </summary> /// <param name="certManager">An <see cref="Certiply.ICertManager"/> instance to manage the account, order, and certificate data</param> public CertesWrapper(ICertManager certManager) { if (certManager == null) { throw new ArgumentNullException(nameof(certManager)); } Init(certManager, WellKnownServers.LetsEncryptV2, _CancellationSource.Token); }
/// <summary> /// Initializes a new instance of the <see cref="T:Certiply.CertesWrapper"/> class. /// </summary> /// <param name="certManager">An <see cref="Certiply.ICertManager"/> instance to manage the account, order, and certificate data</param> /// <param name="letsEncryptServer">The Let's Encrypt server URI. Defaults to production V2.</param> public CertesWrapper(ICertManager certManager, Uri letsEncryptServer, CancellationToken cancellationToken) { if (certManager == null) { throw new ArgumentNullException(nameof(certManager)); } if (letsEncryptServer == null || string.IsNullOrWhiteSpace(letsEncryptServer.ToString())) { throw new ArgumentNullException(nameof(letsEncryptServer)); } Init(certManager, letsEncryptServer, cancellationToken); }
void Init(ICertManager certManager, Uri letsEncryptServer, CancellationToken cancellationToken) { _CertManager = certManager; _LetsEncryptServer = letsEncryptServer; _CancellationToken = cancellationToken; //default configuration values CertDistinguishedName = "C=CA, ST=State, L=City, O=Dept"; DnsValidationRecordName = "_acme-challenge."; DnsCheckRetryLimit = 100; DnsCheckRetryInterval = 30; ValidationRetryLimit = 100; ValidationRetryInterval = 30; }