Branch: Tag:

2014-07-16

2014-07-16 15:15:25 by Martin Nilsson <nilsson@opera.com>

Allow time to be set through ASN.1 UTC constructor

411:    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()
424:    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()
677:    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    });
1125:    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);