Thanks.  The patch is applied and committed.

This ticket is now resolved.

[[EMAIL PROTECTED] - Sun Sep  1 19:15:59 2002]:

> I have found that OpenSSL version 0.9.6g (or earlier) on Windows 
can
> cause a problem that will prevent Window's
> Disk Administrator from being able to delete a logical drive from a
> system that has several logical drives associated
> with a physical drive.  By using a tool call Filemon.exe (from
> http://www.sysinternals.com/sitemap.shtml) I was
> able to isolate the problem to be one in which a registry handle is
> not closed   I was able to trace this occurance to a line
> in RAND_WIN.C.  I then added a one line 'fix' after the query which
> closes the key and fixes the problem.
> 
> In more detail, using symbolic debugging inside of OpenSSL, I found
> that during the first call to SSL_accept()
> OpenSSL ends up querying the HKEY_PERFORMANCE_DATA Registry key in
> order to get some random data.
> It turns out that this is one of those Windows oddities whereby 
you do
> not need to explicitly open this key, but you have
> to explicity close it or it leaves a handle open that results in 
this
> Disk Administrator problem.
> 
> --- Pete Bobco ---
> 
> 
--------------------------------------------------------------------------------------------------------------------------------------------------
> 
> [Patch for RAND_WIN.C]
> 
> diff -ur \openssl-0.9.6g-orig/crypto/rand/rand_win.c
> \openssl-0.9.6g-work/crypto/rand/rand_win.c
> --- \openssl-0.9.6g-orig/crypto/rand/rand_win.c  Thu Feb 21 05:56
> :50 2002
> +++ \openssl-0.9.6g-work/crypto/rand/rand_win.c  Fri Aug 23 10:48
> :20 2002
> @@ -286,6 +286,15 @@
>                           */
>                         RAND_add(&length, sizeof(length), 0);
>                         RAND_add(buf, length, length / 4.0);
> +
> +         /* Close the Registry Key to allow Windows to 
cleanup/close
> the open handle
> +          * Note: The 'HKEY_PERFORMANCE_DATA' key is implicitly
> opened when the
> 
> +          *       RegQueryValueEx above is done.  However, if it 
is
> not explicitly
> +          *       closed, it can cause disk partition manipulation
> problems.
> +         */
> +
> +         RegCloseKey(HKEY_PERFORMANCE_DATA);
> +
>                         }
>                 if (buf)
>                         free(buf);
> 
> 
> 
______________________________________________________________________
> OpenSSL Project                                 
http://www.openssl.org
> Development Mailing List                       
[EMAIL PROTECTED]
> Automated List Manager                           
[EMAIL PROTECTED]


-- 
Richard Levitte
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to