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

SourceForge.net noreply at sourceforge.net
Fri Sep 17 12:46:01 CEST 2004


Bugs item #1030062, was opened at 2004-09-17 12:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
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

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

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