Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.877 2004/06/30 16:58:39 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.878 2004/08/18 15:44:16 grubba Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:1599:    retries = 0;    bind();    }       static string _sprintf( )    {    return "Protocol("+name+"://"+ip+":"+port+")";    }   }    + #pike __REAL_VERSION__   #if constant(SSL.sslfile)   class SSLProtocol   //! Base protocol for SSL ports. Exactly like Port, but uses SSL.   {    inherit Protocol;       // SSL context    SSL.context ctx;    -  +  class CertificateListVariable +  { +  inherit Variable.FileList; +  +  string doc() +  { +  return sprintf(::doc() + "\n", +  combine_path(getcwd(), "../local"), +  getcwd()); +  } +  } +  +  class KeyFileVariable +  { +  inherit Variable.String; +  +  string doc() +  { +  return sprintf(::doc() + "\n", +  combine_path(getcwd(), "../local"), +  getcwd()); +  } +  } +     class destruct_protected_sslfile    {    SSL.sslfile sslfile;       mixed `[](string s)    {    return sslfile[s];    }       mixed `[]=(string s, mixed val)
Roxen.git/server/base_server/roxen.pike:1697: Inside #if constant(SSL.sslfile)
      if (!part || !(cert = part->decoded_body()))    {    report_error(LOC_M(10, "SSL3: No certificate found.")+"\n");    return;    }       if( f2 )    msg = Tools.PEM.pem_msg()->init( f2 );    + #if constant(Crypto.Random.random_string) +  function r = Crypto.Random.random_string; + #else    function r = Crypto.randomness.reasonably_random()->read; -  + #endif       SSL3_WERR(sprintf("key file contains: %O", indices(msg->parts)));       if (part = msg->parts["RSA PRIVATE KEY"])    {    string key;       if (!(key = part->decoded_body()))    {    report_error(LOC_M(11,"SSL3: Private rsa key not valid")+" (PEM).\n");
Roxen.git/server/base_server/roxen.pike:1725: Inside #if constant(SSL.sslfile)
   return;    }       ctx->rsa = rsa;       SSL3_WERR(sprintf("RSA key size: %d bits", rsa->rsa_size()));       if (rsa->rsa_size() > 512)    {    /* Too large for export */ + #if constant(Crypto.RSA) +  ctx->short_rsa = Crypto.RSA()->generate_key(512, r); + #else    ctx->short_rsa = Crypto.rsa()->generate_key(512, r); -  + #endif       // ctx->long_rsa = Crypto.rsa()->generate_key(rsa->rsa_size(), r);    }    ctx->rsa_mode();       // FIXME: Support PKCS7    object tbs = Tools.X509.decode_certificate (cert);    if (!tbs)    {    report_error(LOC_M(13,"SSL3: Certificate not valid (DER).")+"\n");
Roxen.git/server/base_server/roxen.pike:1807:   #endif    ::create(pn, i);    }       string _sprintf( )    {    return "SSLProtocol("+name+"://"+ip+":"+port+")";    }   }   #endif + // FIXME: Remove the following line when targetting for a newer Pike! + #pike 7.4      mapping(string:Protocol) build_protocols_mapping()   {    mapping protocols = ([]);    int st = gethrtime();    report_debug("Protocol handlers ... \b");   #ifndef DEBUG    class lazy_load( string prog, string name )    {    program real;