fix stupid typo
[oweals/openssl.git] / apps / s_client.c
index d468778cd1cfeaf77a6110ed9a4e05029d4dbe0a..efd8b06fe6eea310ecccff3c1b111d0fb665f6d6 100644 (file)
@@ -262,7 +262,10 @@ int MAIN(int argc, char **argv)
        int ret=1,in_init=1,i,nbio_test=0;
        int starttls_proto = 0;
        int prexit = 0, vflags = 0;
-       SSL_METHOD *meth=NULL;
+       const SSL_METHOD *meth=NULL;
+#ifdef sock_type
+#undef sock_type
+#endif
        int sock_type=SOCK_STREAM;
        BIO *sbio;
        char *inrand=NULL;
@@ -275,7 +278,7 @@ int MAIN(int argc, char **argv)
 #endif
 
        struct sockaddr peer;
-       socklen_t peerlen = sizeof(peer);
+       int peerlen = sizeof(peer);
        int enable_timeouts = 0 ;
        long mtu = 0;
 
@@ -447,6 +450,8 @@ int MAIN(int argc, char **argv)
                        off|=SSL_OP_NO_SSLv3;
                else if (strcmp(*argv,"-no_ssl2") == 0)
                        off|=SSL_OP_NO_SSLv2;
+               else if (strcmp(*argv,"-no_comp") == 0)
+                       { off|=SSL_OP_NO_COMPRESSION; }
                else if (strcmp(*argv,"-serverpref") == 0)
                        off|=SSL_OP_CIPHER_SERVER_PREFERENCE;
                else if (strcmp(*argv,"-cipher") == 0)
@@ -643,7 +648,7 @@ re_start:
                struct timeval timeout;
 
                sbio=BIO_new_dgram(s,BIO_NOCLOSE);
-               if (getsockname(s, &peer, &peerlen) < 0)
+               if (getsockname(s, &peer, (void *)&peerlen) < 0)
                        {
                        BIO_printf(bio_err, "getsockname:errno=%d\n",
                                get_last_socket_error());
@@ -1093,7 +1098,9 @@ static void print_stuff(BIO *bio, SSL *s, int full)
        SSL_CIPHER *c;
        X509_NAME *xn;
        int j,i;
+#ifndef OPENSSL_NO_COMP
        const COMP_METHOD *comp, *expansion;
+#endif
 
        if (full)
                {
@@ -1196,12 +1203,14 @@ static void print_stuff(BIO *bio, SSL *s, int full)
                                                         EVP_PKEY_bits(pktmp));
                EVP_PKEY_free(pktmp);
        }
+#ifndef OPENSSL_NO_COMP
        comp=SSL_get_current_compression(s);
        expansion=SSL_get_current_expansion(s);
        BIO_printf(bio,"Compression: %s\n",
                comp ? SSL_COMP_get_name(comp) : "NONE");
        BIO_printf(bio,"Expansion: %s\n",
                expansion ? SSL_COMP_get_name(expansion) : "NONE");
+#endif
        SSL_SESSION_print(bio,SSL_get_session(s));
        BIO_printf(bio,"---\n");
        if (peer != NULL)