From 4ab3d21529f4fea8ed4ad68413e9f604bcd1294b Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sat, 10 May 2014 19:28:24 -0700 Subject: [PATCH] Use explicitly Unicode Win32 APIs. --- .../randombytes/salsa20/randombytes_salsa20_random.c | 4 ++-- src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c index 243c9c4b..6538c0d4 100644 --- a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +++ b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c @@ -155,8 +155,8 @@ randombytes_salsa20_random_init(void) stream.nonce = sodium_hrtime(); assert(stream.nonce != (uint64_t) 0U); - if (! CryptAcquireContext(&stream.hcrypt_prov, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { + if (! CryptAcquireContextW(&stream.hcrypt_prov, NULL, NULL, + PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { abort(); } } diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index a7c827e5..3a5ec65e 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -141,8 +141,8 @@ randombytes_sysrandom_init(void) static void randombytes_sysrandom_init(void) { - if (! CryptAcquireContext(&stream.hcrypt_prov, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { + if (! CryptAcquireContextW(&stream.hcrypt_prov, NULL, NULL, + PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { abort(); } }