[Ttssh2-commit] [8019] 95/98/Me/NT4.0において、デフォルトの Key Container を使わないようにした。

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 8月 25日 (日) 19:45:18 JST


Revision: 8019
          https://osdn.net/projects/ttssh2/scm/svn/commits/8019
Author:   yutakapon
Date:     2019-08-25 19:45:17 +0900 (Sun, 25 Aug 2019)
Log Message:
-----------
95/98/Me/NT4.0において、デフォルトの Key Container を使わないようにした。
チケット #36876 

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/36876

Modified Paths:
--------------
    branches/openssl_1_1_1_v2/libs/openssl_patch/CryptAcquireContextW2.txt

-------------- next part --------------
Modified: branches/openssl_1_1_1_v2/libs/openssl_patch/CryptAcquireContextW2.txt
===================================================================
--- branches/openssl_1_1_1_v2/libs/openssl_patch/CryptAcquireContextW2.txt	2019-08-25 01:33:18 UTC (rev 8018)
+++ branches/openssl_1_1_1_v2/libs/openssl_patch/CryptAcquireContextW2.txt	2019-08-25 10:45:17 UTC (rev 8019)
@@ -1,8 +1,8 @@
 *** openssl-1.1.1c.org/crypto/rand/rand_win.c	2019-05-28 22:12:20.000000000 +0900
---- openssl/crypto/rand/rand_win.c	2019-08-16 15:18:26.626115600 +0900
+--- openssl/crypto/rand/rand_win.c	2019-08-25 19:21:14.365244400 +0900
 *************** size_t rand_pool_acquire_entropy(RAND_PO
 *** 115,120 ****
---- 115,149 ----
+--- 115,150 ----
           return entropy_available;
   # endif
   
@@ -12,13 +12,14 @@
 +     bytes_needed = rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
 +     buffer = rand_pool_add_begin(pool, bytes_needed);
 +     if (buffer != NULL) {
++ 		const char *container_name = "Tera Term Project";
 +         size_t bytes = 0;
 + 		BOOL cret = FALSE;
 + 
-+         cret = CryptAcquireContextA(&hProvider, NULL, NULL, PROV_RSA_FULL, 0);
++         cret = CryptAcquireContextA(&hProvider, container_name, NULL, PROV_RSA_FULL, 0);
 + 		if (cret == FALSE) {
 + 			if (GetLastError() == NTE_BAD_KEYSET) { 
-+ 				cret = CryptAcquireContextA(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET);
++ 				cret = CryptAcquireContextA(&hProvider, container_name, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET);
 + 			}
 + 		}
 + 
@@ -27,7 +28,7 @@
 +                 bytes = bytes_needed;
 + 
 +             CryptReleaseContext(hProvider, 0);
-+ 			cret = CryptAcquireContextA(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
++ 			cret = CryptAcquireContextA(&hProvider, container_name, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
 +         }
 +         rand_pool_add_end(pool, bytes, 8 * bytes);
 +         entropy_available = rand_pool_entropy_available(pool);


Ttssh2-commit メーリングリストの案内
Back to archive index