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

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:199:    Integer(serial), ttl, extensions);       string digest = tbs->get_der();    return Sequence(({ tbs, dsa_sha1_algorithm,    BitString(dsa->sign_ssl(digest))    }))->get_der();   }      //!   string make_selfsigned_dsa_certificate(Crypto.DSA dsa, int ttl, array name, -  array|void extensions) +  array|void extensions, void|int serial)   { -  int serial = -  (int)Gmp.bignum(Standards.UUID.make_version1(-1)->encode(), 256); +  if(!serial) +  serial = (int)Gmp.mpz(Standards.UUID.make_version1(-1)->encode(), 256);       Sequence dn = Certificate.build_distinguished_name(@name);       return dsa_sign_key(dn, dsa, dn, DSA.public_key(dsa),    serial, ttl, extensions);   }      //!   string rsa_sign_digest(Crypto.RSA rsa, object digest_id, string digest)   {
pike.git/lib/modules/Standards.pmod/X509.pmod:230:    string digest, string s)   {    Sequence digest_info = Sequence( ({ Sequence( ({ digest_id, Null() }) ),    OctetString(digest) }) );    return rsa->raw_verify(digest_info->get_der(), Gmp.mpz(s, 256));   }      //!   //! @param issuer   //! Distinguished name for the issuer. + //! See @[Standards.PKCS.Certificate.build_distinguished_name].   //!   //! @param rsa   //! RSA parameters for the issuer. -  + //! See @[Crypto.RSA].   //!   //! @param subject   //! Distinguished name for the issuer. -  + //! See @[Standards.PKCS.Certificate.build_distinguished_name].   //!   //! @param public_key   //! DER-encoded RSAPublicKey structure.   //! See @[Standards.PKCS.RSA.public_key()].   //!   //! @param serial   //! Serial number for this key and subject.   //!   //! @param ttl   //! Validity time in seconds for this signature to be valid.
pike.git/lib/modules/Standards.pmod/X509.pmod:271:       string digest = Crypto.SHA1.hash(tbs->get_der());    return Sequence(({ tbs, rsa_sha1_algorithm,    BitString(rsa_sign_digest(rsa, Identifiers.sha1_id,    digest))    }))->get_der();   }      //!   string make_selfsigned_rsa_certificate(Crypto.RSA rsa, int ttl, array name, -  array|void extensions) +  array|void extensions, void|int serial)   { -  int serial = -  (int)Gmp.bignum(Standards.UUID.make_version1(-1)->encode(), 256); +  if(!serial) +  serial = (int)Gmp.mpz(Standards.UUID.make_version1(-1)->encode(), 256);       Sequence dn = Certificate.build_distinguished_name(@name);       return rsa_sign_key(dn, rsa, dn, RSA.public_key(rsa),    serial, ttl, extensions);   }      class Verifier {    constant type = "none";    int(0..1) verify(object,string,string);