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

version» Context lines:

pike.git/lib/modules/Tools.pmod/X509.pmod:1:   /* -  * $Id: X509.pmod,v 1.9 2000/05/25 20:19:59 sigge Exp $ +  * $Id: X509.pmod,v 1.10 2003/02/17 14:04:06 grubba Exp $    *    * Some random functions for creating RFC-2459 style X.509 certificates.    *    */      #if constant(Standards.ASN1.Types.asn1_sequence)      import Standards.ASN1.Types;   import Standards.PKCS;   
pike.git/lib/modules/Tools.pmod/X509.pmod:43: Inside #if constant(Standards.ASN1.Types.asn1_sequence)
   * an octal prefix. */    mapping 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 lead seconds */