private bool Connect(String host) { Console.WriteLine("Connecting to PractiSES root server ({0})...", host); rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root"); try { if (rootServer.Hello()) { Console.WriteLine("Connected to PractiSES root server."); } } catch (Exception e) { Console.WriteLine("Unable to connect to PractiSES root server."); return(false); } /*Console.Write("Domain Name: "); * String domainName = Console.ReadLine(); * GetCertificate(domainName);*/ return(true); }
/*private X509Certificate2 GetCertificate(String domainName) * { * return rootServer.GetCertificate(domainName); * }*/ private bool ConnectRootServer(String host) { ActionLog_Write("Connecting to PractiSES root server (" + host + ")..."); Console.WriteLine("Connecting to PractiSES root server ({0})...", host); rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root"); try { if (rootServer.Hello()) { ActionLog_Write("Connected to PractiSES root server.."); Console.WriteLine("Connected to PractiSES root server."); } } catch (Exception e) { Console.WriteLine(e.Message + "\nUnable to connect to PractiSES root server."); return(false); } return(true); }
private bool Connect(String host) { Console.WriteLine("Connecting to PractiSES root server ({0})...", host); rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root"); try { if (rootServer.Hello()) { Console.WriteLine("Connected to PractiSES root server."); } } catch(Exception e) { Console.WriteLine("Unable to connect to PractiSES root server."); return false; } /*Console.Write("Domain Name: "); String domainName = Console.ReadLine(); GetCertificate(domainName);*/ return true; }
/*private X509Certificate2 GetCertificate(String domainName) { return rootServer.GetCertificate(domainName); }*/ private bool ConnectRootServer(String host) { ActionLog_Write("Connecting to PractiSES root server (" + host + ")..."); Console.WriteLine("Connecting to PractiSES root server ({0})...", host); rootServer = (IRootServer)Activator.GetObject(typeof(IRootServer), "http://" + host + ":88/PractiSES_Root"); try { if (rootServer.Hello()) { ActionLog_Write("Connected to PractiSES root server.."); Console.WriteLine("Connected to PractiSES root server."); } } catch (Exception e) { Console.WriteLine(e.Message + "\nUnable to connect to PractiSES root server."); return false; } return true; }