I'm trying to use SHA2-512 on Windows 7 with CryptoAPI, however, calling CryptCreateHash fails with GetLastError()=2148073480=0x80090008, i.e. "Invalid Algorithm Specified". According to https://msdn.microsoft.com/en-us/library/windows/desktop/aa375549%28v=vs.85%29.aspx SHA2 should be available since Windows XP SP3. Here is the code I'm using: HCRYPTPROV hCryptProv; CryptAcquireContext(&hCryptProv, nullptr, nullptr, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); HCRYPTHASH hHash; if (!CryptCreateHash(hCryptProv, CALG_SHA_512, 0, [...] read more
i don't know if this is an issue with IIS or .Net, The certificate that’s used to create a S2S token somehow loads "Microsoft RSA SChannel Cryptographic Provider" as the private key instead of "Microsoft Enhanced RSA and AES Cryptographic Provider". The former one does not support SHA256 hash, therefore [...] read more
I want to implement CSR generation in C# for Windows XP SP3. Added by assembly Interop.XENROLLLib CSR Generation Code: private string GenerateObsolete(string subject) { var certEnroll = new CEnroll2Class(); certEnroll.ProviderName = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"; certEnroll.ProviderType = 24; certEnroll.ContainerName = $"FGR-{Guid.NewGuid()}"; certEnroll.HashAlgorithm = "SHA-256"; //certEnroll.HashAlgID = [...] read more
I'm using Iot Edge transparent gateway + downstream device and I got this error: Connection error to Iot Hub:TLS authentication error I follow this tutorial: https://docs.microsoft.com/en-ca/azure/iot-edge/how-to-create-transparent-gateway My edge and downstream devices are on the same computer, following this scenario: I deployed a monitoring module that loop through downstream devices to [...] read more