Re: [openssl-users] Handle Leaks - shmem-win32.c shmem.c - OpenSSL 1.0.1l

2015-01-25 Thread Avery A. Tarasov
Hi Michel, I actually already tried _beginthread but got the same results. CrtDumpMemoryLeaks also reports no problems for me. I guess the tool I was using for leak detection just has some bugs in it. Thanks again for your help. Best Regards, -Avery On 1/25/2015 1:49 PM, Michel SALES wrot

Re: [openssl-users] Handle Leaks - shmem-win32.c shmem.c - OpenSSL 1.0.1l

2015-01-25 Thread Michel SALES
Hi Avery, > In the code I sent over before, I was calling CloseHandle on the thread: > HANDLE h1=CreateThread(0,0,thread1,0,0,&t1);  if(h1==0) { return 0; } CloseHandle(h1); Yes, but you were trying to close the handle of a thread which was still running ! I have not checked what happens in this

Re: [openssl-users] Hostname validation

2015-01-25 Thread Serj
Hi, I found in CURL's sources that function: Curl_cert_hostcheck Seems to be it support wildcards and my question is still the same: what is the best way to make hostname validation? Maybe from practise somebody knows what is the better? CURLS's hostcheck.c: /* * Match a hostname against a wild

Re: [openssl-users] Hostname validation

2015-01-25 Thread Viktor Dukhovni
On Sun, Jan 25, 2015 at 07:43:14PM +0300, Serj wrote: > What is the best way to make hostname validation? > > 1. http://wiki.openssl.org/index.php/Hostname_validation > 2. X509_check_host that was added in OpenSSL 1.1.0. The X509_check_host() interface is also available in OpenSSL 1.0.2 released

[openssl-users] Hostname validation

2015-01-25 Thread Serj
Hello. What is the best way to make hostname validation? 1. http://wiki.openssl.org/index.php/Hostname_validation 2. X509_check_host that was added in OpenSSL 1.1.0. I don't know does the first one support wildcards or no! Seems to be: how does Curl_cert_hostcheck work - is the answer, but I do

Re: [openssl-users] Handle Leaks - shmem-win32.c shmem.c - OpenSSL 1.0.1l

2015-01-25 Thread Avery A. Tarasov
Hi Michel, In the code I sent over before, I was calling CloseHandle on the thread: HANDLE h1=CreateThread(0,0,thread1,0,0,&t1); if(h1==0) { return 0; }*CloseHandle(h1);* I modified the code you sent slightly so the cleanup functions all get reached. Still getting handle leaks (se

Re: [openssl-users] Handle Leaks - shmem-win32.c shmem.c - OpenSSL 1.0.1l

2015-01-25 Thread Michel SALES
Hi Avery, I am afraid your program demonstrates very little. If you load OpenSSL library, you have to call some of the OpenSSL free functions as indicated in a previous post, and if you create a thread, you have to call CloseHandle() : #include #include #include #include DWORD __stdcall th

Re: [openssl-users] Handle Leaks - shmem-win32.c shmem.c - OpenSSL 1.0.1l

2015-01-25 Thread Kurt Roeckx
On Sat, Jan 24, 2015 at 04:34:14PM -0500, Avery A. Tarasov wrote: > > Important findings: > > *1) * IfSSL_library_init() and SSL_load_error_strings() are *removed* > (which are the only 2 OpenSSL functions I'm using) the handle leaks go > away.. > > *2)* IfSSL_library_init() and SSL