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

version» Context lines:

pike.git/lib/modules/Tools.pmod/X509.pmod:1: - /* X509.pmod + /* +  * $Id: X509.pmod,v 1.9 2000/05/25 20:20:31 sigge 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:291: Inside #if constant(Standards.ASN1.Types.asn1_sequence)
   array a = asn1->elements;    //werror("TBSCertificate: sizeof(a) = %d\n", sizeof(a));       if (sizeof(a) < 6)    return 0;       if (sizeof(a) > 6)    {    /* The optional version field must be present */    if (!a[0]->constructed -  || (a[0]->get_combinded_tag() != make_combined_tag(2, 0)) +  || (a[0]->get_combined_tag() != make_combined_tag(2, 0))    || (sizeof(a[0]->elements) != 1)    || (a[0]->elements[0]->type_name != "INTEGER"))    return 0;       version = (int) a[0]->elements[0]->value + 1;    if ( (version < 2) || (version > 3))    return 0;    a = a[1..];    } else    version = 1;