RE: asynchronous read/write with multithread

2007-12-17 Thread David Schwartz
> Yes, the protocol is asynchronous exactly, not "query/response" sequence, > and could not re-design it now. Many protocols are that way and should be that way. I wouldn't redesign the protocol unless it was badly designed in the first place. > I could not find sufficient documents or examples

Re: asynchronous read/write with multithread

2007-12-17 Thread YAMANEKO/Mao
Yes, the protocol is asynchronous exactly, not "query/response" sequence, and could not re-design it now. I could not find sufficient documents or examples about non-blocking I/O for newbie like me. By way of experiment, I tried to re-write the code again with BIO and non-blocking I/O. The read()

MAC Calculation help needed

2007-12-17 Thread Suchindra Chandrahas
Hi All, I am doing the following to calculate MAC as per SSL v3 handshake: printf("\nRESULT: Plain Record encryption:\n"); for ( i = 0; i < rec_len; i ++) printf("%x ", rec[i]); total_length = rec_len + 16

RE: asynchronous read/write with multithread

2007-12-17 Thread David Schwartz
> So, at first, I made two simple wrapper functions to replace plain > read/write functions. > > -- snip -- > int read_ssl( .. ) { > pthread_mutex_lock( &rw_lock ) ; > SSL_read( ... ) ; > pthread_mutex_unlock( &rw_lock ) ; > } > > int write_ssl( .. ) { > pthread_mutex_lock(

asynchronous read/write with multithread

2007-12-17 Thread YAMANEKO/Mao
Hello, I'm re-writing an application with OpenSSL. Originally, the application uses only plain TCP socket as a TCP client, it has two threads, receives and submits message asynchronously. Namely, the timing of sending/receiving messages are independent on each other, and there is no logical sequen

Re: Is this an unusual setup ?

2007-12-17 Thread Aleksander Kamenik
B G Roper wrote: Hello list/forum I'm new with openssl so please be gentle. I'm hoping that my problem is small, and may have a simple answer/s. Being new to ssl terminology, it is hard for me to know what and where to search for clues. I'm understanding the basic concepts of certificates, and

Re: How to use info callbacks with biopairs?

2007-12-17 Thread Lutz Jaenicke
Victor Duchovni wrote: > On Fri, Dec 14, 2007 at 11:06:58AM +0100, Lutz Jaenicke wrote: > > >>> else if (ret < 0) { >>> switch(SSL_get_error((SSL *)s, ret)) { >>> case SSL_ERROR_WANT_READ: >>> case SSL_ERROR_WANT_WRITE: >>> break; >>>

RE: Expired certificates out from revocation list

2007-12-17 Thread David Schwartz
> How can I get rid of the expired certificates in the revocation > list? When I > do openssl ca -gencrl -out revocationlist.crl -config myconfig.cfg the > revoked certificates that are also expired are added into the > list. It is no > use to store them there because the revocation list grows big

RE: AES CBC mode problem

2007-12-17 Thread David Schwartz
> If I call like this, I get 32-byte return(The first 16 byte string equal to > Ciphertext in the test case) > ret = EVP_EncryptUpdate(&ctx, out, outl, in, inl); >if(!ret) abort(); >len += *outl; >ret = EVP_EncryptFinal_ex(&ctx, out+len, outl); >if(!ret) abort(); > len += *out

Re: Expired certificates out from revocation list

2007-12-17 Thread Bernhard Froehlich
unski schrieb: How can I get rid of the expired certificates in the revocation list? When I do openssl ca -gencrl -out revocationlist.crl -config myconfig.cfg the revoked certificates that are also expired are added into the list. It is no use to store them there because the revocation list grows

Expired certificates out from revocation list

2007-12-17 Thread unski
How can I get rid of the expired certificates in the revocation list? When I do openssl ca -gencrl -out revocationlist.crl -config myconfig.cfg the revoked certificates that are also expired are added into the list. It is no use to store them there because the revocation list grows bigger and bigg

Is this an unusual setup ?

2007-12-17 Thread B G Roper
Hello list/forum I'm new with openssl so please be gentle. I'm hoping that my problem is small, and may have a simple answer/s. Being new to ssl terminology, it is hard for me to know what and where to search for clues. I'm understanding the basic concepts of certificates, and have my test serve

RE: AES CBC mode problem

2007-12-17 Thread Bian
I modified the code with using strlen(Plaintext) which is 16-byte long, but still not understand if need to call EVP_EncryptFinal_ex() after called EVP_EncryptUpdate(). If I call like this, I get 32-byte return(The first 16 byte string equal to Ciphertext in the test case) ret = EVP_Encrypt