[Nagiosplug-devel] [ nagiosplug-Bugs-1030062 ] Bug in check_tcp.c
    SourceForge.net 
    noreply at sourceforge.net
       
    Wed Oct 20 12:57:59 CEST 2004
    
    
  
Bugs item #1030062, was opened at 2004-09-17 12:45
Message generated for change (Comment added) 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: 5
Submitted By: Phil Dibowitz (jaymzh)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in check_tcp.c
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-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