public void ResolveCert(string domain) { IEnumerable <CertRecord> certs = m_client.ResolveCERTFromNameServer(domain); Assert.True(certs != null, domain); Assert.NotNull(certs.FirstOrDefault()); }
X509Certificate2Collection ResolveDomain(DnsClient client, string name) { name = name.Replace('@', '.'); try { IEnumerable <CertRecord> records; if (m_useRootForCertResolve) { records = client.ResolveCERTFromNameServer(name); } else { records = client.ResolveCERT(name); } if (records != null) { return(CollectCerts(null, records)); } } catch (DnsServerException dnsEx) { if (dnsEx.ResponseCode != DnsStandard.ResponseCode.Refused) { throw; } } catch (Exception ex) { this.Error.NotifyEvent(this, ex); throw; } return(null); }