public void DeleteRemoteHost(IWCCertificate connection) { OSDMap request = connection.ToOSD(false); request["Method"] = "Delete"; OSDMap reply = WebUtils.PostToService(connection.Connection.RecieverURL, request); if (!reply["Success"].AsBoolean()) { m_log.Warn("[IWC]: Failed to delete remote host @ " + connection.Connection.RecieverURL); } }
/// <summary> /// This is the initial request to join this host /// We need to verify passwords and add sessionHashes to our database /// </summary> /// <param name="request"></param> /// <returns></returns> private byte[] Query(OSDMap request) { IWCCertificate Certificate = new IWCCertificate(); //Pull the connection info out of the request Certificate.FromOSD(request); //Lets make sure that they are allowed to connect to us if (!CertificateVerification.VerifyCertificate(Certificate)) { //Make sure the other host is not trying to spoof one of our certificates if (CertificateVerification.GetCertificateBySessionHash(Certificate.SessionHash) != null) { //SPOOF! XXXXXX return FailureResult(); } //This is an untrusted connection otherwise if (!IWC.m_allowUntrustedConnections) return FailureResult(); //We don't allow them //Give them the default untrusted connection level Certificate.TrustLevel = IWC.m_untrustedConnectionsDefaultTrust; } //Update them in the database so that they can connect again later CertificateVerification.AddCertificate(Certificate); BuildSecureUrlsForConnection(Certificate); OSDMap result = Certificate.ToOSD(false); result["Result"] = "Successful"; return Return(result); }
public void DeleteRemoteHost(IWCCertificate connection) { OSDMap request = connection.ToOSD(false); request["Method"] = "Delete"; OSDMap reply = WebUtils.PostToService (connection.Connection.RecieverURL, request, true, false); if (!reply["Success"].AsBoolean()) { m_log.Warn ("[IWC]: Failed to delete remote host @ " + connection.Connection.RecieverURL); } }
private void AddConnection(IWCCertificate c) { IWCCertificate old = null; foreach (IWCCertificate cert in Connections) { if (cert.Connection.UserName == c.Connection.UserName) { old = cert; } } if (old != null) { Connections.Remove(old); } Connections.Add(c); IGenericsConnector genericsConnector = DataManager.DataManager.RequestPlugin <IGenericsConnector> (); if (genericsConnector != null) { genericsConnector.AddGeneric(UUID.Zero, "InterWorldConnections", c.Connection.RecieverURL, c.ToOSD()); } }
private void AddConnection(IWCCertificate c) { IWCCertificate old = null; foreach (IWCCertificate cert in Connections) { if (cert.Connection.UserName == c.Connection.UserName) old = cert; } if (old != null) Connections.Remove (old); Connections.Add (c); IGenericsConnector genericsConnector = DataManager.DataManager.RequestPlugin<IGenericsConnector> (); if (genericsConnector != null) genericsConnector.AddGeneric (UUID.Zero, "InterWorldConnections", c.Connection.RecieverURL, c.ToOSD ()); }