Bug is caused by an incorrect call to windows API FindFirstFile(). FindFirstFile() is called to list all the files which are located in some directory. However a call issued to FindFirstFile is directory name itself, without any wildcards, will result in windows returning that directory as a result, instead of its contents. For example, the following code will store directory name ('aaa') inside
some_result_struct.cFileName (provided that the folder exists).

::FindFirstFile( "c:\aaa", &some_result_struct );

I suspect that Windows expects you to send "c:\aaa\*" or "c:\aaa\*.*" as a first parameter to list
directory contents.

This bug affects only SLL_add_dir_cert_subjects_to_stack() which will try to concatenate the result
with the base folder and send it to SSL_add_file_cert_subjects_to_stack()
(i.e. it will try to access "c:\aaa\aaa" which will, of course, fail).

MSDN documentation for FindFirstFile() states:
"The FindFirstFile function searches a directory for a file or _subdirectory_ with a name that matches a specific name."

I'm using OpenSSL 0.9.8e with Windows XP SP2 and Visual Studio 7.1.

Hope this helps,
   Juraj Ivančić

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to