pike.git / lib / modules / SSL.pmod / https.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/https.pike:1:   #pike __REAL_VERSION__    - /* $Id: https.pike,v 1.14 2003/01/27 01:41:17 nilsson Exp $ + /* $Id: https.pike,v 1.15 2004/02/03 13:52:40 nilsson Exp $    *    * dummy https server    */      //! Dummy HTTPS server      #define PORT 25678      import Stdio;   
pike.git/lib/modules/SSL.pmod/https.pike:67:    }       void create(object f)    {    sslfile = f;    sslfile->set_nonblocking(read_callback, 0, 0);    }   }      class no_random { -  object arcfour = Crypto.arcfour(); +  object arcfour = Crypto.Arcfour();       void create(string|void secret)    {    if (!secret)    secret = sprintf("Foo!%4c", time()); -  object sha = Crypto.sha(); -  sha->update(secret); -  arcfour->set_encrypt_key(sha->digest()); +  arcfour->set_encrypt_key(Crypto.SHA->hash(secret));    }       string read(int size)    {    return arcfour->crypt(replace(allocate(size), 0, "\021") * "");    }   }      /* PKCS#1 Private key structure:   
pike.git/lib/modules/SSL.pmod/https.pike:128: Inside #if 0
  #endif    object n = key[1][1];    object e = key[2][1];    object d = key[3][1];    object p = key[4][1];    object q = key[5][1];       werror("n = %s\np = %s\nq = %s\npq = %s\n",    n->digits(), p->digits(), q->digits(), (p*q)->digits());    -  rsa = Crypto.rsa(); +  rsa = Crypto.RSA();    rsa->set_public_key(n, e);    rsa->set_private_key(d);   #else /* !0 */    // FIXME: Is this correct?    rsa = Standards.PKCS.RSA.parse_private_key(my_key);   #endif /* 0 */    certificates = ({ my_certificate });    random = no_random()->read;    werror("Starting\n");    if (!bind(PORT, my_accept_callback))