private void downloadConfig() { //Updatekonfiguration herunterladen byte[] rawUpdateConfiguration = webclient.DownloadData(internalHelper.prepareUpdateLocation(_controllerInstance.updateLocation) + "update.xml"); var sContainer = new SecureContainer(); sContainer.Load(rawUpdateConfiguration); currentConfiguration = Serializer.Deserialize(sContainer.Content); //Signatur der Updatekonfiguration überprüfen /*string publicKey = (string.IsNullOrEmpty(_controllerInstance.publicKey) ? currentConfiguration.PublicKey : _controllerInstance.publicKey); * if (!Core.RSA.validateSign(sContainer.Content, sContainer.Signature, publicKey)) * throw new Exception(Language.GetString("searchProvider_invalidSignatureException"));*/ //Sende Statistiken über die Updateanfrage var log = new updateLogRequest(_controllerInstance, currentConfiguration); lock (log) log.sendRequest(0); }
private updateConfiguration downloadConfiguration(string updateUrl) { string completeUrl = updateUrl; //Fix missing Url parts if (!completeUrl.EndsWith("/")) { completeUrl = completeUrl + "/"; } completeUrl = completeUrl + "update.xml"; //Download Configuration var client = Session.createWebClient(); byte[] configurationData = client.DownloadData(completeUrl); var container = new SecureContainer(); container.Load(configurationData); //Deserialize and Load Configuration return(updateSystemDotNet.Core.Serializer.Deserialize(container.Content)); }