diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-01-27 14:05:39 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-01-27 14:05:39 +0000 |
commit | 4ba1aa393b428f0b415ef3a9a463b0a316c1a6f5 (patch) | |
tree | 2f1dd66b26dfa9533f6eddd1a16ea04f13d23a4c /apps | |
parent | 1e27847d4eb70bb8da5115256e5d9b6fc49740f6 (diff) |
typo
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_server.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index 6de433299c..af1c5630d3 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2397,7 +2397,6 @@ static int www_body(char *hostname, int s, unsigned char *context) goto end; } - /* else we have data */ if ( ((www == 1) && (strncmp("GET ",buf,4) == 0)) || ((www == 2) && (strncmp("GET /stats ",buf,10) == 0))) { @@ -2406,6 +2405,25 @@ static int www_body(char *hostname, int s, unsigned char *context) STACK_OF(SSL_CIPHER) *sk; static const char *space=" "; + if(strncmp("GET /reneg ",buf,10) == 0) + { + for (;;) + { +fprintf(stderr, "Line: %s\n", buf); + i=BIO_gets(io,buf,bufsize-1); + if (i <= 0) + goto end; + if (buf[0] == '\r' || buf[0] == '\n') + break; + } + sleep(1); + SSL_renegotiate(con); + i=SSL_do_handshake(con); + SSL_renegotiate(con); + i=SSL_do_handshake(con); + printf("SSL_do_handshake -> %d\n",i); + } + BIO_puts(io,"HTTP/1.0 200 ok\r\nContent-type: text/html\r\n\r\n"); BIO_puts(io,"<HTML><BODY BGCOLOR=\"#ffffff\">\n"); BIO_puts(io,"<pre>\n"); @@ -2417,6 +2435,7 @@ static int www_body(char *hostname, int s, unsigned char *context) BIO_write(io," ",1); } BIO_puts(io,"\n"); + BIO_printf(io, "Secure Renegotiation IS%s supported\n", SSL_get_secure_renegotiation_support(con) ? "" : " NOT"); /* The following is evil and should not really * be done */ @@ -2640,7 +2659,7 @@ end: #endif err: - +ERR_print_errors(bio_err); if (ret >= 0) BIO_printf(bio_s_out,"ACCEPT\n"); |