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

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:121:   //! Validity time in seconds for this signature to be valid.   //!   //! @param extensions   //! Set of extensions.   //!   //! @returns   //! Returns a DER-encoded certificate.   string sign_key(Sequence issuer, Crypto.RSA|Crypto.DSA c, Crypto.Hash h,    Sequence subject, int serial, int ttl, array|void extensions)   { -  Sequence algorithm_id = c->pkcs_algorithm_id(h); +  Sequence algorithm_id = c->pkcs_signature_algorithm_id(h);    if(!algorithm_id) error("Can't use %O for %O.\n", h, c);    Sequence tbs = make_tbs(issuer, algorithm_id,    subject, c->pkcs_public_key(),    Integer(serial), ttl, extensions);    -  return Sequence(({ tbs, c->pkcs_algorithm_id(h), +  return Sequence(({ tbs, c->pkcs_signature_algorithm_id(h),    BitString(c->pkcs_sign(tbs->get_der(), h))    }))->get_der();   }      //! Creates a selfsigned certificate, i.e. where issuer and subject   //! are the same entity. This entity is derived from the list of pairs   //! in @[name], which is encoded into an distinguished_name by   //! @[Standards.PKCS.Certificate.build_distinguished_name].   //!   //! @param c