I want a command line utility which accepts one parameter (a filename), which is passed to the a C++ function which implements the equivalent of the? C# found below. This should run on Windows 2000, XP, 2003, Vista, 2008. I will attach an example file which verifies correctly when run through this function (and therefore the equivalent C++ version).
public static bool VerifyFile(string fqfile)
{
? string xmlString = "<RSAKeyValue><Modulus>oxk4mff1XcmT8nzk6d8jpR4mS4E4KlzbZ+47L3NfJttMIrNcV9eBCfgvj9beFhBKW90DdTcq5jMzmCGLoiYUCsFEniEdotNetx+KXZmF9xOzNMFJYg0YUFnZFxKYTxXn1yllobv8k0TvksLNvOC5VvnEN6PHvZeL8SYxqX1AmOsuVdMohk2JAbNrig6rNMe8CIFRKjSgg2Bvd84Kqafor68v+7e18OF3bg86RG2C++oxFiQ3UUvW7ZUurMvrwUZCfQvtiSTMEU8p/tazAB4XuqbYKrGaV94GMa21PZVz/TE4x36vgeVwGIDxi0Fh4z9jIbQM9rUpnugogr9Bsfum0Q==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";
? int dwKeySize = 2048;
? StreamReader sr = new StreamReader(fqfile);
? string filedata = [login to view URL]();
? [login to view URL]();
? string[] parts = [login to view URL](new string[] {"-----BEGIN PROPRIETARY SIGNED MESSAGE-----\r\n","-----BEGIN PROPRIETARY SIGNATURE-----\r\nidentifier=[login to view URL]\r\n","-----END PROPRIETARY SIGNATURE-----\r\n" },[login to view URL]);
? string inputString = parts[0];
? string signature = parts[1];
? RSACryptoServiceProvider rsaCryptoServiceProvider = new RSACryptoServiceProvider(dwKeySize);
? [login to view URL](xmlString);
? byte[] bytes = [login to view URL](inputString);
? byte[] sigbytes = [login to view URL](signature);
? return [login to view URL](bytes, "SHA512", sigbytes);? ? ? ? ? ? ? ? ? ? ?
}
## Deliverables
Unmanaged C++ command line tool to verify a specified file which is passed as the only parameter. Should be done in Visual Studio 2005 or Visual Studio 2008. Resulting executable should be standalone and run in Windows 2000, XP, 2003, Vista, 2008. Attached is an example of a signed file which passes verification VerifyFile() in C# and should therefore pass verification in the equivalent C++ code.