public SSLInfo GetSSLInfo(IPEndPoint endpoint)
 {
     using (new HttpInitializeScope())
     {
         return(SSLInfo.Get(endpoint));
     }
 }
Exemple #2
0
 public void HasMeaningfulErrorMessageIfHttpApiNotInitialized()
 {
     try
     {
         SSLInfo.Get(0);
     }
     catch (InvalidOperationException ex)
     {
         Assert.Equal("You should first initialize HTTP Server API with HttpInitializeScope", ex.Message);
     }
 }
 public IEnumerable <SSLInfo> GetSSLInfos()
 {
     using (new HttpInitializeScope())
     {
         SSLInfo sslInfo;
         int     i = 0;
         do
         {
             sslInfo = SSLInfo.Get(i);
             if (sslInfo != null)
             {
                 yield return(sslInfo);
             }
             i++;
         } while(sslInfo != null);
     }
 }