Re: ssl_read() hangs after wakeup from sleep in OSX 10.5.8

2009-10-27 Thread Parimal Das
Its the second case Darry, Here the 'sleep' is Operating System Sleep mode induced by closing the lid of laptop. After opening the laptop, when the system wakes up, My application is always hanging at the same place.* * 562 ssl_getbuffer 562 ssl_getdata

RE: Subject Issuer Mismatch Bug!!

2009-10-27 Thread David Schwartz
Daniel Marschall wrote: > Any idea? This problem exists since 2003 and noone found an answer - > this is unbelievable. If you're waiting for somebody else to find a bug in *your* code, you're going to be waiting a long time. Comparing the text strings for literal equality makes no logical sense

Re: ssl_read() hangs after wakeup from sleep in OSX 10.5.8

2009-10-27 Thread Darryl Miles
"after wakeup from sleep" ? What do you mean ? Do you mean you used an API like poll() or select() to put the thread to sleep and then it wakes up and the socket readability was indicated ? If so please post an outline of the code your sleep/wake mechanism you are using. Do you mean your

Overlapped IO and OpenSSL

2009-10-27 Thread Konstantin Ivanov
Yes, please forgive my previous post as something was wrong with my web mail and I was unable to edit the subject. I am using overlapped IO in order to transfer the chunks of data back and forth between a client thread and a client application. Implementing overlapped transport was much more con

Hang in OpenSsl

2009-10-27 Thread Parimal Das
Hello I am using OpenSSL 0.9.7 included in IMAP-2009 (http://www.panda.com/imap/) on OS X 10.5.8 (Leopard) I am getting a hang by doing the following When i am downloading a mail and the thread is in ssl_getbuffer(), and i am putting my OS X laptop in sleep. IF i put my OS X laptop in sleep, when

ssl_read() hangs after wakeup from sleep in OSX 10.5.8

2009-10-27 Thread Parimal Das
Hello people I am getting a hang by doing the following IF i put my OS X laptop in sleep, when ssl_getbuffer() is getting performed, On waking up, the thread hangs. The call trace is as follows 562 mail_fetch_message 562 imap_msgdata 562

With EVP/AES I cannot change encrypt/decrypt after setting KEY

2009-10-27 Thread Graham Swallow
With EVP/AES I cannot change encrypt/decrypt after setting KEY bool ok = EVP_CipherInit_ex( &ctx, type, impl, key, iv, enc ); I am calling EVP_CipherInit_ex() more than once. I set the key early then later set enc (or change it after a default CTOR). The DOCS says simply leave things NULL for the

Re: aes_256_cbc decryption

2009-10-27 Thread Mounir IDRASSI
Hi, There is a confusion in your code between byte buffers and their HEX representation. You should work directly with buffer without trying to access them as strings. This will solve all your problems. So, change the implementation of your function MD5_hash to put the hash directly into the c

Re: aes_256_cbc decryption

2009-10-27 Thread himas
Mounir IDRASSI wrote: > > Hi, > > There are two main mistakes in your code: > - The output of the MD5 is 16 bytes long but you are allocating 8 > bytes only. This will cause memory corruption. > - AES-256 expects the key to be 32-bytes long but you want to use an > MD5 digest as a key

Re: Key security problem

2009-10-27 Thread Patrick Patterson
Hi Peter: On October 26, 2009 10:37:54 pm Peter Lin wrote: > Thanks all guys for your opinion. > > There is a HSM used which vendor provides hardware RSA encryption and > decryption. However, the key of to the hardware is one way-- I can only > pass in the key to the hardware, but cant pass out. D

Re: Subject Issuer Mismatch Bug!!

2009-10-27 Thread Dr. Stephen Henson
On Tue, Oct 27, 2009, Daniel Marschall wrote: > Any idea? This problem exists since 2003 and noone found an answer - > this is unbelievable. > > > > > Yes, without that flag, the certificate is valid ("OK"). I know, that > > the issuer-name-errors are actually not really errors, but warnings. > >

configuring for debug

2009-10-27 Thread Misha Aizatulin
hi, what is the right way to configure OpenSSL for debug? If I do ./Config debug-Cygwin then it defines some switches (-DCONF_DEBUG -DBN_CTX_DEBUG, etc.) that result in very verbose output. All I want is simply -g and no optimisation and no -fomit-frame-pointer. Do I have to change the Config

Re: aes_256_cbc decryption

2009-10-27 Thread Mounir IDRASSI
Hi, There are two main mistakes in your code: - The output of the MD5 is 16 bytes long but you are allocating 8 bytes only. This will cause memory corruption. - AES-256 expects the key to be 32-bytes long but you want to use an MD5 digest as a key which is only 16-bytes. You should use SH

Re: Subject Issuer Mismatch Bug!!

2009-10-27 Thread Daniel Marschall
Any idea? This problem exists since 2003 and noone found an answer - this is unbelievable. 2009/10/26 Daniel Marschall : > 2009/10/25, Dr. Stephen Henson : >> On Sun, Oct 25, 2009, Daniel Marschall wrote: >> >> > Hello. >> > >> > I have a problem with verification of certificates. >> > >> > My com

aes_256_cbc decryption

2009-10-27 Thread mindb0t
Hello, I wrote a source for encrypting and decrypting some text data with aes_256_cbc: -- CODE -- void aes256cbc_encrypt(char *text, char *hkey) { int i, outlen; unsigned char *outbuf = (unsigned char*)malloc(1024); unsigned char *inbuf = (unsigned char*)text; int

aes_256_cbc decryption

2009-10-27 Thread himas
Hello, I wrote a source for encrypting and decrypting some text data with aes_256_cbc: -- CODE -- void aes256cbc_encrypt(char *text, char *hkey) { int i, outlen; unsigned char *outbuf = (unsigned char*)malloc(1024); unsigned char *inbuf = (unsigned char*)text; int

Re: FW: How to Convert a MS CryptoAPI cert to OpenSSL cert

2009-10-27 Thread Nathan L Burns
The example in engines/e_capi.c has helped but in the function capi_get_pkey(), there's a conversion from CryptoApi PublicKeyBlob into the Openssl RSA structure so how do I convert the CryptoApi PrivateKeyBlob into the Openssl RSA structure? Thanks > -Original Message- > From: owner-ope

Re: SOLVED: decoding crlDistributionPoints extension

2009-10-27 Thread Carl Harris
It is quite bad idea to use assert here. You are analyzing certificate. External data which are passed to you by some other party, and you at this moment cannot be sure that this party is trusted, because you've not completed validation procedure yet. I agree completely. This is a code snip

Re: SOLVED: decoding crlDistributionPoints extension

2009-10-27 Thread Victor B. Wagner
On 2009.10.25 at 19:18:15 -0400, Carl Harris wrote: > True enough, this reduces the code snippet appreciably by eliminating > the rather tedious extension lookup fragment. My issue, of course, was > simply not knowing (and not being able to find any reference that > documents) the data type