]> code.delx.au - gnu-emacs/blobdiff - src/w32.c
Merge from origin/emacs-25
[gnu-emacs] / src / w32.c
index 6f1d5fd169862088290d24153f760210568f32ae..183a4e7e9d9239dd6493632d6506747cd07d6cbc 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -224,8 +224,6 @@ typedef struct _REPARSE_DATA_BUFFER {
 
 #include <iphlpapi.h>  /* should be after winsock2.h */
 
-#include <wincrypt.h>
-
 #include <c-strcase.h>
 
 #include "w32.h"
@@ -2096,34 +2094,6 @@ init_user_info (void)
     CloseHandle (token);
 }
 
-static HCRYPTPROV w32_crypto_hprov;
-static int
-w32_init_crypt_random (void)
-{
-  if (!CryptAcquireContext (&w32_crypto_hprov, NULL, NULL, PROV_RSA_FULL,
-                           CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
-    {
-      DebPrint (("CryptAcquireContext failed with error %x\n",
-                GetLastError ()));
-      w32_crypto_hprov = 0;
-      return -1;
-    }
-  return 0;
-}
-
-int
-w32_init_random (void *buf, ptrdiff_t buflen)
-{
-  if (!w32_crypto_hprov)
-    w32_init_crypt_random ();
-  if (w32_crypto_hprov)
-    {
-      if (CryptGenRandom (w32_crypto_hprov, buflen, (BYTE *)buf))
-       return 0;
-    }
-  return -1;
-}
-
 int
 random (void)
 {
@@ -9447,8 +9417,6 @@ globals_of_w32 (void)
   extern void dynlib_reset_last_error (void);
   dynlib_reset_last_error ();
 #endif
-
-  w32_crypto_hprov = (HCRYPTPROV)0;
 }
 
 /* For make-serial-process  */