X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fssltest.c;h=e531b32f659e8b96e00ad6f96ff85f9d5762c3e8;hp=8b5ff3e4260922dc1d2ca53852c477e242c737e1;hb=9a555706a3fb8f6622e1049ab510a12f4e1bc6a2;hpb=b548a1f11c06ccdfa4f52a539912d22d77ee309e diff --git a/test/ssltest.c b/test/ssltest.c index 8b5ff3e426..e531b32f65 100644 --- a/test/ssltest.c +++ b/test/ssltest.c @@ -219,10 +219,9 @@ #endif /* - * There is really no standard for this, so let's assign some tentative - * numbers. In any case, these numbers are only for this test + * There is really no standard for this, so let's assign something + * only for this test */ -#define COMP_RLE 255 #define COMP_ZLIB 1 static int verify_callback(int ok, X509_STORE_CTX *ctx); @@ -804,7 +803,6 @@ static void sv_usage(void) fprintf(stderr, " -time - measure processor time used by client and server\n"); fprintf(stderr, " -zlib - use zlib compression\n"); - fprintf(stderr, " -rle - use rle compression\n"); #ifndef OPENSSL_NO_EC fprintf(stderr, " -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" @@ -997,7 +995,7 @@ int main(int argc, char *argv[]) int print_time = 0; clock_t s_time = 0, c_time = 0; #ifndef OPENSSL_NO_COMP - int comp = 0; + int n, comp = 0; COMP_METHOD *cm = NULL; STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; #endif @@ -1006,7 +1004,6 @@ int main(int argc, char *argv[]) int fips_mode = 0; #endif int no_protocol = 0; - int n; SSL_CONF_CTX *s_cctx = NULL, *c_cctx = NULL; STACK_OF(OPENSSL_STRING) *conf_args = NULL; @@ -1061,7 +1058,7 @@ int main(int argc, char *argv[]) argv++; while (argc >= 1) { - if (!strcmp(*argv, "-F")) { + if (strcmp(*argv, "-F") == 0) { #ifdef OPENSSL_FIPS fips_mode = 1; #else @@ -1212,8 +1209,6 @@ int main(int argc, char *argv[]) #ifndef OPENSSL_NO_COMP else if (strcmp(*argv, "-zlib") == 0) { comp = COMP_ZLIB; - } else if (strcmp(*argv, "-rle") == 0) { - comp = COMP_RLE; } #endif else if (strcmp(*argv, "-named_curve") == 0) { @@ -1376,10 +1371,8 @@ int main(int argc, char *argv[]) #ifndef OPENSSL_NO_COMP if (comp == COMP_ZLIB) cm = COMP_zlib(); - if (comp == COMP_RLE) - cm = COMP_rle(); if (cm != NULL) { - if (cm->type != NID_undef) { + if (COMP_get_type(cm) != NID_undef) { if (SSL_COMP_add_compression_method(comp, cm) != 0) { fprintf(stderr, "Failed to add compression method\n"); ERR_print_errors_fp(stderr); @@ -1387,8 +1380,7 @@ int main(int argc, char *argv[]) } else { fprintf(stderr, "Warning: %s compression not supported\n", - (comp == COMP_RLE ? "rle" : - (comp == COMP_ZLIB ? "zlib" : "unknown"))); + comp == COMP_ZLIB ? "zlib" : "unknown"); ERR_print_errors_fp(stderr); } }