X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fs_server.c;h=1f1f317d419ac2df29be38117bdd03994fbfb21a;hb=92e5882aca53940f883d810bb7116d2083c19045;hp=f44bf5e8409fa81cbaca1d9d93af76aab14d7909;hpb=5598b99fb324ab97e5ea196d5eacddaed0e054c6;p=oweals%2Fopenssl.git diff --git a/apps/s_server.c b/apps/s_server.c index f44bf5e840..1f1f317d41 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -781,13 +781,7 @@ int MAIN(int argc, char *argv[]) tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING}; #endif -#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) meth=SSLv23_server_method(); -#elif !defined(OPENSSL_NO_SSL3) - meth=SSLv3_server_method(); -#elif !defined(OPENSSL_NO_SSL2) - meth=SSLv2_server_method(); -#endif local_argc=argc; local_argv=argv; @@ -1556,6 +1550,12 @@ end: if (dpass) OPENSSL_free(dpass); #ifndef OPENSSL_NO_TLSEXT + if (tlscstatp.host) + OPENSSL_free(tlscstatp.host); + if (tlscstatp.port) + OPENSSL_free(tlscstatp.port); + if (tlscstatp.path) + OPENSSL_free(tlscstatp.path); if (ctx2 != NULL) SSL_CTX_free(ctx2); if (s_cert2) X509_free(s_cert2); @@ -1836,20 +1836,6 @@ static int sv_body(char *hostname, int s, unsigned char *context) continue; /* strcpy(buf,"server side RE-NEGOTIATE\n"); */ } - if ((buf[0] == 'X') && - ((buf[1] == '\n') || (buf[1] == '\r'))) - { - SSL_renegotiate(con); - i=SSL_do_handshake(con); - printf("SSL_do_handshake1 -> %d\n",i); - if (SSL_get_state(con) != SSL_ST_OK) - printf("Bad State\n"); - con->state = SSL_ST_ACCEPT; - i=SSL_do_handshake(con); - printf("SSL_do_handshake2 -> %d\n",i); - i=0; /*13; */ - continue; - } if ((buf[0] == 'R') && ((buf[1] == '\n') || (buf[1] == '\r'))) { @@ -2089,12 +2075,14 @@ static int www_body(char *hostname, int s, unsigned char *context) { char *buf=NULL; int ret=1; - int i,j,k,blank,dot; + int i,j,k,dot; struct stat st_buf; SSL *con; SSL_CIPHER *c; BIO *io,*ssl_bio,*sbio; +#ifdef RENEG long total_bytes; +#endif buf=OPENSSL_malloc(bufsize); if (buf == NULL) return(0); @@ -2165,7 +2153,6 @@ static int www_body(char *hostname, int s, unsigned char *context) SSL_set_msg_callback_arg(con, bio_s_out); } - blank=0; for (;;) { if (hack) @@ -2402,7 +2389,9 @@ static int www_body(char *hostname, int s, unsigned char *context) BIO_puts(io,"HTTP/1.0 200 ok\r\nContent-type: text/plain\r\n\r\n"); } /* send the file */ +#ifdef RENEG total_bytes=0; +#endif for (;;) { i=BIO_read(file,buf,bufsize);