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

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:1074:    return 0;   }      //! Verifies that all extensions mandated for certificate signing   //! certificates are present and valid.   TBSCertificate verify_ca_certificate(string|TBSCertificate tbs)   {    if(stringp(tbs)) tbs = decode_certificate(tbs);    if(!tbs) return 0;    -  array crit = indices(tbs->critical); +  multiset crit = tbs->critical + (<>);    int self_signed = (tbs->issuer->get_der() == tbs->subject->get_der());       Object lookup(Identifier id)    { -  crit -= ({id}); +  crit[id] = 0;    return tbs->extensions[id];    };       // FIXME: Move extension parsing into tbs.       // id-ce-basicConstraints is required for certificates with public    // key used to validate certificate signatures. RFC 3280, 4.2.1.10.    Object c = lookup(.PKCS.Identifiers.ce_ids.basicConstraints);    if( !c || c->type_name!="SEQUENCE" || sizeof(c)<1 || sizeof(c)>2 ||    c[0]->type_name!="BOOLEAN" ||