# define TEST_CLIENT_CERT "../apps/client.pem"
#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 */
+#define COMP_RLE 1
+#define COMP_ZLIB 2
+
static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
#ifndef NO_RSA
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export,int keylength);
fprintf(stderr," -bio_pair - Use BIO pairs\n");
fprintf(stderr," -f - Test even cases that can't work\n");
fprintf(stderr," -time - measure processor time used by client and server\n");
+ fprintf(stderr," -zlib - use zlib compression\n");
+ fprintf(stderr," -time - use rle compression\n");
}
static void print_details(SSL *c_ssl, const char *prefix)
int no_dhe = 0;
int print_time = 0;
clock_t s_time = 0, c_time = 0;
+ int comp = 0;
verbose = 0;
debug = 0;
{
print_time = 1;
}
+ else if (strcmp(*argv,"-zlib") == 0)
+ {
+ comp = COMP_ZLIB;
+ }
+ else if (strcmp(*argv,"-rle") == 0)
+ {
+ comp = COMP_RLE;
+ }
else
{
fprintf(stderr,"unknown option %s\n",*argv);
SSL_library_init();
SSL_load_error_strings();
+ if (comp == COMP_ZLIB)
+ {
+ COMP_METHOD *cm = COMP_zlib();
+ if (cm->type != NID_undef)
+ SSL_COMP_add_compression_method(COMP_ZLIB, cm);
+ else
+ fprintf(stderr, "Warning: zlib compression not supported\n");
+ }
+ if (comp == COMP_RLE)
+ {
+ COMP_METHOD *cm = COMP_rle();
+ if (cm->type != NID_undef)
+ SSL_COMP_add_compression_method(COMP_RLE, cm);
+ else
+ fprintf(stderr, "Warning: rle compression not supported\n");
+ }
+
#if !defined(NO_SSL2) && !defined(NO_SSL3)
if (ssl2)
meth=SSLv2_method();