Hi All,

Can anyone suggest me for the following error urgently.

I am using the stunnel source using threads for servicing the clients.

Some time for more than one client it does the correct data transfer.
But at some times when first thread closes, and the second thread is on the
verge of handshaking with SSL_accept, the second thread also closes off.
Why is this so. Is there anything else to be done apart from below.
I am getting following error:

LOG7[4266:12]: SSL closed on read (DMZ Server)
LOG5[4266:12]: Connection closed: 42 bytes recieved from Client, 6 bytes
sent to Client
LOG7[4266:12]: client thread finished (1 left)
LOG7[4266:13]: before/accept initialization
LOG7[4266:13]: before/accept initialization
LOG7[4266:11]: SSL closed on read (DMZ Server)
LOG5[4266:11]: Connection closed: 42 bytes recieved from Client, 6 bytes
sent to Client
LOG7[4266:13]: SSLv3 read client hello B
LOG7[4266:13]: SSLv3 read client hello B
LOG3[4266:13]: SSL_accept dmz: error:00000000::lib(0) :func(0) :reason(0)
LOG7[4266:13]: client thread finished (1 left)
LOG7[4266:11]: client thread finished (0 left)


when it was accepting for thread 13, the thread 12 has closed and it closes
off the thread 13.

I have done the locking as below:

static void locking_callback(int mode, int type,
#ifdef HAVE_OPENSSL
    const /* Callback definition has been changed in openssl 0.9.3 */
#endif
    char *file, int line)
{
    if(mode&CRYPTO_LOCK){
        pthread_mutex_lock(lock_cs+type);
        printf("Locking thread\n");
    } else {
        pthread_mutex_unlock(lock_cs+type);
        printf("UNLocking thread\n");
    }
}
 
void sthreads_init()
{
    int i;
 
    for(i=0; i<CRYPTO_NUM_LOCKS; i++)
        pthread_mutex_init(lock_cs+i, NULL);
    CRYPTO_set_id_callback(thread_id);
    CRYPTO_set_locking_callback(locking_callback);
 
    pthread_attr_init(&pth_attr);
    pthread_attr_setdetachstate(&pth_attr, PTHREAD_CREATE_DETACHED);
}
 
unsigned long process_id()
{
    return (unsigned long)getpid();
}
 
unsigned long thread_id()
{
    return (unsigned long)pthread_self();
}


Thanks in advance.
Asha

This message is for the named person's use only.  It may contain 
confidential, proprietary or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks.  Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state 
them to be the views of any such entity.


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

Reply via email to