~ubuntu-branches/ubuntu/hardy/lighttpd/hardy

« back to all changes in this revision

Viewing changes to src/network.c

  • Committer: Bazaar Package Importer
  • Author(s): Jeremie Corbier
  • Date: 2006-09-22 19:16:08 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060922191608-i9jngvf1wtf3j5rd
Tags: 1.4.12~20060907-1ubuntu1
Merge from debian unstable:
-> Keep the additional dependency on libterm-readline-perl-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
329
329
                                        ERR_error_string(ERR_get_error(), NULL));
330
330
                        return -1;
331
331
                }
 
332
 
 
333
                if (!s->ssl_use_sslv2) {
 
334
                        /* disable SSLv2 */
 
335
                        if (SSL_OP_NO_SSLv2 != SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2)) {
 
336
                                log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
 
337
                                                ERR_error_string(ERR_get_error(), NULL));
 
338
                                return -1;
 
339
                        }
 
340
                }
 
341
 
 
342
                if (!buffer_is_empty(s->ssl_cipher_list)) {
 
343
                        /* Disable support for low encryption ciphers */
 
344
                        if (SSL_CTX_set_cipher_list(s->ssl_ctx, s->ssl_cipher_list->ptr) != 1) {
 
345
                                log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
 
346
                                                ERR_error_string(ERR_get_error(), NULL));
 
347
                                return -1;
 
348
                        }
 
349
                }
332
350
                
333
351
                if (buffer_is_empty(s->ssl_pemfile)) {
334
352
                        log_error_write(srv, __FILE__, __LINE__, "s", "ssl.pemfile has to be set");
362
380
                                        s->ssl_pemfile);
363
381
                        return -1;
364
382
                }
 
383
                SSL_CTX_set_default_read_ahead(s->ssl_ctx, 1);
 
384
                SSL_CTX_set_mode(s->ssl_ctx, SSL_get_mode(s->ssl_ctx) | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 
385
 
365
386
                srv_socket->ssl_ctx = s->ssl_ctx;
366
387
#else
367
388