[BACK]Return to s_client.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / openssl

Diff for /src/usr.bin/openssl/s_client.c between version 1.49 and 1.50

version 1.49, 2020/07/09 14:09:19 version 1.50, 2020/07/10 12:05:52
Line 173 
Line 173 
 static void sc_usage(void);  static void sc_usage(void);
 static void print_stuff(BIO * berr, SSL * con, int full);  static void print_stuff(BIO * berr, SSL * con, int full);
 static int ocsp_resp_cb(SSL * s, void *arg);  static int ocsp_resp_cb(SSL * s, void *arg);
 static BIO *bio_c_out = NULL;  
   
 enum {  enum {
         PROTO_OFF = 0,          PROTO_OFF = 0,
Line 876 
Line 875 
         int write_tty, read_tty, write_ssl, read_ssl, tty_on, ssl_pending;          int write_tty, read_tty, write_ssl, read_ssl, tty_on, ssl_pending;
         SSL_CTX *ctx = NULL;          SSL_CTX *ctx = NULL;
         int ret = 1, in_init = 1, i;          int ret = 1, in_init = 1, i;
           BIO *bio_c_out = NULL;
         BIO *sbio;          BIO *sbio;
         int mbuf_len = 0;          int mbuf_len = 0;
         struct timeval timeout;          struct timeval timeout;
Line 961 
Line 961 
                         goto end;                          goto end;
                 }                  }
         }          }
         if (bio_c_out == NULL) {          if (s_client_config.quiet && !s_client_config.debug &&
                 if (s_client_config.quiet && !s_client_config.debug &&              !s_client_config.msg) {
                     !s_client_config.msg) {                  if ((bio_c_out = BIO_new(BIO_s_null())) == NULL)
                         bio_c_out = BIO_new(BIO_s_null());                          goto end;
                 } else {          } else {
                         if (bio_c_out == NULL)                  if ((bio_c_out = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL)
                                 bio_c_out = BIO_new_fp(stdout, BIO_NOCLOSE);                          goto end;
                 }  
         }          }
   
         ctx = SSL_CTX_new(s_client_config.meth);          ctx = SSL_CTX_new(s_client_config.meth);
Line 1621 
Line 1620 
         freezero(cbuf, BUFSIZZ);          freezero(cbuf, BUFSIZZ);
         freezero(sbuf, BUFSIZZ);          freezero(sbuf, BUFSIZZ);
         freezero(mbuf, BUFSIZZ);          freezero(mbuf, BUFSIZZ);
         if (bio_c_out != NULL) {          BIO_free(bio_c_out);
                 BIO_free(bio_c_out);  
                 bio_c_out = NULL;  
         }  
   
         return (ret);          return (ret);
 }  }
Line 1757 
Line 1753 
                 socklen_t ladd_size = sizeof(ladd);                  socklen_t ladd_size = sizeof(ladd);
                 sock = SSL_get_fd(s);                  sock = SSL_get_fd(s);
                 getsockname(sock, (struct sockaddr *) & ladd, &ladd_size);                  getsockname(sock, (struct sockaddr *) & ladd, &ladd_size);
                 BIO_printf(bio_c_out, "LOCAL PORT is %u\n",                  BIO_printf(bio, "LOCAL PORT is %u\n",
                     ntohs(ladd.sin_port));                      ntohs(ladd.sin_port));
         }          }
 #endif  #endif

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50