On Mon, May 11, 2020 at 8:35 AM Rick van Rein via Unbound-users <[email protected]> wrote: > > We are porting a Linux application to Windows, and this uses Unbound for > DNSSEC security. On Linux, we have a well-defined location for the root > key, namely /etc/unbound/root.key, but on Windows we are less lucky. > What should we use, what do others do; is there a common place, possibly > relative to the library, and will it upgrade automatically?
On Windows, the root key should probably go in the special folder Common Application Data. A C/C++ program would use SHGetFolderPath (https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha). A C# program would use CommonApplicationData (https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netcore-3.1). Also see https://stackoverflow.com/questions/22455840/what-can-i-use-as-an-equivalent-for-environment-specialfolder-commonapplicationd.
