Fix from 0.9.7-stable.
[oweals/openssl.git] / ssl / ssltest.c
index c77dc86673b48c12d7b2fd4d102f263d74391034..517657c0240d01ffad924bb6192214175731a4e7 100644 (file)
@@ -420,7 +420,9 @@ int main(int argc, char *argv[])
        int print_time = 0;
        clock_t s_time = 0, c_time = 0;
        int comp = 0;
+#ifndef OPENSSL_NO_COMP
        COMP_METHOD *cm = NULL;
+#endif
        STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
        int test_cipherlist = 0;
 
@@ -652,6 +654,7 @@ bad:
        SSL_library_init();
        SSL_load_error_strings();
 
+#ifndef OPENSSL_NO_COMP
        if (comp == COMP_ZLIB) cm = COMP_zlib();
        if (comp == COMP_RLE) cm = COMP_rle();
        if (cm != NULL)
@@ -688,6 +691,7 @@ bad:
                        fprintf(stderr, "  %d: %s\n", c->id, c->name);
                        }
        }
+#endif
 
 #if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
        if (ssl2)
@@ -2230,6 +2234,7 @@ static DH *get_dh1024dsa()
        dh->length = 160;
        return(dh);
        }
+#endif
 
 static int do_test_cipherlist(void)
        {
@@ -2237,6 +2242,7 @@ static int do_test_cipherlist(void)
        const SSL_METHOD *meth;
        SSL_CIPHER *ci, *tci = NULL;
 
+#ifndef OPENSSL_NO_SSL2
        fprintf(stderr, "testing SSLv2 cipher list order: ");
        meth = SSLv2_method();
        while ((ci = meth->get_cipher(i++)) != NULL)
@@ -2250,7 +2256,8 @@ static int do_test_cipherlist(void)
                tci = ci;
                }
        fprintf(stderr, "ok\n");
-
+#endif
+#ifndef OPENSSL_NO_SSL3
        fprintf(stderr, "testing SSLv3 cipher list order: ");
        meth = SSLv3_method();
        tci = NULL;
@@ -2265,7 +2272,8 @@ static int do_test_cipherlist(void)
                tci = ci;
                }
        fprintf(stderr, "ok\n");
-
+#endif
+#ifndef OPENSSL_NO_TLS1
        fprintf(stderr, "testing TLSv1 cipher list order: ");
        meth = TLSv1_method();
        tci = NULL;
@@ -2280,7 +2288,7 @@ static int do_test_cipherlist(void)
                tci = ci;
                }
        fprintf(stderr, "ok\n");
+#endif
 
        return 1;
        }
-#endif