[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.39 and 1.40

version 1.39, 2020/01/22 04:51:48 version 1.40, 2020/01/22 06:40:42
Line 1122 
Line 1122 
                         }                          }
 #endif  #endif
                         if (peekaboo) {                          if (peekaboo) {
                                 p = SSL_peek(con, pbuf, 1024 /* BUFSIZZ */ );                                  k = p = SSL_peek(con, pbuf, 1024 /* BUFSIZZ */ );
                                   if (SSL_get_error(con, p) == SSL_ERROR_NONE) {
                                 switch (SSL_get_error(con, k)) {  
                                 case SSL_ERROR_NONE:  
                                         if (p <= 0)                                          if (p <= 0)
                                                 goto end;                                                  goto end;
                                         pbuf_off = 0;                                          pbuf_off = 0;
                                         pbuf_len = p;                                          pbuf_len = p;
   
                                         break;                                          k = SSL_read(con, sbuf, p);
                                 case SSL_ERROR_WANT_WRITE:  
                                         BIO_printf(bio_c_out, "peek W BLOCK\n");  
                                         write_ssl = 1;  
                                         read_tty = 0;  
                                         break;  
                                 case SSL_ERROR_WANT_READ:  
                                         BIO_printf(bio_c_out, "peek R BLOCK\n");  
                                         write_tty = 0;  
                                         read_ssl = 1;  
                                         if ((read_tty == 0) && (write_ssl == 0))  
                                                 write_ssl = 1;  
                                         break;  
                                 case SSL_ERROR_WANT_X509_LOOKUP:  
                                         BIO_printf(bio_c_out, "peek X BLOCK\n");  
                                         break;  
                                 case SSL_ERROR_SYSCALL:  
                                         ret = errno;  
                                         BIO_printf(bio_err, "peek:errno=%d\n", ret);  
                                         goto shut;  
                                 case SSL_ERROR_ZERO_RETURN:  
                                         BIO_printf(bio_c_out, "peek closed\n");  
                                         ret = 0;  
                                         goto shut;  
                                 case SSL_ERROR_SSL:  
                                         ERR_print_errors(bio_err);  
                                         goto shut;  
                                         /* break; */  
                                 }                                  }
                           } else {
                                   k = SSL_read(con, sbuf, 1024 /* BUFSIZZ */ );
                         }                          }
   
                         k = SSL_read(con, sbuf, 1024 /* BUFSIZZ */ );  
   
                         switch (SSL_get_error(con, k)) {                          switch (SSL_get_error(con, k)) {
                         case SSL_ERROR_NONE:                          case SSL_ERROR_NONE:

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40