From: Guus Sliepen Date: Thu, 8 Mar 2012 22:23:39 +0000 (+0100) Subject: Make sure disabling old RSA keys works on Windows. X-Git-Tag: release-1.0.17~2 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=5b0f5ad958d6db4e73aebc5ee6c608cdae81b7b5;hp=5b0f5ad958d6db4e73aebc5ee6c608cdae81b7b5 Make sure disabling old RSA keys works on Windows. Seeking in files and rewriting parts of them does not seem to work properly on Windows. Instead, when old RSA keys are found when generating new ones, the file containing the old keys is copied to a temporary file where the changes are made, and that file is renamed back to the original filename. On Windows, we cannot atomically replace files with a rename(), so we need to move the original file out of the way first. If anything fails, the new code will warn that the user has to solve the problem by hand. ---