]> gitweb.factorcode.org Git - factor.git/commitdiff
fix random.windows -- use CRYPT_MACHINE_KEYSET
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 22 May 2009 22:15:40 +0000 (17:15 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 22 May 2009 22:15:40 +0000 (17:15 -0500)
basis/random/windows/windows.factor

index 6dce078d671a1181b72e86c0e344183153680e21..06a7634a43c56c5df7a4f127fa9701c197469b17 100644 (file)
@@ -25,7 +25,8 @@ CONSTANT: factor-crypto-container "FactorCryptoContainer"
     CryptAcquireContextW handle swap ;
 
 : acquire-crypto-context ( provider type -- handle )
-    0 (acquire-crypto-context)
+    CRYPT_MACHINE_KEYSET
+    (acquire-crypto-context)
     0 = [
         GetLastError NTE_BAD_KEYSET =
         [ drop f ] [ win32-error-string throw ] if
@@ -34,7 +35,7 @@ CONSTANT: factor-crypto-container "FactorCryptoContainer"
     ] if ;
 
 : create-crypto-context ( provider type -- handle )
-    CRYPT_NEWKEYSET (acquire-crypto-context) win32-error=0/f *void* ;
+    { CRYPT_MACHINE_KEYSET CRYPT_NEWKEYSET } (acquire-crypto-context) win32-error=0/f *void* ;
 
 ERROR: acquire-crypto-context-failed provider type ;