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

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:1163:   //! @param ca   //! RSA, DSA or ECDSA parameters for the issuer. Only the private   //! key needs to be set. See @[Crypto.RSA], @[Crypto.DSA] and   //! @[Crypto.ECC.Curve.ECDSA].   //!   //! @param h   //! The hash function to use for the certificate. Must be one of the   //! standardized PKCS hashes to be used with the given Crypto.   //!   //! @param subject - //! Distinguished name for the issuer. + //! Distinguished name for the subject.   //! 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
pike.git/lib/modules/Standards.pmod/X509.pmod:1303:    {    Identifier id = Identifiers.ce_ids[name];    if(!extensions[id])    extensions[id] = make_extension(id, data, critical);    };       if(!extensions) extensions = ([]);    // FIXME: authorityKeyIdentifier    add("keyUsage", build_keyUsage(KU_digitalSignature|KU_keyEncipherment), 1);    add("basicConstraints", Sequence(({Boolean(0)})), 1); -  return sign_key(dn, c, ca_key, h||Crypto.SHA256, ca->subject, serial, ttl, extensions); +  return sign_key(ca->subject, c, ca_key, h||Crypto.SHA256, dn, serial, ttl, extensions);   }      string make_root_certificate(Crypto.Sign c, int ttl,    mapping|array name,    mapping(Identifier:Sequence)|void extensions,    void|Crypto.Hash h, void|int serial)   {    if(!serial)    serial = (int)Gmp.mpz(Standards.UUID.make_version1(-1)->encode(), 256);