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

version» Context lines:

pike.git/lib/modules/Tools.pmod/X509.pmod:1:   #pike __REAL_VERSION__   //#pragma strict_types      /* -  * $Id: X509.pmod,v 1.36 2004/03/25 21:36:01 bill Exp $ +  * $Id: X509.pmod,v 1.37 2004/09/06 02:46:37 nilsson Exp $    *    * Some random functions for creating RFC-2459 style X.509 certificates.    *    */      constant dont_dump_module = 1;      #if constant(Standards.ASN1.Types.Sequence) && constant(Crypto.Hash)      import Standards.ASN1.Types;
pike.git/lib/modules/Tools.pmod/X509.pmod:40:   //!   constant CERT_BAD_SIGNATURE = 6;      //!   constant CERT_UNAUTHORIZED_CA = 7;      //! Creates a @[Standards.ASN1.Types.UTC] object from the posix   //! time @[t].   UTC make_time(int t)   { -  Calendar.Second second = Calendar.Second(t)->set_timezone("UTC"); +  object /*Calendar.Second*/ second = Calendar->Second(t)->set_timezone("UTC");       if (second->year_no() >= 2050)    error( "Times later than 2049 not supported yet\n" );       return UTC(sprintf("%02d%02d%02d%02d%02d%02dZ",    second->year_no() % 100,    second->month_no(),    second->month_day(),    second->hour_no(),    second->minute_no(),
pike.git/lib/modules/Tools.pmod/X509.pmod:86:    mapping(string:int) m = mkmapping( ({ "year", "mon", "mday",    "hour", "min", "sec" }),    (array(int)) (s/2));       if (m->year < 50)    m->year += 100;    if ( (m->mon <= 0 ) || (m->mon > 12) )    return 0;    m->mon--;    -  if ( (m->mday <= 0) || (m->mday > Calendar.ISO.Year(m->year + 1900) +  if ( (m->mday <= 0) || (m->mday > Calendar->ISO->Year(m->year + 1900)    ->month(m->mon + 1)->number_of_days()))    return 0;       if ( (m->hour < 0) || (m->hour > 23))    return 0;       if ( (m->min < 0) || (m->min > 59))    return 0;       /* NOTE: Allows for leap seconds */