Branch: Tag:

2001-08-23

2001-08-23 16:18:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fix for [bug 1978 (#1978)].

Rev: lib/modules/Tools.pmod/X509.pmod:1.14

1:   #pike __REAL_VERSION__      /* -  * $Id: X509.pmod,v 1.13 2000/10/22 11:24:26 sigge Exp $ +  * $Id: X509.pmod,v 1.14 2001/08/23 16:18:25 grubba Exp $    *    * Some random functions for creating RFC-2459 style X.509 certificates.    *
21:      object make_time(int t)   { -  mapping m = gmtime(t); +  object(Calendar.Second) second = Calendar.Second(t)->set_timezone("UTC");    -  if (m->year >= 150) +  if (second->year() >= 2050) {    throw( ({ "Tools.X509.make_time: "    "Times later than 2049 not supported yet\n",    backtrace() }) ); -  +  }       return asn1_utc(sprintf("%02d%02d%02d%02d%02d%02dZ", -  m->year % 100, -  m->mon + 1, -  m->mday, -  m->hour, -  m->min, -  m->sec)); +  second->year() % 100, +  second->month_no(), +  second->month_day(), +  second->hour_no(), +  second->minute_no(), +  second->second_no()));   }      /* Returns a mapping similar to that returned by gmtime */