pike.git / lib / modules / Tools.pmod / X509.pmod

version» Context lines:

pike.git/lib/modules/Tools.pmod/X509.pmod:1:   #pike __REAL_VERSION__   //#pragma strict_types      /* -  * $Id: X509.pmod,v 1.27 2004/02/04 20:07:32 bill Exp $ +  * $Id: X509.pmod,v 1.28 2004/02/05 19:22:17 nilsson Exp $    *    * Some random functions for creating RFC-2459 style X.509 certificates.    *    */      #if constant(Standards.ASN1.Types.Sequence)      import Standards.ASN1.Types;   import Standards.PKCS;   
pike.git/lib/modules/Tools.pmod/X509.pmod:217:    Sequence dn = Certificate.build_distinguished_name(@name);       Sequence tbs = make_tbs(dn, rsa_sha1_algorithm,    dn, keyinfo,    serial, ttl, extensions);       return Sequence(    ({ tbs,    rsa_sha1_algorithm,    BitString(rsa_sign_digest(rsa, Identifiers.sha1_id, - #if constant(Crypto.SHA.name) -  Crypto.SHA.hash(tbs->get_der()) + #if constant(Crypto.SHA1.name) +  Crypto.SHA1.hash(tbs->get_der())   #else    Crypto.sha()->update(tbs->get_der())->digest()   #endif    )) }) )->get_der();   }      class Verifier {    constant type = "none";    int(0..1) verify(object,string,string);    this_program init(string key);
pike.git/lib/modules/Tools.pmod/X509.pmod:260:    if (algorithm->get_der() == rsa_md5_algorithm->get_der())    return rsa_verify_digest(rsa, Identifiers.md5_id,   #if constant(Crypto.MD5.name)    Crypto.MD5.hash(msg),   #else    Crypto.md5()->update(msg)->digest(),   #endif    signature);    if (algorithm->get_der() == rsa_sha1_algorithm->get_der())    return rsa_verify_digest(rsa, Identifiers.sha1_id, - #if constant(Crypto.SHA.name) -  Crypto.SHA.hash(msg), + #if constant(Crypto.SHA1.name) +  Crypto.SHA1.hash(msg),   #else    Crypto.sha()->update(msg)->digest(),   #endif    signature);    if (algorithm->get_der() == rsa_md2_algorithm->get_der())    return rsa_verify_digest(rsa, Identifiers.md2_id,   #if constant(Crypto.MD2.name)    Crypto.MD2.hash(msg),   #else    Crypto.md2()->update(msg)->digest(),