[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.11 and 1.12

version 1.11, 2014/12/14 14:42:06 version 1.12, 2015/01/13 10:48:24
Line 204 
Line 204 
         BIO_printf(bio_err, " -host host     - use -connect instead\n");          BIO_printf(bio_err, " -host host     - use -connect instead\n");
         BIO_printf(bio_err, " -port port     - use -connect instead\n");          BIO_printf(bio_err, " -port port     - use -connect instead\n");
         BIO_printf(bio_err, " -connect host:port - who to connect to (default is %s:%s)\n", SSL_HOST_NAME, PORT_STR);          BIO_printf(bio_err, " -connect host:port - who to connect to (default is %s:%s)\n", SSL_HOST_NAME, PORT_STR);
           BIO_printf(bio_err, " -proxy host:port - connect to http proxy\n");
   
         BIO_printf(bio_err, " -verify arg   - turn on peer certificate verification\n");          BIO_printf(bio_err, " -verify arg   - turn on peer certificate verification\n");
         BIO_printf(bio_err, " -cert arg     - certificate file to use, PEM format assumed\n");          BIO_printf(bio_err, " -cert arg     - certificate file to use, PEM format assumed\n");
Line 338 
Line 339 
         char *port = PORT_STR;          char *port = PORT_STR;
         int full_log = 1;          int full_log = 1;
         char *host = SSL_HOST_NAME;          char *host = SSL_HOST_NAME;
           char *proxy = NULL, *connect = NULL;
         char *cert_file = NULL, *key_file = NULL;          char *cert_file = NULL, *key_file = NULL;
         int cert_format = FORMAT_PEM, key_format = FORMAT_PEM;          int cert_format = FORMAT_PEM, key_format = FORMAT_PEM;
         char *passarg = NULL, *pass = NULL;          char *passarg = NULL, *pass = NULL;
Line 412 
Line 414 
                 } else if (strcmp(*argv, "-connect") == 0) {                  } else if (strcmp(*argv, "-connect") == 0) {
                         if (--argc < 1)                          if (--argc < 1)
                                 goto bad;                                  goto bad;
                         if (!extract_host_port(*(++argv), &host, NULL, &port))                          connect = *(++argv);
                   } else if (strcmp(*argv, "-proxy") == 0) {
                           if (--argc < 1)
                                 goto bad;                                  goto bad;
                           proxy = *(++argv);
                 } else if (strcmp(*argv, "-verify") == 0) {                  } else if (strcmp(*argv, "-verify") == 0) {
                         verify = SSL_VERIFY_PEER;                          verify = SSL_VERIFY_PEER;
                         if (--argc < 1)                          if (--argc < 1)
Line 624 
Line 629 
                 argc--;                  argc--;
                 argv++;                  argv++;
         }          }
           if (proxy != NULL) {
                   if (!extract_host_port(proxy, &host, NULL, &port))
                           goto bad;
                   if (connect == NULL)
                           connect = SSL_HOST_NAME;
           } else if (connect != NULL) {
                   if (!extract_host_port(connect, &host, NULL, &port))
                           goto bad;
           }
         if (badop) {          if (badop) {
 bad:  bad:
                 if (errstr)                  if (errstr)
Line 971 
Line 985 
                 BIO_free(fbio);                  BIO_free(fbio);
                 BIO_printf(sbio, "AUTH TLS\r\n");                  BIO_printf(sbio, "AUTH TLS\r\n");
                 BIO_read(sbio, sbuf, BUFSIZZ);                  BIO_read(sbio, sbuf, BUFSIZZ);
         }          } else if (starttls_proto == PROTO_XMPP) {
         if (starttls_proto == PROTO_XMPP) {  
                 int seen = 0;                  int seen = 0;
                 BIO_printf(sbio, "<stream:stream "                  BIO_printf(sbio, "<stream:stream "
                     "xmlns:stream='http://etherx.jabber.org/streams' "                      "xmlns:stream='http://etherx.jabber.org/streams' "
Line 991 
Line 1004 
                 if (!strstr(sbuf, "<proceed"))                  if (!strstr(sbuf, "<proceed"))
                         goto shut;                          goto shut;
                 mbuf[0] = 0;                  mbuf[0] = 0;
           } else if (proxy != NULL) {
                   BIO_printf(sbio, "CONNECT %s HTTP/1.0\r\n\r\n", connect);
                   mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ);
                   if (mbuf_len == -1) {
                           BIO_printf(bio_err, "BIO_read failed\n");
                           goto end;
                   }
         }          }
         for (;;) {          for (;;) {
                 struct pollfd pfd[3];   /* stdin, stdout, socket */                  struct pollfd pfd[3];   /* stdin, stdout, socket */

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12