Re: OpenSSL on Win = Thread Safety

2010-06-25 Thread Jakob Bohm
On 24-06-2010 19:25, Massimiliano Pala wrote: Hi all, I have a question for Win coders.. I am porting LibPKI, which is based on OpenSSL, to Win OSes. On UNiX OSes we used pthread to initialize support for threads in OpenSSL. What is the best practice for Win OS ? Does anybody have some sample

Re: OpenSSL on Win = Thread Safety

2010-06-25 Thread Jakob Bohm
On 24-06-2010 23:31, Jeffrey Walton wrote: Hi Massimiliano, If the locks need to be shared across processes, use a Mutex (the mutexes can be named for separate processes, or the mutex can be unnamed if Object Handle Inheritance is used (a flag to CreateProcess, which is similar to fork(2))).

Error engine using rsautl

2010-06-25 Thread Nacho Álvarez
Hello, I am building a PKCS#11 engine to an HSM. When I run: openssl rsautl -sign -inkey id-of-private-key -keyform engine -in file-data -out file-sign -engine My-engine-id The engine executes the rsa_priv_enc function (I thought the engine would execute rsa_sign, but this is not the problem).

Re: Error engine using rsautl

2010-06-25 Thread Dr. Stephen Henson
On Fri, Jun 25, 2010, Nacho lvarez wrote: Hello, I am building a PKCS#11 engine to an HSM. When I run: openssl rsautl -sign -inkey id-of-private-key -keyform engine -in file-data -out file-sign -engine My-engine-id The engine executes the rsa_priv_enc function (I thought the engine

Does BN_sub() really require its arguments to be distinct?

2010-06-25 Thread Jakob Bohm
According to my reading of BN_add.pod, BN_sub() does not allow its result argument to be the same BIGNUM as one of the input values, in particular, each of the following expressions will need a temporary BIGNUM according to the documentation: a -= b; a = a - b; a = b - a; In

Re: OpenSSL on Win = Thread Safety

2010-06-25 Thread Jeffrey Walton
Hi Jakob, Boy this is an argumentative list at times As a Win32 guy, I understand your the finer points you are making. Unfortunately, there are implicit assumptions that are being made which are undermining your arguments. Put another way, its the attacks which you *don't* know about which

Optional Verification of Signature and Date..

2010-06-25 Thread Ashok C
Hi, Does the openssl X509_verify certificate validation API support an argument that supports skipping of signature and date validation? Or is there any other way that I can achieve this optional verification. Please help me out in this regard. Regds, Ashok.

Re: OpenSSL on Win = Thread Safety

2010-06-25 Thread Jakob Bohm
Read my post again, I did not say that NULL DACLs are not obviously dangerous (they are and have been deprecated since the mid 1990s). I said that a NULL SECURITY_ATTRIBUTES does not result in a NULL DACL but something much less dangerous. If you found a way to make the SRM assign a NULL DACL

Re: OpenSSL on Win = Thread Safety

2010-06-25 Thread Jeffrey Walton
Hi Jakob, I do agree with you that a NULL SecAttrib will get you a default descriptor. After sending the post (before you jumped on it), I wanted to preface the statement with some hand waiving. What constitutes a default descriptor is somewhat of a moving target when over the Windows OS's and