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

version» Context lines:

pike.git/lib/modules/Tools.pmod/X509.pmod:37: Inside #if constant(Standards.ASN1.Types.asn1_sequence)
   sscanf(asn1->value, "%[0-9]s%c", string s, int c);    if ( (strlen(s) != 12) && (c != 'Z') )    return 0;       /* NOTE: This relies on pike-0.7 not interpreting leading zeros as    * an octal prefix. */    mapping m = mkmapping( ({ "year", "mon", "mday", "hour", "min", "sec" }),    (array(int)) (s/2));       if (m->year < 50) -  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)    ->month(m->mon + 1)->number_of_days()))    return 0;       if ( (m->hour < 0) || (m->hour > 23))    return 0;   Newline at end of file added.