View | Details | Raw Unified | Return to bug 51479
Collapse All | Expand All

(-)httpd-2.2.19/support/ab.c (-1 / +28 lines)
Lines 340-345 Link Here
340
char *ssl_cipher = NULL;
340
char *ssl_cipher = NULL;
341
char *ssl_info = NULL;
341
char *ssl_info = NULL;
342
BIO *bio_out,*bio_err;
342
BIO *bio_out,*bio_err;
343
char * sess_in = NULL;
343
#endif
344
#endif
344
apr_time_t start, lasttime, stoptime;
345
apr_time_t start, lasttime, stoptime;
Lines 1195-1200 Link Here
1195
            ERR_print_errors(bio_err);
1196
            ERR_print_errors(bio_err);
1196
            exit(1);
1197
            exit(1);
1197
        }
1198
        }
1199
1200
        if (sess_in != NULL) {
1201
            SSL_SESSION *sess;
1202
            BIO *sidfile;
1203
1204
            if (!(sidfile = BIO_new_file(sess_in, "r"))) {
1205
                fprintf(stderr, "error opening session file %s\n", sess_in);
1206
                ERR_print_errors_fp(stderr);
1207
                exit(1);
1208
            }
1209
1210
            if (!(sess = PEM_read_bio_SSL_SESSION(sidfile, NULL, 0, NULL))) {
1211
                fprintf(stderr, "error reading session file %s\n", sess_in);
1212
                ERR_print_errors_fp(stderr);
1213
                exit(1);
1214
            }
1215
1216
            BIO_free(sidfile);
1217
            SSL_set_session(c->ssl, sess);
1218
            SSL_SESSION_free(sess);
1219
        }
1220
1198
        ssl_rand_seed();
1221
        ssl_rand_seed();
1199
        apr_os_sock_get(&fd, c->aprsock);
1222
        apr_os_sock_get(&fd, c->aprsock);
1200
        bio = BIO_new_socket(fd, BIO_NOCLOSE);
1223
        bio = BIO_new_socket(fd, BIO_NOCLOSE);
Lines 1876-1881 Link Here
1876
    fprintf(stderr, "    -h              Display usage information (this message)\n");
1899
    fprintf(stderr, "    -h              Display usage information (this message)\n");
1877
#ifdef USE_SSL
1900
#ifdef USE_SSL
1878
    fprintf(stderr, "    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)\n");
1901
    fprintf(stderr, "    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)\n");
1902
    fprintf(stderr, "    -I in_file      Specify file to read SSL session from\n");
1879
#ifndef OPENSSL_NO_SSL2
1903
#ifndef OPENSSL_NO_SSL2
1880
    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL)\n");
1904
    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL)\n");
1881
#else
1905
#else
Lines 2046-2052 Link Here
2046
    apr_getopt_init(&opt, cntxt, argc, argv);
2070
    apr_getopt_init(&opt, cntxt, argc, argv);
2047
    while ((status = apr_getopt(opt, "n:c:t:b:T:p:u:v:rkVhwix:y:z:C:H:P:A:g:X:de:Sq"
2071
    while ((status = apr_getopt(opt, "n:c:t:b:T:p:u:v:rkVhwix:y:z:C:H:P:A:g:X:de:Sq"
2048
#ifdef USE_SSL
2072
#ifdef USE_SSL
2049
            "Z:f:"
2073
            "Z:f:I:"
2050
#endif
2074
#endif
2051
            ,&c, &optarg)) == APR_SUCCESS) {
2075
            ,&c, &optarg)) == APR_SUCCESS) {
2052
        switch (c) {
2076
        switch (c) {
Lines 2223-2228 Link Here
2223
                    meth = TLSv1_client_method();
2247
                    meth = TLSv1_client_method();
2224
                }
2248
                }
2225
                break;
2249
                break;
2250
            case 'I':
2251
                sess_in = strdup(optarg);
2252
                break;
2226
#endif
2253
#endif
2227
        }
2254
        }
2228
    }
2255
    }

Return to bug 51479