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

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:404:    }    Sequence `validity()    {    return low_get_sequence(3);    }       //!    void `not_before=(int t)    {    Sequence validity = low_get_sequence(3); -  validity->elements[0] = UTC()->set_posix(t); +  validity->elements[0] = UTC(t);    internal_der = UNDEFINED;    }    int `not_before()    {    Sequence validity = low_get_sequence(3);    return validity[0]->get_posix();    }       //!    void `not_after=(int t)    {    Sequence validity = low_get_sequence(3); -  validity->elements[1] = UTC()->set_posix(t); +  validity->elements[1] = UTC(t);    internal_der = UNDEFINED;    }    int `not_after()    {    Sequence validity = low_get_sequence(3);    return validity[1]->get_posix();    }       //!    void `subject=(Sequence s)
pike.git/lib/modules/Standards.pmod/X509.pmod:670:    return internal_critical;    }       protected void create(Sequence|void asn1)    {    // Initialize to defaults.    elements = ({    Integer(0), // serialNumber    Null, // signature    Sequence(({})), // issuer -  Sequence(({ UTC()->set_posix(-0x8000000), -  UTC()->set_posix(0x7fffffff) })), // validity +  Sequence(({ UTC(-0x8000000), +  UTC(0x7fffffff) })), // validity    Sequence(({})), // subject    Null, // subjectPublicKeyInfo    });       if (asn1) {    if (!init(asn1)) {    error("Invalid ASN.1 structure for a TBSCertificate.\n");    }    }    }
pike.git/lib/modules/Standards.pmod/X509.pmod:1118:   //! issuerUniqueID and subjectUniqueID are not supported.   //!   //! @note   //! Prior to Pike 8.0 this function returned a plain @[Sequence] object.   variant TBSCertificate make_tbs(Sequence issuer, Sequence algorithm,    Sequence subject, Sequence keyinfo,    Integer serial, int ttl,    array|int(0..0)|void extensions)   {    int now = time(); -  Sequence validity = Sequence( ({ UTC()->set_posix(now), -  UTC()->set_posix(now + ttl) }) ); +  Sequence validity = Sequence( ({ UTC(now), +  UTC(now + ttl) }) );       return make_tbs(issuer, algorithm, subject, keyinfo,    serial, validity, extensions);   }      //! Sign the provided TBSCertificate.   //!   //! @param tbs   //! A @[TBSCertificate] as returned by @[decode_certificate()]   //! or @[make_tbs()].