Azure App Service requires CRYPT_MACHINE_KEYSET

update-fork
MITSUNARI Shigeo 5 years ago
parent 42b0fb05ad
commit 66716376b1
  1. 4
      include/cybozu/random_generator.hpp

@ -34,8 +34,8 @@ public:
: prov_(0) : prov_(0)
, pos_(bufSize) , pos_(bufSize)
{ {
DWORD flagTbl[] = { 0, CRYPT_NEWKEYSET }; DWORD flagTbl[] = { 0, CRYPT_NEWKEYSET, CRYPT_MACHINE_KEYSET };
for (int i = 0; i < 2; i++) { for (int i = 0; i < 3; i++) {
if (CryptAcquireContext(&prov_, NULL, NULL, PROV_RSA_FULL, flagTbl[i]) != 0) return; if (CryptAcquireContext(&prov_, NULL, NULL, PROV_RSA_FULL, flagTbl[i]) != 0) return;
} }
#ifdef CYBOZU_DONT_USE_EXCEPTION #ifdef CYBOZU_DONT_USE_EXCEPTION

Loading…
Cancel
Save