[Nagiosplug-devel] [ nagiosplug-Bugs-1030062 ] Bug in check_tcp.c -- with patch

SourceForge.net noreply at sourceforge.net
Thu Oct 21 01:21:33 CEST 2004


Bugs item #1030062, was opened at 2004-09-17 12:45
Message generated for change (Settings changed) made by jaymzh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1030062&group_id=29880

Category: None
Group: Release (specify)
Status: Open
Resolution: None
Priority: 7
Submitted By: Phil Dibowitz (jaymzh)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Bug in check_tcp.c -- with patch

Initial Comment:
Release 1.3.1

In check_tcp.c it does:                               
                              
                                                      
                              
    /* Do the SSL handshake */                        
                              
      if ((ssl = SSL_new (ctx)) != NULL)              
                              
      {                                               
                              
        SSL_set_fd (ssl, sd);                         
                              
        if (SSL_connect(ssl) != -1)                   
                              
          return OK;                                  
                              
        ERR_print_errors_fp (stderr);                 
                              
      }                                               
                              
                                                      
                              
                                                      
                              
Which doesn't work because anything <1 is a valid error
code. In fact, I'm getting a problem with 0 as an error
code. I've changed the code to look like:       
                                                      
                              
    /* Do the SSL handshake */                        
                              
      if ((ssl = SSL_new (ctx)) != NULL)              
                              
      {                                               
                              
        SSL_set_fd (ssl, sd);                         
                              
        if (SSL_connect(ssl) == 1)                    
                              
          return OK;                                  
                              
        ERR_print_errors_fp (stderr);                 
                              
      }                                               
                              
                                                      
                              
- Phil

----------------------------------------------------------------------

Comment By: Phil Dibowitz (jaymzh)
Date: 2004-10-21 01:12

Message:
Logged In: YES 
user_id=533101

Okay, it didn't attach. Trying again.

----------------------------------------------------------------------

Comment By: Phil Dibowitz (jaymzh)
Date: 2004-10-20 12:55

Message:
Logged In: YES 
user_id=533101

Okay,

I've attached a patch to fix this, as well as another SSL
initialization. The two bugs are:

- The bad checking of return codes
- Using ONLY SSLv2 instead of SSLv23 which will use 3 and
then fall back to 2 if need be.

- Phil


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1030062&group_id=29880




More information about the Devel mailing list